ServiceInfo.ForegroundServiceTypeSystemExempted 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 systemExempted
in
the android.R.attr#foregroundServiceType
attribute.
[Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED", ApiSince=34)]
[Android.Runtime.RequiresPermission("android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED")]
[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 ForegroundServiceTypeSystemExempted = 1024;
[<Android.Runtime.Register("FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED", ApiSince=34)>]
[<Android.Runtime.RequiresPermission("android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED")>]
[<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 ForegroundServiceTypeSystemExempted : Android.Content.PM.ForegroundService
Field Value
Value = 1024Implements
- Attributes
Remarks
Constant corresponding to systemExempted
in the android.R.attr#foregroundServiceType
attribute. The system exempted foreground service use cases.
<p class="note">Note, apps are allowed to use this type only in the following cases: <ul> <li>App has a UID < android.os.Process#FIRST_APPLICATION_UID
</li> <li>App is on Doze allowlist</li> <li>Device is running in Demo Mode</li> <li>Device owner app</li> <li>Profile owner apps</li> <li>Persistent apps</li> <li>Carrier privileged apps</li> <li>Apps that have the android.app.role.RoleManager#ROLE_EMERGENCY
role</li> <li>Headless system apps</li> <li>Device admin apps</li> <li>Active VPN apps</li> <li>Apps holding android.Manifest.permission#SCHEDULE_EXACT_ALARM
or android.Manifest.permission#USE_EXACT_ALARM
permission.</li> </ul> </p>
Java documentation for android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED
.
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.