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.
Entries
An activity is entering the started state (MainActivity.onStart()). The app is transitioning from a user-visible state, which is the primary documented exemption.
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.
ACTION_BOOT_COMPLETED or ACTION_MY_PACKAGE_REPLACED. Both are explicitly exempt from the background-start restriction.
Properties
Functions
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.)
Returns an array containing the constants of this enum type, in the order they're declared.