The Intent class is used to call another activity (NotificationView.java) on taping the notification. With exceptional ingress rates, it can take on many incoming messages storing those internally offering no queue semantics. The NotificationManager.notify() method is used to display the notification. In this class, clicking the button calls the addNotification() method where we implement the NotificationCompat.Builder object to set the notification properties. activity_notification_view.xmlĪdd the following code in the MainActivity.java class. TextView is used to display the notification message. This activity will launch on clicking the notification. Create an activity named as activity_notification_view.xml and add the following code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |