ServiceAttribute 类

定义

/manifest/application/serviceAndroidManifest.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 实例。

属性

DirectBootAware

/manifest/application/serviceAndroidManifest.xml生成元素。

Enabled

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

Exported

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

ForegroundServiceType

/manifest/application/serviceAndroidManifest.xml生成元素。

Icon

表示服务的图标。

IsolatedProcess

/manifest/application/serviceAndroidManifest.xml生成元素。

Label

服务的用户可读标签。

Name

实现服务的类的名称。

Permission

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

Process

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

RoundIcon

/manifest/application/serviceAndroidManifest.xml生成元素。

适用于

另请参阅