Redirect the user to device settings to enable services such as location
complete
Ahmed Samy
For some apps enabling location services is crucial for its functionality. So prompting user to enable location services by redirecting him to device settings to do so is a must for such cases. Also a listener to keep track of user's manipulating those services during using the app to prompt the user to re-enable the service if disabled.
G Williams
In my opinion, this should be re-opened for Android devices. Launching the app settings intent:
IntentLauncherAndroid.startActivityAsync(IntentLauncherAndroid.ACTION_APPLICATION_DETAILS_SETTINGS, data)
requires a second parameter (data), which should be derived from a data URI but is a struggle to construct at this time (Expo.Linking.parse unfortunately doesn't appear to prepare an object in the correct format, though it was my best guess as a possible substitute for Android Uri.parse).
More info: https://stackoverflow.com/questions/32822101/how-to-programmatically-open-the-permission-screen-for-a-specific-app-on-android
Brent Vatne
complete
Brent Vatne
this is what IntentLauncherAndroid is for: https://docs.expo.io/versions/latest/sdk/intent-launcher.html
on iOS you can open it like this:
Linking.openURL('app-settings:');
-- you can google other schemes for more infoas for a listener, i'm not sure that's particularly useful to build into expo as you can build it yourself just using Permissions.getAsync. you could check both 1) before people use a thing and 2) when app is foregrounded (using AppState subscription) and that should cover it