Click or drag to resize

AppManagerGrantPermissions Method

Call this method to grant an application the specified permissions.

Namespace:  Com.Datalogic.Device.App
Assembly:  datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public virtual int GrantPermissions(
	string packageName,
	IList<string> permissions
)

Parameters

packageName
Type: SystemString
- String The application to grant permissions to.
permissions
Type: System.Collections.GenericIListString
- ArrayList The list of permissions to be granted.

Return Value

Type: Int32
intSuccess in case of success, otherwise a possible error code, matching one of the AppManagerException error constants.
Exceptions
ExceptionCondition
AppManagerException - in case of error, when exceptions are enabled through the ErrorManager singleton.
Remarks

Call this method to grant an application the specified permissions.


The method works in best effort. If almost one of the requested permissions is not granted an error is returned. In case of error to check which permissions are granted use

with the flag

to get the PackageInfo of the application with the permissions information.

[Android Documentation]

See Also