Package org.mozilla.geckoview
Class WebPushController
Object
org.mozilla.geckoview.WebPushController
-
Method Summary
Modifier and TypeMethodDescriptionGets theWebPushDelegate
for this instance.void
onPushEvent
(String scope) Send a push event for a given subscription.void
onPushEvent
(String scope, byte[] data) Send a push event with a payload for a given subscription.void
onSubscriptionChanged
(String scope) Notify that a given subscription has changed.void
setDelegate
(WebPushDelegate delegate) Sets theWebPushDelegate
for this instance.
-
Method Details
-
setDelegate
Sets theWebPushDelegate
for this instance.- Parameters:
delegate
- TheWebPushDelegate
instance.
-
getDelegate
Gets theWebPushDelegate
for this instance.- Returns:
- delegate The
WebPushDelegate
instance.
-
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.
-