In order to use the JPush push notification feature in Kii Cloud, you should get familiar with the following concepts:
For more information, see the JPush documentation.
Identifying the JPush user
JPush manages a user app that uses a JPush feature under a JPush application. Create an application in the JPush management console and get the assigned AppKey and Master Secret.
Register the AppKey and Master Secret to Kii Cloud with the developer portal. Kii Cloud sends a push notification request to the JPush server with the registered APPKey and Master Secret.
Embed the AppKey in AndroidManifes.xml and build your mobile app so that the JPush library can reference it when the mobile app is started.
Receiving push notifications
Your mobile application will use the Android's Broadcast feature to receive the push notifications.
The broadcast feature will allow the BroadcastReceiver, a program for handling events, to be called when a specific event (e.g. receiving a push message) occurs on a device. The relationship between an event and the class name of the corresponding BroadCastReceiver are defined in the AndroidManifest.xml file. The next figure illustrates the relationship.
The logics for handling the push messages in the application is to be implemented as a handler of the BroadCastReceiver.
The next figure illustrates the flow:
The Broadcast allows your application to receive push notifications even if the mobile app is not running in the foreground or not activated at all.
The push message is in JSON format. It can contain some application specific custom data.