ServiceInfo.ForegroundServiceTypeLocation Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.
Constant corresponding to location
in
the android.R.attr#foregroundServiceType
attribute.
[Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_LOCATION", ApiSince=29)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)]
public const Android.Content.PM.ForegroundService ForegroundServiceTypeLocation = 8;
[<Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_LOCATION", ApiSince=29)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.", true)>]
val mutable ForegroundServiceTypeLocation : Android.Content.PM.ForegroundService
Field Value
Value = 8Implements
- Attributes
Remarks
Constant corresponding to location
in the android.R.attr#foregroundServiceType
attribute. GPS, map, navigation location update.
Starting foreground service with this type from apps targeting API level android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE
and later, will require permission android.Manifest.permission#FOREGROUND_SERVICE_LOCATION
and one of the following permissions: android.Manifest.permission#ACCESS_COARSE_LOCATION
, android.Manifest.permission#ACCESS_FINE_LOCATION
.
Java documentation for android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.