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
)
Public Overridable Function GrantPermissions (
packageName As String,
permissions As IList(Of String)
) As Integer
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:
Int32intSuccess in case of success,
otherwise a possible error code, matching one of the
AppManagerException error constants.
Exceptions 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