Understand different update mechanisms in Android
#Push Notifications
What is a Push Notification?
Push notifications are messages sent from a server to a user’s device even when the app is not actively running. They are used to inform users of important events or updates, encourage app engagement, and provide timely information.
Let’s understand this with an Usecase.
Food Delivery App (Order Delivery Updates)
Problem:
An Food Delivery app wants to keep users informed about their order status, such as when their order is shipped, out for delivery, or delivered. The user might not always have the app open.
Solution:
Push notifications are used to notify users about critical updates in real-time.
Why Push Notifications Are Better Than HTTP Polling or WebSockets in This Example:
In an Food Delivery app, order updates like “Order Dispatched” or “on the way” are infrequent and occur at irregular intervals. The user may not always have the app open.