Push Notifications - Android
How to configure Push notifications for Android SDK in Zoho SalesIQ?
You can send push notifications when the user is not using the android app. In the Zoho SalesIQ console, navigate to Settings > Brands > Installation > Android, scroll down to the Configure push notifications section and enable the toggle button.
How to register my Mobile Device?
Step 1: Get the FCM key from the Google services. A server key that authorizes your app server for access to Google services, including sending messages via Firebase Cloud Messaging. Follow the steps here to set up FCM service.
Before you proceed with the below steps, check the listed requirements:
- Created a project in the https://console.firebase.google.com/
- Added your app to the created firebase project
- Override the FirebaseMessagingService class onMessageReceived() method and onNewToken() method.
Step 2: Click the Settings icon in the Firebase console, and navigate to Project Settings > Cloud Messaging, you can find the server key.
Step 3: Enter the server key in the input box.
AndroidManifest.xml
Copied
...
MyFirebaseMessagingService.java
Copiedpublic class MyFirebaseMessagingService extends FirebaseMessagingService {
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Map extras = remoteMessage.getData();
MobilistenPlugin.handleNotification(this.getApplication(), extras);
}
@Override
public void onNewToken(String token) {
MobilistenPlugin.enablePush(token, true / false);
}
}
Step 5: Run your app with the code given in step 4
Step 6: To experiment with the push notification message services, you can initiate a test message to the registered mobile device here.