build
Builds and returns the configured LocalNotification instance.
After calling this method, the LocalNotification is ready to be scheduled using scheduleLocalNotification. Example:
// Build a complete notification
LocalNotification notification = new LocalNotification.Builder()
.setMessage("Don't forget to check your cart!")
.setTag("cart_reminder")
.setDelay(3600)
.setLink("myapp://cart")
.setBanner("https://cdn.example.com/cart-banner.jpg")
.setSmallIcon("ic_cart")
.build();
// Schedule the notification
LocalNotificationRequest request = Pushwoosh.getInstance()
.scheduleLocalNotification(notification);
// Save request ID for later cancellation
SharedPreferences prefs = getSharedPreferences("app_prefs", MODE_PRIVATE);
prefs.edit().putInt("cart_reminder_id", request.getRequestId()).apply();
Content copied to clipboard
Return
configured LocalNotification instance ready to be scheduled