Skip to content

Commit

Permalink
Add new foreground service types (#1957)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Apr 14, 2023
1 parent 2a66c69 commit cbfaba1
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,26 @@ class AndroidServiceForegroundType {
static const AndroidServiceForegroundType foregroundServiceTypeMicrophone =
AndroidServiceForegroundType(128);

/// Corresponds to [`ServiceInfo.FOREGROUND_SERVICE_TYPE_HEALTH`](https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_HEALTH).
static const AndroidServiceForegroundType foregroundServiceTypeHealth =
AndroidServiceForegroundType(256);

/// Corresponds to [`ServiceInfo.FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING`](https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING).
static const AndroidServiceForegroundType
foregroundServiceTypeRemoteMessaging = AndroidServiceForegroundType(512);

/// Corresponds to [`ServiceInfo.FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED`](https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED).
static const AndroidServiceForegroundType
foregroundServiceTypeSystemExempted = AndroidServiceForegroundType(1024);

/// Corresponds to [`ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE`](https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_SHORT_SERVICE).
static const AndroidServiceForegroundType foregroundServiceTypeShortService =
AndroidServiceForegroundType(2048);

/// Corresponds to [`ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE`](https://developer.android.com/reference/android/content/pm/ServiceInfo#FOREGROUND_SERVICE_TYPE_SPECIAL_USE).
static const AndroidServiceForegroundType foregroundServiceTypeSpecialUse =
AndroidServiceForegroundType(1073741824);

/// The integer representation.
final int value;

Expand Down

0 comments on commit cbfaba1

Please sign in to comment.