语言

ServiceAttribute 类

定义

在 . 中/manifest/application/service生成元素AndroidManifest.xml

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
[System.Serializable]
public sealed class ServiceAttribute : Attribute, Java.Interop.IJniNameProviderAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)>]
[<System.Serializable>]
type ServiceAttribute = class
    inherit Attribute
    interface IJniNameProviderAttribute
继承
ServiceAttribute
属性
实现

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

构造函数

名称 说明
ServiceAttribute()

构造并初始化新 ServiceAttribute 实例。

属性

名称 说明
Description
DirectBootAware
Enabled

服务是否可以由系统实例化。

Exported

服务是否可以由其他应用程序的组件启动。

ForegroundServiceType
Icon

表示服务的图标。

IsolatedProcess
Label

服务的可读标签。

Name

实现服务的类的名称。

Permission

客户端必须必须启动服务的权限的名称。

Process

服务应在其中运行的进程的名称。

RoundIcon

显式接口实现

名称 说明
IJniNameProviderAttribute.Name

在 . 中/manifest/application/service生成元素AndroidManifest.xml

适用于