subscribeThroughPushNotification

fun <T : SubscribableEvent> subscribeThroughPushNotification(    type: KClass<T>,     expirationDate: Date? = null,     cipher: CryptoMethod = CryptoMethod.None,     includesRevocation: Boolean = true,     callback: WebcomResultCallback<LongTermSubscription>)

Subscribes to a type of event on this data node until a given expirationDate and send notifications through the mobile push notification channel of the user 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 LongTermSubscription is returned asynchronously using a callback function.


@RequiresApi(value = 26)
fun <T : SubscribableEvent> subscribeThroughPushNotification(    type: KClass<T>,     duration: Duration,     cipher: CryptoMethod = CryptoMethod.None,     includesRevocation: Boolean = true,     callback: WebcomResultCallback<LongTermSubscription>)

Subscribes to a type of event on this data node for a given duration and send notifications through the mobile push notification channel of the user 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 LongTermSubscription is returned asynchronously using a callback function.