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 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 Python 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 push_notification().mobile() method, by passing the generated appID as a parameter.

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

    
copy
mobile_notification = app.push_notification().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.

    
copy
mobile_notification = app.push_notification().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 send_android_notification() method to send push notifications to your application.

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

  • notify_obj - 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 send_android_notification() method in your application:

    
copy
mobile_notification.send_android_notification( notify_obj={"message": "This message is to test if the functionality is working fine!", "badge_count": 1}, recipient="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

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

    
copy
mobile_notification.send_ios_notification( notify_obj={"message": "test_notification", "badge_count": 1}, recipient="testuser@zylker.com" )

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