Click or drag to resize

AppManagerSetModeAppOps Method

Call this method to set the mode of the specified app-ops permissions of a given application.

Namespace:  Com.Datalogic.Decode
Assembly:  datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
public virtual int SetModeAppOps (string packageName, System.Collections.Generic.IList<string> permissions, int mode);

Parameters

packageName
Type: System.String
String The application to grant permissions to. If the application is a system application the method fails.
permissions
Type: System.Collections.Generic.IList
ArrayList The list of app-ops permissions to be set.
mode
Type: System.Int32
int AppOpsManager.MODE_ALLOWED : the given application is allowed to perform the given operation. AppOpsManager.MODE_IGNORED : the given application not allowed to perform the given operation, and the attempt should silently fail (it should not cause the app to crash). AppOpsManager.MODE_ERRORED : the given application not allowed to perform the given operation, and the attempt should cause it to have a fatal error.

Return Value

Type: System.Int32
int AppManagerException.SUCCESS in case of success, otherwise a possible error code, matching one of the AppManagerException error constants.

Exceptions
Exception Condition
AppManagerException in case of error, when exceptions are enabled through the ErrorManager singleton.
Remarks
Call this method to set the mode of the specified app-ops permissions of a given application.
If the application is a system application the method fails and returns the exception AppManagerException.SECURITY_ERROR or the corresponding error.

[Android Documentation]

See Also

Reference