Push

open class Push

Types

IGenerateKeysListener
Link copied to clipboard
interface IGenerateKeysListener
IMessageReceivedListener
Link copied to clipboard
interface IMessageReceivedListener

Functions

activate
Link copied to clipboard
open fun activate(application: Application)
Activate the push notification mode to avoid keeping a web socket opened (reduce the battery consumption).
generateKeysForEncryption
Link copied to clipboard
open fun generateKeysForEncryption(@NonNull() listener: Push.IGenerateKeysListener)
onMessageReceived
Link copied to clipboard
open fun onMessageReceived(data: Map<String, String>, listener: Push.IMessageReceivedListener)
Use this method in the `onMessageReceived` of your class which extends `FirebaseMessagingService` to allow the RainbowSdk to manage new message received.
onTokenRefresh
Link copied to clipboard
open fun onTokenRefresh(refreshedToken: String)
Use this method in the `onTokenRefresh` of your class which extends `FirebaseInstanceIdService` to allow the RainbowSdk to refresh token if necessary.
startCheckBackgroundWorker
Link copied to clipboard
open fun startCheckBackgroundWorker()