SessionInfoIntentEncoder

class SessionInfoIntentEncoder


Helper to encode and decode a SessionInfo from an Intent

Summary

Public functions

java-static Boolean

Returns whether or not the given intent contains an encoded SessionInfo.

java-static SessionInfo
decode(intent: Intent)

Decodes a new SessionInfo for a given intent

java-static Unit
encode(sessionInfo: SessionInfo, intent: Intent)

Sets the unique identifier for the given intent and encodes the passed SessionInfo in its extras.

Public functions

containsSessionInfo

Added in 1.3.0
java-static fun containsSessionInfo(intent: Intent): Boolean

Returns whether or not the given intent contains an encoded SessionInfo.

decode

Added in 1.3.0
java-static fun decode(intent: Intent): SessionInfo

Decodes a new SessionInfo for a given intent

encode

Added in 1.3.0
java-static fun encode(sessionInfo: SessionInfo, intent: Intent): Unit

Sets the unique identifier for the given intent and encodes the passed SessionInfo in its extras.

The intent identifier that's created is unique based on toString. The Intent field that's set is either setIdentifier on API 29 and above, or setData.