android-components / mozilla.components.concept.engine.webpush / WebPushHandler

WebPushHandler

interface WebPushHandler (source)

A handler for all WebPush messages and subscriptions to be delivered to the Engine.

Functions

Name Summary
onPushMessage abstract fun onPushMessage(scope: String, message: ByteArray?): Unit
Invoked when a push message has been delivered.
onSubscriptionChanged open fun onSubscriptionChanged(scope: String): Unit
Invoked when a subscription has now changed/expired.

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.