public interface PushTransport
Low-level native push integration for a CN1Lib or private provider.
A custom transport owns the provider SDK and native registration flow.
When installed with PushClient.Builder.transport(PushTransport),
BuildCloud registration is disabled. The matching
PushRegistrationSink is responsible for synchronizing tokens with
the application’s server.
The transport must invoke exactly one registration result callback for
each register(Callback) attempt, report token rotations through
Callback.registered(PushSubscription), and pass complete schema-3
JSON envelopes to Callback.message(String). The callback accepts
calls from native threads; PushClient moves application callbacks to
the EDT.
Nested types
interface PushTransport.Callback | Receives events emitted by a custom transport. |
Methods
public abstract String getId() | Returns the stable provider identifier stored with subscriptions. |
public abstract boolean isSupported() | Tests whether this transport is available on the current device. |
public abstract void register(PushTransport.Callback callback) | Starts or refreshes native registration. |
public abstract void unregister(PushTransport.Callback callback) | Removes the native subscription. |
Method details
getId
public abstract String getId()Returns the stable provider identifier stored with subscriptions.
Returns
a non-empty identifier such as
company-pushisSupported
public abstract boolean isSupported()Tests whether this transport is available on the current device.
Returns
true when registration can be attemptedregister
public abstract void register(PushTransport.Callback callback)Starts or refreshes native registration.
Parameters
callbackPushTransport.Callback- the callback used for registration and incoming messages
unregister
public abstract void unregister(PushTransport.Callback callback)Removes the native subscription.
Parameters
callbackPushTransport.Callback- the callback that must receive
Callback.unregistered()when removal completes