PushProvider

Interface for handling push notifications.

Interface for handling push notifications.

Syntax: interface PushProvider

Properties

NameSyntaxDescription
servicesHelperabstract val servicesHelper: PushServicesHelperThe helper for the push services.

Functions

FunctionsDescription
processTokenProcesses a received token from the push notification service.
registerRegisters a token with the push notification service.
subscribeSubscribes to a specific topic for push notifications. It allows the application to receive notifications related to the specified topic.
unsubscribeUnsubscribe from a specific topic for push notifications. It stops the application from receiving notifications related to the specified topic.

processToken

Processes a received token from the push notification service.

Syntax: abstract fun processToken(token: String)

Parameters:

ParametersTypeDescription
tokenStringThe token string is to be processed.

register

Registers a token with the push notification service.

Syntax: abstract fun register(context: Context)

Parameters:

ParametersTypeDescription
contextContextThe application context.

subscribe

Subscribes to a specific topic for push notifications. It allows the application to receive notifications related to the specified topic.

Syntax: abstract fun subscribe(context: Context, topic: String, callback: CompletionCallback)

Parameters:

ParametersTypeDescription
contextContextThe application context.
topicStringThe topic to subscribe to.
callbackCompletionCallbackThe callback is to be invoked when the subscription is completed.

unsubscribe

Unsubscribes from a specific topic for push notifications. It stops the application from receiving notifications related to the specified topic.

Syntax: abstract fun unsubscribe(context: Context, topic: String, callback: CompletionCallback)

Parameters:

ParametersTypeDescription
contextContextThe application context.
topicStringThe topic to unsubscribe to.
callbackCompletionCallbackThe callback is to be invoked when the un-subscription is completed.