Diagnostic plugin for enabling geolocation - How to watch for "true/false"

Hey everyone,

So I have a modal that pops up in my app that prompts the user that they need to have location services enabled (if they don’t), and when they click a button, it’ll take them to the app settings page where they can set their location settings.

All of this works fine, but my question is: When they are finished changing their settings and go back to the app, is there a way for my app to automatically determine that the location settings are enabled?

I’m using the Ionic Native Diagnostic plugin to accomplish this and I utilize the switchToSettings() function which returns a promise when called. Does anyone know a way where I can call that function again upon returning to the app? Or perhaps setup some kind of observable that emits a new value based on the settings that get changed?

Thanks in advance!

1 Like

There is a requestLocationAuthorization() method in that Diagnostic plugin. Is it any use to you?