共用方式為


ServiceInfo.ForegroundServiceTypeHealth Field

Definition

Caution

This constant will be removed in the future version. Use Android.Content.PM.ForegroundService enum directly instead of this field.

Constant corresponding to health in the android.R.attr#foregroundServiceType attribute.

[Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_HEALTH", ApiSince=34)]
[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 ForegroundServiceTypeHealth = 256;
[<Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_HEALTH", ApiSince=34)>]
[<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 ForegroundServiceTypeHealth : Android.Content.PM.ForegroundService

Field Value

Value = 256

Implements

Attributes

Remarks

Constant corresponding to health in the android.R.attr#foregroundServiceType attribute. Health, wellness and fitness.

The caller app is required to have the permissions android.Manifest.permission#FOREGROUND_SERVICE_HEALTH and one of the following permissions: android.Manifest.permission#ACTIVITY_RECOGNITION, android.Manifest.permission#BODY_SENSORS, android.Manifest.permission#HIGH_SAMPLING_RATE_SENSORS.

Java documentation for android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_HEALTH.

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.

Applies to