Push Notifications
Introduction
Catalyst Push notifications enables you to send remote notifications to the users of your application, even when the app is not actively running on the user device. Catalyst provides you with an easy way to integrate push notifications into your Catalyst web, iOS, and Android applications.
Before you send push notifications, you must follow a set of steps to register your app and enroll for Catalyst push notifications. These steps are mentioned in sequence below:
- Generate Firebase’s Android Configuration File
- Generate Private Key for Firebase Access
- Configure Android Push Notification Services in Catalyst
- Register a Mobile Device for Push Notifications
Register a Mobile Device for Push Notifications
After you complete the first five steps mentioned above, you can implement the following code in your Android app that will register the device for Catalyst Push Notifications.
To register an Android mobile device as a test device, you must call the registerNotification() method with the required parameters as shown in the following code snippet:
copyval app = ZCatalystApp.getInstance() app.registerNotification(device_token,"bundleID", "appID", test_device_boolean, { Log.i("Register","App register successfully"); }, { Log.i("Register","App register failed"); })
Parameters:
-
device_token: The device token obtained from FCM for your app.
-
bundleID: The Android app’s bundle ID that you configured while registering the app with Catalyst as well as in Firebase.
-
appID: The app ID generated by Catalyst for your app in Push Notifications. You can find this in the Android section of Push Notifications in your Catalyst console.
-
test_device_boolean: The value is set to true for test devices, and set to false for production devices.
After your device is registered, you will be able to send push notifications to your app users. The users will need to provide the permission for your app to send push notifications to them on their device, by clicking Allow from the permission prompt.
You can learn about sending test push notifications on your registered devices from the Catalyst console from this help section. You can also send test notifications from the API.
Refer to the Java, Node.js, and Python SDK documentation to learn about sending push notifications through your codebase.
Last Updated 2024-12-11 16:27:33 +0530 +0530
Yes
No
Send your feedback to us