Interface PushTransport
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
PushTransport.Callback.registered(PushSubscription), and pass complete schema-3
JSON envelopes to PushTransport.Callback.message(String). The callback accepts
calls from native threads; PushClient moves application callbacks to
the EDT.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceReceives events emitted by a custom transport. -
Method Summary
Modifier and TypeMethodDescriptiongetId()Returns the stable provider identifier stored with subscriptions.booleanTests whether this transport is available on the current device.voidregister(PushTransport.Callback callback) Starts or refreshes native registration.voidunregister(PushTransport.Callback callback) Removes the native subscription.
-
Method Details
-
getId
String getId()Returns the stable provider identifier stored with subscriptions.- Returns:
- a non-empty identifier such as
company-push
-
isSupported
boolean isSupported()Tests whether this transport is available on the current device.- Returns:
truewhen registration can be attempted
-
register
Starts or refreshes native registration.- Parameters:
callback- the callback used for registration and incoming messages
-
unregister
Removes the native subscription.- Parameters:
callback- the callback that must receivePushTransport.Callback.unregistered()when removal completes
-