Is there a way to check if a list of permissions have already been granted in React Native using the PermissionsAndroid API, similar to how PermissionsAndroid.requestMultiple() can be used to request multiple permissions? I'm looking for a method like PermissionsAndroid.checkMultiple() to allow me to check if a list of permissions were already granted.
I would appreciate some suggestions on this.
The simple wrapper would be something like this (not the same thing, but solves the problem):
const checkPermissions = (permissions: Permission[]): Promise<boolean[]> => {
return Promise.all(permissions.map((p) => PermissionsAndroid.check(p)))
}
let granted = await checkPermissions([
PermissionsAndroid.PERMISSIONS.CAMERA,
PermissionsAndroid.PERMISSIONS.RECORD_AUDIO
])
console.log(granted) // [false,false]