Expo 27.0.1
RN 27.0.2
Trying to use location services and I do not receive the Permissions prompt and the request is denied on the standalone app only. Works fine inside of Expo.
Permission requests for Images and Camera work as expected in other parts of the app.
The code I am using is straight from the documentation, (with added Alert to verify denied permission)
_getLocationAsync = async () => {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
this.setState({
locationResult: 'Permission to access location was denied',
});
}
Alert.alert(
'PERMISSION STATUS',
status,
[
{text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},
],
{ cancelable: false }
)
let location = await Location.getCurrentPositionAsync({ enableHighAccuracy: true });
this.setState({
latitude: location.coords.latitude,
longitude: location.coords.longitude
});
};
The app.json file:
"android": {
"package": "com.vinderdev.app",
"permissions": [
"LOCATION",
"CAMERA",
"CAMERA_ROLL",
"READ_INTERNAL_STORAGE",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE"
],
Any and all insight would be greatly appreciated.