1. Overview

Tigase Push component is a Push notifications component implementing XEP-0357: Push Notifications. It is a gateway between Push Notification services and XMPP servers. It is configured by default to run under name of push.

2. Configuration

2.1. Enabling component

Push notifications may be sent by Tigase XMPP Server with or without use of Push component. Push Component is only required if you have your own application for mobile devices for which you want to send push notifications.

This component is not loaded and enabled by default as it requires implementations of Push notifications providers and additional configuration (including credentials required to authorize to push services). Following entries will activate component:

push () {
}
Note
You need to enable and configure push providers implementations before it will be possible to send push notifications. For more details about this process, please check documentations of push service provider projects.

2.2. Enabling push notifications for offline messages

Push notifications may be sent by Tigase XMPP Server with or without use of Push component. Push Component is only required if you have your own application for mobile devices for which you want to send push notifications.

If you are using existing application, then its maker have to provide you with push server (push component) which will send notification in format understandable by its application.

However, on Tigase XMPP Server side you need to enable processor which will generate notifications about offline messages sent to accounts on this server. To do so, you need to add following lines withing sess-man configuration block to enable urn:xmpp:push:0 processor:

'sess-man' () {
    'urn:xmpp:push:0' () {}
}

3. Usage

3.1. Sending notifications

When you will register a device for a Push Notifications, you will receive name of PubSub node to which you should publish items. Publishing items to this node, as specified in XEP-0357: Push Notifications will result in push notifications being delivered to a device.

3.2. Registering device

To register a device you need to execute an adhoc command Register device (with id register-device) available at Push Notification component. This command will return a form which needs to be filled. Form consists of following fields:

provider

ID of a provider for which you want to register a device. It contains a list of available providers and you need to select a proper one.

device-token

Unique token which your application retrieved from a device or client library and which should be used to identify device you want to register for push notifications.

When you submit this form, it will be processed and will respond with a form of a type result. Within this form you will find a node field which will contain a PubSub node name created at Push Notifications component, to which you should publish notification items. This returned node with jid of a Push Notifications Component should be passed to your XMPP server as an address of XMPP Push Service.

3.3. Unregistering device

To unregister a device, you need to execute an adhoc command Unregister device (with id unregister-device) available at Push Notification component. This command will return a form which needs to be filled. Form consists of following fields:

provider

ID of a provider for which your devices was registered.

device-token

Unique token which your application retrieved from a device or client library and was registered at this push notifications component.

When you submit this form, it will be processed and will respond with a form of a type result to notify you that device was successfully unregistered from the push notifications component.