android-components / mozilla.components.concept.push / PushService

PushService

interface PushService (source)

Implemented by push services like Firebase Cloud Messaging and Amazon Device Messaging SDKs to allow the PushProcessor to manage their lifecycle.

Functions

Name Summary
deleteToken abstract fun deleteToken(): Unit
Tells the push service to delete the registration token.
isServiceAvailable abstract fun isServiceAvailable(context: <ERROR CLASS>): Boolean
If the push service is support on the device.
start abstract fun start(context: <ERROR CLASS>): Unit
Starts the push service.
stop abstract fun stop(): Unit
Stops the push service.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.

Inheritors

Name Summary
AbstractAmazonPushService abstract class AbstractAmazonPushService : ADMMessageHandlerBase, PushService
An Amazon Cloud Messaging implementation of the PushService for Android devices that support Google Play Services. ADMMessageHandlerBase requires a redundant constructor parameter.
AbstractFirebasePushService abstract class AbstractFirebasePushService : FirebaseMessagingService, PushService
A Firebase Cloud Messaging implementation of the PushService for Android devices that support Google Play Services.