unregister

fun unregister(context: Context, instance: String = INSTANCE_DEFAULT)

Send an unregistration request for the instance to the saved distributor and remove the registration. Remove the distributor if this is the last instance registered.

MessagingReceiver.onUnregistered won't be called after that request. Sends the unregistration request to the fallback distributor as well if there is one

Parameters

context

To interact with the shared preferences and send broadcast intents.

instance

Registration instance. Can be used to get multiple registrations, eg. for multi-account support.


fun unregister(context: Context, instance: String = INSTANCE_DEFAULT, keyManager: KeyManager)

unregister with additional KeyManager parameter.

Parameters

keyManager

To manage web push keys. By default: DefaultKeyManager.