Package org.mozilla.geckoview
Class WebPushController
Object
org.mozilla.geckoview.WebPushController
Controller for managing web push notifications.
-
Method Summary
Modifier and TypeMethodDescriptionGets theWebPushDelegatefor this instance.voidonPushEvent(String scope) Send a push event for a given subscription.voidonPushEvent(String scope, byte[] data) Send a push event with a payload for a given subscription.voidonSubscriptionChanged(String scope) Notify that a given subscription has changed.voidsetDelegate(WebPushDelegate delegate) Sets theWebPushDelegatefor this instance.
-
Method Details
-
setDelegate
Sets theWebPushDelegatefor this instance.- Parameters:
delegate- TheWebPushDelegateinstance.
-
getDelegate
Gets theWebPushDelegatefor this instance.- Returns:
- delegate The
WebPushDelegateinstance.
-
onPushEvent
Send a push event for a given subscription.- Parameters:
scope- The Service Worker scope associated with this subscription.
-
onPushEvent
Send a push event with a payload for a given subscription.- Parameters:
scope- The Service Worker scope associated with this subscription.data- The unencrypted payload.
-
onSubscriptionChanged
Notify that a given subscription has changed. This is normally a signal to the content that it needs to re-subscribe.- Parameters:
scope- The Service Worker scope associated with this subscription.
-