SerializationHelper
class SerializationHelper
Class used to manage Ongoing Activity information as part of a Bundle or Notification.
Summary
Public functions |
|
|---|---|
java-static Unit |
Copies an Ongoing Activity information from a bundle to another, without deserializing and serializing (this needs to be done before accessing the source Bundle) |
java-static OngoingActivity? |
Deserializes the |
java-static OngoingActivity? |
create(notification: Notification)Deserializes the |
java-static Boolean |
hasOngoingActivity(notification: Notification)Checks if the given notification contains information of an ongoing activity. |
Public functions
copy
java-static fun copy(sourceBundle: Bundle, destinationBundle: Bundle): Unit
Copies an Ongoing Activity information from a bundle to another, without deserializing and serializing (this needs to be done before accessing the source Bundle)
create
java-static fun create(bundle: Bundle): OngoingActivity?
Deserializes the OngoingActivity from a Bundle.
| Parameters | |
|---|---|
bundle: Bundle |
the bundle that may contain information about a Ongoing Activity. |
| Returns | |
|---|---|
OngoingActivity? |
the data, or null of the Bundle doesn't contain Ongoing Activity data. |
create
java-static fun create(notification: Notification): OngoingActivity?
Deserializes the OngoingActivity from a notification.
| Parameters | |
|---|---|
notification: Notification |
the notification that may contain information about a Ongoing Activity. |
| Returns | |
|---|---|
OngoingActivity? |
the data, or null of the notification doesn't contain Ongoing Activity data. |
hasOngoingActivity
java-static fun hasOngoingActivity(notification: Notification): Boolean
Checks if the given notification contains information of an ongoing activity.