public class WebPushController extends Object
Modifier and Type | Method and Description |
---|---|
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 the
WebPushDelegate for this instance. |
@UiThread public void setDelegate(@Nullable WebPushDelegate delegate)
WebPushDelegate
for this instance.delegate
- The WebPushDelegate
instance.@UiThread public void onPushEvent(@NonNull String scope)
scope
- The Service Worker scope associated with this subscription.@UiThread public void onPushEvent(@NonNull String scope, @Nullable byte[] data)
scope
- The Service Worker scope associated with this subscription.data
- The unencrypted payload.@UiThread public void onSubscriptionChanged(@NonNull String scope)
scope
- The Service Worker scope associated with this subscription.