ForegroundServiceType enum
The available foreground service types
See https://developer.android.com/reference/android/content/pm/ServiceInfo for required permissions and other details
Values
- manifest → const ForegroundServiceType
-
A special value indicates to use all types set in manifest file
const ForegroundServiceType(-1) - none → const ForegroundServiceType
-
The default foreground service type if not been set in manifest file
const ForegroundServiceType(0) - dataSync → const ForegroundServiceType
-
Data(photo, file, account) upload/download, backup/restore, import/export, fetch, transfer over network between device and cloud
const ForegroundServiceType(1) - mediaPlayback → const ForegroundServiceType
-
Music, video, news or other media playback
const ForegroundServiceType(2) - phoneCall → const ForegroundServiceType
-
Ongoing operations related to phone calls, video conferencing, or similar interactive communication
const ForegroundServiceType(4) - location → const ForegroundServiceType
-
GPS, map, navigation location update
const ForegroundServiceType(8) - connectedDevice → const ForegroundServiceType
-
Auto, bluetooth, TV or other devices connection, monitoring and interaction
const ForegroundServiceType(16) - mediaProjection → const ForegroundServiceType
-
Use for MediaProjection
const ForegroundServiceType(32) - camera → const ForegroundServiceType
-
Use the camera device or record video
const ForegroundServiceType(64) - microphone → const ForegroundServiceType
-
Use the microphone device or record audio
const ForegroundServiceType(128) - health → const ForegroundServiceType
-
Health, wellness and fitness
Added in SDK 34
const ForegroundServiceType(256) - remoteMessaging → const ForegroundServiceType
-
Messaging use cases which host local server to relay messages across devices
Added in SDK 34
const ForegroundServiceType(512) - systemExempted → const ForegroundServiceType
-
Added in SDK 34
const ForegroundServiceType(1024) - shortService → const ForegroundServiceType
-
Added in SDK 34
const ForegroundServiceType(2048) - specialUse → const ForegroundServiceType
-
Added in SDK 34
const ForegroundServiceType(1073741824)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → int
-
The integer value
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
ForegroundServiceType> - A constant List of the values in this enum, in order of their declaration.