subscribeWithHuaweiNotifications

fun subscribeWithHuaweiNotifications(deviceId: String, event: NotificationEvent, receiveRevocations: Boolean = true, expiration: Date? = null, callback: OnComplete)

Subscribes to a given NotificationEvent on the current data node path, to be received through the HMS (Huawei Mobile Service) push mobile notifications sent to a given deviceId. This operation requires to be authenticated.

Parameters

deviceId

The device identifier where to send the notifications (to be retrieved using the HMS Push Kit libraries)

event

The subscribed event.

receiveRevocations

If true (default value) the revocation of the subscription by the server will also be sent to the device through a push mobile notification.

expiration

If set, the subscription will automatically cancel at the given date, otherwise it will be revoked by the server after the default delay set in the Webcom developer console.

callback

The callback called when the subscription is acknowledged by the server.

fun subscribeWithHuaweiNotifications(deviceId: String, events: EnumSet<NotificationEvent>, receiveRevocations: Boolean = true, expiration: Date? = null, callback: OnComplete)

Subscribes to a given set of NotificationEvents on the current data node path, to be received through the HMS (Huawei Mobile Service) push mobile notifications sent to a given deviceId. This operation requires to be authenticated.

Parameters

deviceId

The device identifier where to send the notifications (to be retrieved using the HMS Push Kit libraries)

events

The list of subscribed events.

receiveRevocations

If true (default value) the revocation of the subscription by the server will also be sent to the device through a push mobile notification.

expiration

If set, the subscription will automatically cancel at the given date, otherwise it will be revoked by the server after the default delay set in the Webcom developer console.

callback

The callback called when the subscription is acknowledged by the server.