Ionic 2 - Background Location Permissions, Open settings

Hi!

I am trying to verify for Location permissions and open Settings view if not enabled, but after change permission to always and back to the app, the app is freezing.

Any idea or help please?

Thank you.

Hmm, probably what’s happening is that when the permissions change, the app does not get updated. So it will try to call the location API (thinking it can) get caught in an error, and lock up.

You might want to give the diagnostic plugin as a way to catch any errors.

Thank you for your help @mhartington! As always you always help!

I must say finally I am opening settings and after 3 seconds reloading the app with ( window.location = ‘index.html’; ), I don’t like the solution, but this way its working…

backgroundGeolocation.showLocationSettings();

setTimeout(() => {
    window.location = 'index.html'; 
}, 3000);

Thank you!

48%20AM

How to get this type of permission popup.