Android.App.AppOpsManager.CheckOp Method
Do a quick check for whether an application might be able to perform an operation.

Syntax

[Android.Runtime.Register("checkOp", "(Ljava/lang/String;ILjava/lang/String;)I", "GetCheckOp_Ljava_lang_String_ILjava_lang_String_Handler")]
[return:Android.Runtime.GeneratedEnum]
public virtual AppOpsManagerMode CheckOp (string op, int uid, string packageName)

Parameters

op
The operation to check. One of the OPSTR_* constants.
uid
The user id of the application attempting to perform the operation.
packageName
The name of the application attempting to perform the operation.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.SecurityExceptionIf the app has been configured to crash on this op.

Remarks

Do a quick check for whether an application might be able to perform an operation. This is not a security check; you must use AppOpsManager.NoteOp(string, System.Int32, System.Int32) or AppOpsManager.StartOp(string, System.Int32, System.Int32) for your actual security checks, which also ensure that the given uid and package name are consistent. This function can just be used for a quick check to see if an operation has been disabled for the application, as an early reject of some work. This does not modify the time stamp or other data about the operation.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0