PushManager

Object representing the PushManager used to manage subscriptions

The PushManager object is the main interface provided by this crate it allow consumers to manage push subscriptions. It exposes methods that interact with the autopush server and persists state representing subscriptions.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class>)
constructor(noPointer: NoPointer)

This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.

constructor(config: PushConfiguration)

Creates a new `PushManager` object, not subscribed to any channels

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun decrypt(payload: Map<String, String>): DecryptResponse

Decrypts a raw push message.

Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun getSubscription(scope: String): SubscriptionResponse?

Retrieves an existing push subscription

Link copied to clipboard
open override fun subscribe(scope: String, appServerSey: String?): SubscriptionResponse

Subscribes to a new channel and gets the Subscription Info block

Link copied to clipboard
fun uniffiClonePointer(): <Error class: unknown class>
Link copied to clipboard
open override fun unsubscribe(scope: String): Boolean

Unsubscribe from given scope, ending that subscription for the user.

Link copied to clipboard
open override fun unsubscribeAll()

Unsubscribe all channels for the user

Link copied to clipboard
open override fun update(registrationToken: String)

Updates the Native OS push registration ID.

Link copied to clipboard
open override fun verifyConnection(forceVerify: Boolean): List<PushSubscriptionChanged>

Verifies the connection state