Notifications
Notification is a message that will be displayed to the user outside of the application’s usual UI.
When you execute a command telling the system to issue a notification, it will appear as an icon in the notification area, and to see the details, the user opens the notification space.
The notification space is this area where the details are shown (also called the notification drawer) are areas controlled by the system and the user can see at any time.
Creation of a Notification
To specify actions and information that will be displayed to the user, use a
Notification.Builder
object.To create a push notification, use
Notification.Builder.build()
, which is an example of the type ofnotification
provided as previously defined specifications.To notify a notification, simply pass the
Notification
object usingNotificationManager.getInstance().Notify();
Content Needed to Create a Notification
The object on smartphones should contain the following:
A title, defined by
title();
Detail text, defined by
text();
A Simple Example
References
to see the complete example, go to our GitHub
You can also view this quick tutorial video on how to create notifications.
Last updated