requestPermissionsSafely

fun requestPermissionsSafely(permissions: Array<String>, onPermissionGranted: () -> Unit? = null, onPermissionNotGranted: () -> Unit? = null)

Function to request permission to user

Parameters

permissions

list of permissions to request

onPermissionGranted

action to do when permission granted

onPermissionNotGranted

action to do when permission not granted