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:

  1. 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.

  2. The mobile application must mandatorily use the Catalyst Cloud Scale 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 Java 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 getInstance() method, by passing the generated appID as a parameter.

We will use this mobile notification instance to perform additional operations with the Java SDK methods, such as sending push notifications, which will be covered in the next section.

Ensure the following packages are imported:

    
copy
import com.zc.component.notifications.ZCMobileNotification;
    
copy
ZCMobileNotification mobile = ZCMobileNotification.getInstance(1234567890l);

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.

    
copy
ZCMobileNotification mobile = ZCMobileNotification.getInstance(1234567890l, ZCProject project);

Send Android Push Notifications

After you have registered your Android application with Catalyst for sending push notifications, you can use the sendAndroidPushNotification() method to send push notifications to your application.

You will need to pass two parameters to the sendAndroidPushNotification() method :

  • pushMessage - A ZCPush type 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.

Ensure the following packages are imported:

    
copy
import com.zc.component.notifications.ZCMobileNotification; import com.zc.component.notifications.ZCPush; import com.zc.component.notifications.ZCPushMessage;
    
copy
ZCPushMessage notificationRes = mobile.sendAndroidPushNotification(new ZCPush() { { setMessage("This message is to test if the functionality is working fine!"); setBadgeCount(1); } }, "emma.b@zylker.com");

setBadgeCount() sets the app icon’s notification badge count to 1. You can change this value to any number you require.

Send iOS push notifications

Similar to Android, after you have registered your iOS application with Catalyst for sending push notifications, you can use the sendIOSPushNotification() method to send push notifications to your application.

Ensure the following packages are imported:

    
copy
import com.zc.component.notifications.ZCMobileNotification; import com.zc.component.notifications.ZCPush; import com.zc.component.notifications.ZCPushMessage;
    
copy
ZCPushMessage notificationRes = mobile.sendIOSPushNotification(new ZCPush() { { setMessage("This message is to test if the functionality is working fine!"); setBadgeCount(1); } }, "emma.b@zylker.com");

Last Updated 2025-07-09 17:36:14 +0530 +0530