ServiceStartTrigger

Why MeshService is being asked to start.

Android 12+ only permits startForegroundService() from an allowlisted context. The trigger identifies which allowlist entry (if any) applies, so ForegroundStartPolicy can refuse a start that the platform would reject instead of letting it throw.

See the background-start exemption list.

Entries

Link copied to clipboard

An activity is entering the started state (MainActivity.onStart()). The app is transitioning from a user-visible state, which is the primary documented exemption.

Link copied to clipboard

The selected radio changed. Normally the result of the user picking a device in the UI, but the transition completes asynchronously and may land after the app has been backgrounded, at which point no exemption applies.

Link copied to clipboard

ACTION_BOOT_COMPLETED or ACTION_MY_PACKAGE_REPLACED. Both are explicitly exempt from the background-start restriction.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.