Język

ServiceAttribute Class

Definition

Generates a /manifest/application/service element within 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
Inheritance
ServiceAttribute
Attributes
Implements

Remarks

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.

Constructors

Name Description
ServiceAttribute()

Constructs and initializes a new ServiceAttribute instance.

Properties

Name Description
Description

Gets or sets descriptive text for the service's manifest declaration.

DirectBootAware

Gets or sets whether the service declares that it can run before the user enters unlock credentials.

Enabled

Whether or not the service can be instantiated by the system.

Exported

Whether or not the service can be launched by components of other applications.

ForegroundServiceType

Gets or sets the types of foreground work declared by the service.

Icon

An icon representing the service.

IsolatedProcess

Gets or sets the request to run the service in an isolated process.

Label

A user-readable label for the service.

Name

The name of the class that implements the service.

Permission

The name of a permission that clients must have to launch the service.

Process

The name of the process in which the service should run.

RoundIcon

Gets or sets the drawable resource used as the service's round icon.

Explicit Interface Implementations

Name Description
IJniNameProviderAttribute.Name

Gets the attribute's name with a null value replaced by an empty string.

Applies to