AppState

@JsonClass(generateAdapter = true)
data class AppState(    val locationPermission: LocationPermission,     val notificationPermission: NotificationPermission,     val batteryLevel: Int,     val lastRuleUpdate: Instant?,     val viewState: ViewState,     val foregroundServiceEnabled: Boolean) : Parcelable

AppState stores the state of the Application when the event(Entry/Exit) was triggered by the SDK

Example:

AppState(locationPermission=ALWAYS,
batteryLevel=43,
lastRuleUpdate=2023-11-15T00:48:09.350Z,
viewState=FOREGROUND_SERVICE,
foregroundServiceEnabled=true)

Constructors

Link copied to clipboard
fun AppState(    locationPermission: LocationPermission,     notificationPermission: NotificationPermission,     batteryLevel: Int,     lastRuleUpdate: Instant?,     viewState: ViewState,     foregroundServiceEnabled: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val batteryLevel: Int

Battery level of the device when the event was triggered

Link copied to clipboard
val foregroundServiceEnabled: Boolean

true if notification is set by App before starting the Geo-trigger/Tempo

Link copied to clipboard
val lastRuleUpdate: Instant?

Time when the last rule download occurred from SDK

Link copied to clipboard
val locationPermission: LocationPermission

level of permission granted for Location Access like(always/while_using/denied/restricted)

Link copied to clipboard
val notificationPermission: NotificationPermission

Notification permission access(granted/denied)

Link copied to clipboard
val viewState: ViewState

App running in background/foreground/foreground_service mode

Functions

Link copied to clipboard
fun toJson(): String

Convert this object to JSON.

Inherited functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)