Subscription to a topic is necessary to receive Push to User notifications. Once a user subscribes to a topic, all push messages sent to this topic will be delivered to the user.
The following sample code subscribes to an application-scope topic named
The next sample code subscribes to a group-scope topic named
GroupTopic. In this sample code, we are getting the existing topic with its URL.
The last sample code subscribes to a user-scope topic named
For all examples, here is a brief description of the sample code:
- Instantiates a target topic.
- Creates a KiiPushSubscription instance by calling the
- Calls the
subscribe method passing the target topic.