Hello I tried to follow a tutorial on youtube on how to make the app open the location settings if the user has not enabled location services. However on his computer it is working ( he is using android emulator though) me with my Iphone XS (which I believe works on latest IOS version) does not do anything.
I've tried to open just setting or even a link on internet but it does not work
openSetting = () => {
if(Platform.OS=='ios'){
Linking.openURL('app-settings:')
}
else{
IntentLauncherAndroid.startActivityAsync(
IntentLauncherAndroid.ACTION_LOCATION_SOURCE_SETTINGS
);
}
this.setState({openSetting:false});
}
<Button onPress={() => this.setState({isLocationModalVisible:false, openSetting:true})}
title ="Enable Location Services"/>
This is how it will work in Expo SDK 45.0:
Linking.openSettings()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With