Language

Resource.Attribute.NativeService Field

Definition

When enabled for a service with an isolated process, the system does not initialize the Android Runtime in that process.

[Android.Runtime.Register("nativeService", ApiSince=37)]
public const int NativeService = 16844462;
[<Android.Runtime.Register("nativeService", ApiSince=37)>]
val mutable NativeService : int

Field Value

Value = 16844462
Attributes

Remarks

When enabled for a service with an isolated process, the system does not initialize the Android Runtime in that process. Instead the system loads a library named libmain.so into the process and then starts the service from a function named ANativeService_onCreate in the library. The library and function names can be configured by setting the properties PackageManager.PROPERTY_NATIVE_SERVICE_LIBRARY_NAME and PackageManager.PROPERTY_NATIVE_SERVICE_FUNCTION_NAME respectively.

Attempts to start services that enable this attribute may fail in system running older Android version than that this feature is introduced. Users must check the API level before starting the services.

This flag is ignored if isolatedProcess is false or isn't specified.

May be a boolean value, such as "true" or "false".

Android reference for android.R.attr.nativeService.

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.

Applies to