
Once you have Builder object, you can set its Notification properties using Builder object as per your requirement. NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)

You will use Notification Builder to set various Notification properties like its small and large icons, title, priority etc. Follow the following steps in your application to create a notification − Step 1 - Create Notification BuilderĪs a first step is to create a notification builder using (). You have simple way to create a notification. The following screen shot shows such notification. You can add upto six additional lines in the notification. This will be just 64 dp tall and called normal view.Ībove expanded form can have a Big View which will have additional detail about the notification. While working with emulator with virtual device, you will have to click and drag down the status bar to expand it which will give you detail as follows.

To see the details of the notification, you will have to select the icon which will display notification drawer having detail about the notification.

Both the notification area and the notification drawer are system-controlled areas that the user can view at any time.Īndroid Toast class provides a handy way to show users alerts but problem is that these alerts are not persistent which means alert flashes on the screen for a few seconds and then disappears. To see the details of the notification, the user opens the notification drawer. When you tell the system to issue a notification, it first appears as an icon in the notification area. A notification is a message you can display to the user outside of your application's normal UI.
