Managing Push Notifications

Kii Cloud supports the following push notification technologies:

Kii Cloud SDK for JavaScript supports MQTT, FCM, and APNs as below:

  • If you create a web app or a Node.js app, you can use push notifications through MQTT over WebSocket or MQTT over the TCP socket.
  • If you create a Cordova app, you can use push notifications through FCM or APNs by adding the SDK file directly into the Cordova configuration file.

For combining push notification technologies for other platforms, see the push notification topics for Android and iOS. For the full list of available technologies per platform, see Push notification.

In this guide, a push notification service such as FCM and APNs is called a push notification network for convenience of explanation.

Push notification overview

Push notification is a feature for informing an event that occurs on the server to the client without any explicit checking request. The client can get the notifications passively rather than fetching them actively.

If your application were to receive server events without the push notification feature, the client would constantly access the server and check the status (ref. the figure on the left). Making this checking time interval big will cause some delay in getting the status while making it small will cause various issues like increasing server load, data traffic and device battery consumption.

You can solve this issue with the push notification feature. There are various methods to implement the feature and many implementations promptly notify clients of changes on the server at a low cost by keeping connections between the server and the clients.

Kii Cloud can send a push notification when a change in a bucket occurs, another client sends a message, and so on.

Implementation steps

Take the following steps to implement the push notification feature in your mobile app:

Developing a web app or a Node.js app

  1. Get the full picture of the related technologies by reading the following topics:

  2. Add the push notification feature to your mobile app by following the steps in Enabling the Kii Push Notification Feature (MQTT).

    You can build a mobile app for testing by taking the push notification tutorial and use the outcome as a skeleton of your mobile app.

  3. Implement functions to send and receive push messages with the following three push notification features:

Developing a Cordova app

  1. Get the full picture of the related technologies by reading the following topics:

    • Overview of the Push Technology: This documentation site does not have dedicated topics for Cordova apps. See Using FCM for Kii Cloud SDK for Android and Using APNs for Kii Cloud SDK for iOS.
    • Overview of the Kii Cloud Push Notification: This topic outlines how Kii Cloud delivers push notifications and supported features.
  2. Configure the push notification and implement the initialization process:

    Configure the push notification and implement the initialization process by following the instruction in Enabling the Kii Push Nofication Feature.

  3. Implement functions to send and receive push messages with the following three push notification features: