AndroidForegroundServiceType class
Constant to specify the foreground service type on Android 14 and higher.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
- CAMERA → const int
- Constant corresponding to camera in the R.attr.foregroundServiceType attribute. Use the camera device or record video.
- CONNECTED_DEVICE → const int
- Constant corresponding to connectedDevice in the R.attr.foregroundServiceType attribute. Auto, bluetooth, TV or other devices connection, monitoring and interaction.
- DATA_SYNC → const int
- Constant corresponding to dataSync in the R.attr.foregroundServiceType attribute. Data(photo, file, account) upload/download, backup/restore, import/export, fetch, transfer over network between device and cloud.
- HEALTH → const int
- Constant corresponding to health in the R.attr.foregroundServiceType attribute. Health, wellness and fitness.
- LOCATION → const int
- Constant corresponding to location in the R.attr.foregroundServiceType attribute. GPS, map, navigation location update.
- MANIFEST → const int
- A special value indicates to use all types set in manifest file.
- MEDIA_PLAYBACK → const int
- Constant corresponding to mediaPlayback in the R.attr.foregroundServiceType attribute. Music, video, news or other media playback.
- MEDIA_PROJECTION → const int
- Constant corresponding to mediaProjection in the foregroundServiceType attribute.
- MICROPHONE → const int
- Constant corresponding to microphone in the R.attr.foregroundServiceType attribute. Use the microphone device or record audio.
- NONE → const int
- The default foreground service type if not been set in manifest file.
- PHONE_CALL → const int
- Constant corresponding to phoneCall in the R.attr.foregroundServiceType attribute. Ongoing operations related to phone calls, video conferencing, or similar interactive communication.
- REMOTE_MESSAGING → const int
- Constant corresponding to remoteMessaging in the R.attr.foregroundServiceType attribute. Messaging use cases which host local server to relay messages across devices.
- SHORT_SERVICE → const int
- A foreground service type for "short-lived" services, which corresponds to shortService in the R.attr.foregroundServiceType attribute in the manifest.
- SPECIAL_USE → const int
- Constant corresponding to specialUse in the R.attr.foregroundServiceType attribute. Use cases that can't be categorized into any other foreground service types, but also can't use JobInfo.Builder APIs.
- SYSTEM_EXEMPTED → const int
- Constant corresponding to systemExempted in the R.attr.foregroundServiceType attribute. The system exempted foreground service use cases.