Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.datasync / Subscriber / subscribeToNotifications

subscribeToNotifications

fun subscribeToNotifications(type: Type, expirationDate: Date? = null, cipher: CryptoMethod = CryptoMethod.None, includesRevocation: Boolean = true, callback: WebcomResultCallback<Subscription>): Unit

Subscribes to a type of event on this data node until a given expirationDate and push notifications to the mobile device.

If the expiration date is not specified, the Webcom back end uses the default duration set in the Webcom developer console. The notifications sent may be encrypted using a given cipher. If includesRevocation is true, the mobile device will also be notified when the Webcom back end revokes the subscription.

The resulting Subscription is returned asynchronously using a callback function.

fun subscribeToNotifications(type: Type, duration: Duration, cipher: CryptoMethod = CryptoMethod.None, includesRevocation: Boolean = true, callback: WebcomResultCallback<Subscription>): Unit

Subscribes to a type of event on this data node for a given duration and push notifications to the mobile device.

The notifications sent may be encrypted using a given cipher. If includesRevocation is true, the mobile device will also be notified when the Webcom back end revokes the subscription.

The resulting Subscription is returned asynchronously using a callback function.