SerializationHelper


class SerializationHelper


Class used to manage Ongoing Activity information as part of a Bundle or Notification.

Summary

Public functions

java-static Unit
copy(sourceBundle: Bundle, destinationBundle: Bundle)

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?
create(bundle: Bundle)

Deserializes the OngoingActivity from a Bundle.

java-static OngoingActivity?
create(notification: Notification)

Deserializes the OngoingActivity from a notification.

java-static Boolean

Checks if the given notification contains information of an ongoing activity.

Public functions

copy

Added in 1.0.0
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)

Parameters
sourceBundle: Bundle

The bundle to get the Ongoing Activity data from

destinationBundle: Bundle

The bundle to put the Ongoing Activity data into.

create

Added in 1.0.0
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

Added in 1.0.0
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

Added in 1.0.0
java-static fun hasOngoingActivity(notification: Notification): Boolean

Checks if the given notification contains information of an ongoing activity.