語言

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
屬性
實作

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

建構函式

名稱 Description
ServiceAttribute()

建構並初始化一個新 ServiceAttribute 實例。

屬性

名稱 Description
Description

生成/manifest/application/service一個元素。AndroidManifest.xml

DirectBootAware

生成/manifest/application/service一個元素。AndroidManifest.xml

Enabled

系統是否能實例化服務。

Exported

服務是否能由其他應用程式的元件啟動。

ForegroundServiceType

生成/manifest/application/service一個元素。AndroidManifest.xml

Icon

一個代表服務的圖示。

IsolatedProcess

生成/manifest/application/service一個元素。AndroidManifest.xml

Label

一個使用者可閱讀的服務標籤。

Name

實作該服務的類別名稱。

Permission

客戶端啟動服務必須取得的授權名稱。

Process

服務應執行的程序名稱。

RoundIcon

生成/manifest/application/service一個元素。AndroidManifest.xml

明確介面實作

名稱 Description
IJniNameProviderAttribute.Name

生成/manifest/application/service一個元素。AndroidManifest.xml

適用於