setMessage
Sets the main text content of the notification.
This is the primary message that will be displayed in the notification. Keep it concise and actionable to encourage user engagement. Example:
// E-commerce reminder
LocalNotification cartReminder = new LocalNotification.Builder()
.setMessage("Your cart is waiting! Complete your purchase now.")
.setDelay(7200) // 2 hours
.build();
// Fitness app reminder
LocalNotification workoutReminder = new LocalNotification.Builder()
.setMessage("Time for your daily 30-minute workout!")
.setDelay(3600)
.build();
// News app engagement
LocalNotification newsAlert = new LocalNotification.Builder()
.setMessage("5 new articles in your favorite topics")
.setDelay(86400) // 24 hours
.build();
Content copied to clipboard
Return
this builder instance for method chaining
Parameters
message
notification text message