13. Notifications
There are two types of notifications in Android
-
Remote notifications: They allow remote services to send us messages to provide information. These are typical messages from a person’s inbound messaging applications, messages to indicate the status of a shipment, messages from bank applications when a receipt arrives, …
-
Local notifications: These are the notifications generated from the apps installed on the device itself. A very common one is using a timer to alert the user of something.
In terms of how we receive a notification from our app, there are two different scenarios:
- The application is running in the foreground.
- The application is running in the background or the application is not running.