requestPermission

fun requestPermission(activity: Activity, permissionToRequest: Pair<String, Boolean>): Boolean

Simply call this method to request one permission

Return

true if the permission is already granted, false otherwise

Parameters

activity

: the activity used for the permissions request

permissionToRequest

: a permission is defined by a Pair of String for the permission name and a Boolean for indicates whereas the permission is required or not.