CheckPermission checks whether the permission of a particular component has been granted.
Example - check and get permissions
function OnStart()
{
var check = app.CheckPermission( "Camera,ExtSDcard,Network,Storage" );
if( check )
{
app.GetPermission( check, PermissionResult );
}
else alert( "everything ok!" );
}
function PermissionResult( ungranted )
{
alert( "ungranted: " + ungranted );
}
from native import app
def OnStart():
check = app.CheckPermission( "Camera,ExtSDcard,Network,Storage" )
if check:
app.GetPermission( check, PermissionResult )
else:
app.Alert( "everything ok!" )
def PermissionResult( ungranted ):
app.Alert( "ungranted: " + ungranted )