const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
{
title: 'Cool Photo App Camera Permission',
message: 'Cool Photo App needs access to your camera ' +
'so you can take awesome pictures.'
}
)
if (granted === PermissionsAndroid.RESULTS.GRANTED || granted === true) {
console.log("succeed")
} else {
console.log("location denied");
}
}
requestLocationPermission();
每当我运行代码时,它总是在控制台上显示“location denied”。我正在使用react-native版本0.55。