Apps and notifications settings
- how to set push notification in android
- how to enable push notification in android
- how to create push notification in android
- how to set push notification icon in android
Android push notification example...
Notification settings on my phone
How to Push Notification in Android?
A notification is a message that appears outside of our Application’s normal UI. A notification can appear in different formats and locations such as an icon in the status bar, a more detailed entry in the notification drawer, etc.
Through the notification, we can notify users about any important updates, events of our application. By clicking the notification user can open any activity of our application or can do some action like opening any webpage etc.
How Does Notification Look?
Let’s see the basic design of a notification template that appears in the navigation drawer.
Part of a Notification | Method for defining contents | Type of argument needs to pass into the method |
---|---|---|
Small Icon | setSmallIcon() | Drawable file |
App Name | By default, App Name is provided by the System and we can’t override it. | |
Timestamp | By default, timeStamp is provided by the System but we can override it by setWhen() method. | Long (in milliseconds) |
Title | setContentTitle() |
|