PushProvider
Interface for handling push notifications.
Interface for handling push notifications.
Syntax: interface PushProvider
Properties
Name | Syntax | Description |
---|---|---|
servicesHelper | abstract val servicesHelper: PushServicesHelper | The helper for the push services. |
Functions
Functions | Description |
---|---|
processToken | Processes a received token from the push notification service. |
register | Registers a token with the push notification service. |
subscribe | Subscribes to a specific topic for push notifications. It allows the application to receive notifications related to the specified topic. |
unsubscribe | Unsubscribe 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:
Parameters | Type | Description |
---|---|---|
token | String | The token string is to be processed. |
register
Registers a token with the push notification service.
Syntax: abstract fun register(context: Context)
Parameters:
Parameters | Type | Description |
---|---|---|
context | Context | The 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:
Parameters | Type | Description |
---|---|---|
context | Context | The application context. |
topic | String | The topic to subscribe to. |
callback | CompletionCallback | The 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:
Parameters | Type | Description |
---|---|---|
context | Context | The application context. |
topic | String | The topic to unsubscribe to. |
callback | CompletionCallback | The callback is to be invoked when the un-subscription is completed. |
Updated about 1 month ago