Push Notification

This page contains the details of push notification, what it is and how to use them.

What are push notifications?

Push notifications are the type of notifications that can be triggered when the app is not opened. This type of notification is highly used in all apps to notify users of critical information, news, updates, etc. Banking apps notify the user if there is an upcoming transaction, status update of a transaction, account information update, and so on.

Push notifications can be retrieved at different states of the application, such as when the app is in the background, not running, foreground, etc. These notifications can also work with deep linking of the app so that tapping on the notification will take the user to a specific page or do some specific tasks.

How does it work?

Push notifications are implemented via Google Firebase Cloud Message or FCM. FCM service communicates asynchronous events from the middleware to the app. The apps need to be configured properly to work with the FCM service. For every firebase project, the apps connected to the project use a google-service.json file to specify the project and the services or the features related to the targetted projects.

How to implement it?

As stated, push notifications are implemented via Google Firebase Cloud Messaging. To implement push notifications, you must see the official Firebase Documentation. On this site, you will find different instructions for platforms such as iOS, android, web, Flutter, etc. But for these different platforms, only a JSON file is required to communicate with the firebase project hosted on the Google Cloud Platform (GCP).

This JSON file contains the unique id to specify which project it refers to on the GCP platform. This JSON file will be provided, with that JSON file, the in-app or push notifications. Please remember that different platforms have different procedures and restrictions while implementing the push notification service, such as the background mode notification service.

Last updated