Kii Cloud Push Notification Features
Kii Cloud supports three types of push notifications:
A change in a bucket is sent as a push notification. Kii Cloud sends a push notification to subscribers when a KiiObject is created, updated, and so on, in a subscribed bucket.
Example: Your users will be able to get a push notification when a new KiiObject is created in a bucket.
A message from a mobile app user or the administrator is sent as a push notification. Let users create a topic that has a purpose and subscribe to it. Kii Cloud sends a push notification to subscribers when a message is sent to the topic.
Example: Your users will be able to exchange push messages directly amongst their friends.
A message from the application administrator is directly sent to a certain user. A message in the JSON format can be sent to a certain user through the developer portal or the REST API.
Example: Send a push notification directly to a certain user.
The following table summarizes the features.
|Push notification type||Scope||Description||How to create a target topic||How to receive push messages||How to send push messages|
|Push to App||Application||Send push notifications when events, defined by Kii Cloud, occur in a subscribed bucket.||N/A||Subscribe to a bucket with the Kii Cloud SDK or REST API.||Messages are sent automatically when events occur.|
|Group||Create a topic with the Kii Cloud SDK or REST API.||Send messages with the Kii Cloud SDK or REST API.|
|User||Create a topic with the Kii Cloud SDK or REST API.||Send messages with the Kii Cloud SDK or REST API.|
|Direct Push||N/A||Send a push message directly to a specified user from the developer portal.||N/A||A target user unconditionally receives messages (no subscription required).||Send messages with the developer portal or REST API (The admin right is required).|
See Push notification features to see how the push notification works for a thing scope.
In order to inform your mobile app of an update to a bucket with a push notification, you can use either of the Push to App and Push to User notifications. Kii recommends using the Push to App notification if you simply notify an update and the Push to User notification if you need some flexibility for functional tuning and customization.
If you use the Push to App notification, a push notification is automatically sent every time when a bucket is updated. If you use the Push to User notification, you can provide equivalent functionality to the Push to App notification by implementing two processes in your mobile app: updating a bucket and sending a message to a topic.
While the Push to App notification has the benefit of automatic notification, it does not allow suppressing notifications by the type of update, control the timing of notification, nor customize the payload content.
While the Push to User notification requires you to implement a process for sending a notification, it allows you to flexibly control such a process. For example, you can combine multiple updates into a single push notification and customize the message to be displayed in Notification Center on iOS.
For implementing equivalent functionality to the Push to App notification, see Customizing a push message.