Push Notifications to Mobile Apps
The Catalyst Cloud Scale Push Notifications component enables you to send notifications to mobile applications built on the Android or iOS platforms. You can send push notifications to a specific target user by using their Catalyst User ID or email address. You can include alerts, updates, or promotional content for the user to engage with your application.
To set up push notifications, you must meet the following prerequisites:
-
You must register your mobile application with Catalyst and note down the Application ID (appId) from the console after configuring. You can opt to register your application installed in the target device either using individual platform-specific Catalyst mobile SDK methods (available in Android and iOS) or using the Flutter SDK.
The appId can be fetched by configuring Android Push Notifications service directly in the Catalyst console.
Learn about registering your Android app using Android SDK.
Learn about registering your iOS app using iOS SDK.
Learn about registering your mobile apps (Android or iOS) using Flutter SDK.
-
The mobile application must mandatorily use the Catalyst Serverless Authentication component.
After all the setup is done, the Catalyst user must be logged in on their device to receive the notification promptly.
Once the setup is complete, you can send notifications by calling the Node.js SDK method below, using your generated Application ID to target the specific app.
Get Mobile Notification Instance
You can create a mobile notification instance and use it to refer to a specific mobile app registered in the Catalyst console. This is done by fetching the mobile notification instance with the pushNotification().mobile() method, by passing the generated appID as a parameter.
We will use this mobile notification instance to perform additional operations with the Node.js SDK methods, such as sending push notifications, which will be covered in the next section.
copyconst notification = app.pushNotification().mobile("1234567890");
Here, 1234567890l is the appID. Alternatively, if your application involves Catalyst scope based access, you can pass the ZCProject project parameter along with the appID.
Learn more about Catalyst SDK Scopes.
copyconst notification = app.pushNotification().mobile("1234567890", ZCProject project);
Send Android Push Notifications
After you have registered your Android application with Catalyst for sending push notifications, you can use the sendAndroidNotification() method to send push notifications to your application.
You will need to pass two parameters to the sendAndroidNotification() method:
copyMobileNotification.sendAndroidNotification(notifyObj: ICatalystPushDetails, recipient: string): Promise
-
notifyObj - An object with the details of the push notification message.
-
recipient - The Catalyst User ID of the recipient or the email address of the recipient to whom the message has to be delivered.
You can use the below code snippet to call the sendAndroidNotification() method in your application:
copynotification.sendAndroidNotification({ message: 'This message is to test if the functionality is working fine!', badge_count: 1 }, 'emma.b@zylker.com');
badge_count sets the app icon’s notification badge count to 1. You can change this value to any number you require.
Send iOS push notifications
After you have registered your iOS application with Catalyst for sending push notifications, you can use the sendIOSNotification()method to send push notifications to your application.
You will need to pass two parameters to the sendIOSNotification() method:
copyMobileNotification.sendIOSNotification(notifyObj: ICatalystPushDetails, recipient: string): Promise
You can use the below code snippet to call the sendIOSNotification() method in your application:
copynotification.sendIOSNotification({ message: 'This message is to test if the functionality is working fine!', badge_count: 1 }, 'emma.b@zylker.com');
Last Updated 2025-07-09 17:36:14 +0530 +0530
Yes
No
Send your feedback to us