Apps need to reach people: "Your order is ready", "Your appointment is tomorrow", "Your payment was received". Push notifications appeared in several adverts we read, Ghanaian and remote. In Ghana you also need a plan for users without data, which is where SMS comes in. Choosing the right channel, and using it politely, is part of a mobile developer's job.
Push notifications
A push notification is a message that appears on the phone even when your app is closed. On Android, apps commonly use Firebase Cloud Messaging (FCM):
- When your app starts, it gets a device token from FCM, a long ID for this app on this phone.
- Your app sends that token to your server and saves it against the user.
- When something happens, your server asks FCM to deliver a message to that token.
- The phone shows the notification. Tapping it can open a specific screen in your app.
Push messages are free to send through FCM, but they need the phone to have a data connection to arrive.
Asking permission
Since Android 13, apps must ask the user for permission before showing notifications. Ask at a sensible moment, when the user understands why, for example right after they place an order: "Turn on notifications so we can tell you when your food is ready?" Asking the moment the app first opens, with no reason given, leads many people to refuse.