Share via


AppOpsManager.IsOpActive(String, Int32, String) Method

Definition

Checks whether the given op for a package is active, i.

[Android.Runtime.Register("isOpActive", "(Ljava/lang/String;ILjava/lang/String;)Z", "GetIsOpActive_Ljava_lang_String_ILjava_lang_String_Handler", ApiSince=30)]
public virtual bool IsOpActive (string op, int uid, string packageName);
[<Android.Runtime.Register("isOpActive", "(Ljava/lang/String;ILjava/lang/String;)Z", "GetIsOpActive_Ljava_lang_String_ILjava_lang_String_Handler", ApiSince=30)>]
abstract member IsOpActive : string * int * string -> bool
override this.IsOpActive : string * int * string -> bool

Parameters

op
String
uid
Int32
packageName
String

Returns

Attributes

Remarks

Checks whether the given op for a package is active, i.e. did someone call #startOp without #finishOp yet.

If you don't hold the android.Manifest.permission#WATCH_APPOPS permission you can query only for your UID.

Java documentation for android.app.AppOpsManager.isOpActive(java.lang.String, int, java.lang.String).

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