Class WebPushController

Object
org.mozilla.geckoview.WebPushController

public class WebPushController extends Object
  • Method Details

    • setDelegate

      @UiThread public void setDelegate(@Nullable WebPushDelegate delegate)
      Sets the WebPushDelegate for this instance.
      Parameters:
      delegate - The WebPushDelegate instance.
    • getDelegate

      @UiThread @Nullable public WebPushDelegate getDelegate()
      Gets the WebPushDelegate for this instance.
      Returns:
      delegate The WebPushDelegate instance.
    • onPushEvent

      @UiThread public void onPushEvent(@NonNull String scope)
      Send a push event for a given subscription.
      Parameters:
      scope - The Service Worker scope associated with this subscription.
    • onPushEvent

      @UiThread public void onPushEvent(@NonNull String scope, @Nullable byte[] data)
      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

      @UiThread public void onSubscriptionChanged(@NonNull String scope)
      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.