共用方式為


AppOpsManager.IOnOpActiveChangedListener.OnOpActiveChanged Method

Definition

Called when the active state of an app-op changes.

[Android.Runtime.Register("onOpActiveChanged", "(Ljava/lang/String;ILjava/lang/String;Z)V", "GetOnOpActiveChanged_Ljava_lang_String_ILjava_lang_String_ZHandler:Android.App.AppOpsManager/IOnOpActiveChangedListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=30)]
public void OnOpActiveChanged (string op, int uid, string packageName, bool active);
[<Android.Runtime.Register("onOpActiveChanged", "(Ljava/lang/String;ILjava/lang/String;Z)V", "GetOnOpActiveChanged_Ljava_lang_String_ILjava_lang_String_ZHandler:Android.App.AppOpsManager/IOnOpActiveChangedListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=30)>]
abstract member OnOpActiveChanged : string * int * string * bool -> unit

Parameters

op
String

The operation that changed.

uid
Int32
packageName
String

The package performing the operation.

active
Boolean

Whether the operation became active or inactive.

Attributes

Remarks

Called when the active state of an app-op changes.

Java documentation for android.app.AppOpsManager.OnOpActiveChangedListener.onOpActiveChanged(java.lang.String, int, java.lang.String, boolean).

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