I haven’t not been able to find an example of how to use cordova.plugins.diagnostic.requestLocationAuthorization in an Ionic 4 app.
Meaning, how to install the plugin and the import statement. I’ve created an Ionic 4 social media app and I’d like to prompt users for access to device location. It’s working fine in Android but iOS is not consistent. It will sometimes get the device location while testing on a real device and sometimes when I uninstall and redeploy it won’t. It just seems random at this point whether or not it retrieves and saves the device location to the backend for iOS devices. So I’d like to prompt users if I query the backend and don’t have their device location.
Any help would be greatly appreciated.
Again I’m using: Ionic -v 5.4.13
9.0.0 (cordova-lib@9.0.1)
I can actually use this.diagnostic.getLocationAuthorizationStatus() to get the autorization status from iOS. But I need a way to prompt users in case it’s not activated.
1 post - 1 participant