Android Notification Methods
WSO2 IoTS uses the following notification methods for devices that use the Android mobile OS:
FCM
The Firebase Cloud Messaging (FCM) notification method uses the FCM server to wake-up the Android device. If the notification type (the Android Agent within the Android device will trigger a wake-up command) is set to FCM, when there are pending operations that need to be enforced on a device, WSO2 IoT server will send a push notification to the FCM server and the FCM server will in-turn send the message to the respective Android Agent that is within the Android device. When the Android Agent receives the push notification, it will communicate with WSO2 IoT server and receive the list of pending operations that need to be enforced on the Android device.
Local
The local notification method will not use Firebase Cloud Messaging (FCM), but it will use its own local push notification service. The Android Agent within the Android device will trigger a wake-up command every one minute. The wake-up command will be triggered periodically based on the notifier frequency, which determines the time period after which the wake-up command will be automatically triggered by the Android Agent. The notifier frequency needs to be specified in milliseconds (ms) when configuring Android tenant-based settings. The default notifier frequency is 60000ms, which translates to one minute.
Note
From Android 4.4 (KitKat) onwards the OS does not allow applications to trigger wake-up commands when the trigger period is set to less than a minute. Therefore, make sure to set the notifier frequency to 60000ms or more.
When the wake-up command is triggered the Android Agent will communicate with WSO2 IoT server and receive the list of pending operations that need to be executed on the respective device.
Setting the notification type
The following variations can be used when setting the notification type:
FCM
If you wish to enable the FCM notification method, you need to select FCM as the notification type, and set the FCM API key and sender ID.
Local
If you wish to enable the Local notification method, you need to select Local as the notification type and set the notifier frequency to a value greater or equal to 60000ms.
For more information on setting the Android configurations, see the Android Platform Configurations.