Reputation: 5167
How are you, I am building Expo project and I need to ask camera permission. But it don't open windows for permission
const { status1 } = await Permissions.getAsync(Permissions.CAMERA);
if (status1 !== 'granted') {
alert('please give CAMERA permission!')
}
const { status2 } = await Permissions.getAsync(Permissions.CAMERA_ROLL);
if (status2 !== 'granted') {
alert('please give CAMERA_ROLL permission!')
}
I see alert because there are no permissions, but it don't show windows to give permissin, there is no way.
Where else can I give those permission for Expo project? Thanks
Upvotes: 0
Views: 578
Reputation: 3219
Change Permissions.getAsync
to Permissions.askAsync
. See here for more info.
Upvotes: 1