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

EncryptedPushMessage

data class EncryptedPushMessage (source)

A push message holds the information needed to pass the message on to the appropriate receiver.

Constructors

Name Summary
<init> EncryptedPushMessage(channelId: String, body: String, encoding: String, salt: String = "", cryptoKey: String = "")
A push message holds the information needed to pass the message on to the appropriate receiver.

Properties

Name Summary
body val body: String
channelId val channelId: String
cryptoKey val cryptoKey: String
encoding val encoding: String
salt val salt: String

Companion Object Functions

Name Summary
invoke operator fun invoke(channelId: String, body: String, encoding: String, salt: String? = null, cryptoKey: String? = null): EncryptedPushMessage
The salt and cryptoKey are optional as part of the standard for WebPush, so we should default to empty strings.

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.