Builder
Builder for creating LocalNotification instances.
Provides a fluent API for configuring all aspects of a local notification including message content, delay, visual elements (icons, images), and behavior (tags, links).
Common Usage Patterns:
// Basic reminder
LocalNotification basic = new LocalNotification.Builder()
.setMessage("Don't forget to check your cart!")
.setDelay(7200) // 2 hours
.build();
// Rich notification with image and deep link
LocalNotification rich = new LocalNotification.Builder()
.setMessage("50% off flash sale is live!")
.setTag("flash_sale")
.setDelay(86400) // 24 hours
.setBanner("https://example.com/sale-banner.jpg")
.setLink("myapp://products/sale")
.build();
// Notification with custom data
Bundle customData = new Bundle();
customData.putString("screen", "workout_detail");
customData.putInt("workout_id", 123);
LocalNotification withData = new LocalNotification.Builder()
.setMessage("Ready for your workout?")
.setDelay(3600) // 1 hour
.setExtras(customData)
.build();
Content copied to clipboard
See also
Functions
Link copied to clipboard
Builds and returns the configured LocalNotification instance.
Link copied to clipboard
Sets a large image to be displayed in the notification using Android's BigPictureStyle.
Link copied to clipboard
Sets the delay after which the notification will be displayed.
Link copied to clipboard
Adds custom data to the notification that can be retrieved when the notification is opened.
Link copied to clipboard
Sets the large icon displayed on the left side of the notification.
Link copied to clipboard
Sets a URL or deep link that will be opened when the user taps the notification.
Link copied to clipboard
Sets the main text content of the notification.
Link copied to clipboard
Sets the small icon displayed in the notification status bar and notification content.
Link copied to clipboard
Sets a unique tag to identify and manage this notification.