Class CefriumRelayTransport

java.lang.Object
com.cefrium.CefriumPushTransport
com.cefrium.CefriumRelayTransport

public class CefriumRelayTransport extends CefriumPushTransport
Web Push through the app's own Firebase project and a cefrium-relay the app developer runs, instead of the Chromium channel Google provides for testing.
CefriumPush.setTransport(new CefriumRelayTransport(
        "https://push.example.com", "<public key printed by cefrium-relay keygen>"));

The relay keeps no state. Each endpoint carries the subscription (the app's FCM token, the page's VAPID key), encrypted on the device to the relay's public key. The relay checks the sender's VAPID signature and sends the message, still encrypted for the page, through FCM; CefriumPushService or the app's own service passes it to CefriumPush.handleMessage(Context, String, Bundle). Pages must subscribe with an applicationServerKey.

  • Constructor Details

    • CefriumRelayTransport

      public CefriumRelayTransport(String origin, String relayPublicKey)
      Parameters:
      origin - the relay's public https origin, such as https://push.example.com.
      relayPublicKey - the relay's public key, base64url, as cefrium-relay keygen prints it.
  • Method Details