SessionInfoIntentEncoder
public class SessionInfoIntentEncoder
Helper to encode and decode a SessionInfo from an Intent
Summary
Public methods |
|
|---|---|
static boolean |
containsSessionInfo(@NonNull Intent intent)Returns whether or not the given |
static @NonNull SessionInfo |
Decodes a new |
static void |
encode(@NonNull SessionInfo sessionInfo, @NonNull Intent intent)Sets the unique identifier for the given |
Public methods
containsSessionInfo
public static boolean containsSessionInfo(@NonNull Intent intent)
Returns whether or not the given intent contains an encoded SessionInfo.
decode
public static @NonNull SessionInfo decode(@NonNull Intent intent)
Decodes a new SessionInfo for a given intent
encode
public static void encode(@NonNull SessionInfo sessionInfo, @NonNull Intent intent)
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.