I had some problems with the Geolocation Cordova plugin (org.apache.cordova.geolocation). It works great on iOS, but on Android it doesn't work at all.
As I understand it, the plugin used its own Android code, but at some point it was deleted because it was too buggy / slow, and the embedded implementation of HTML5 was much more stable and fast.
If I use the latest version of the plugin (0.3.2), which still has its own code, it works (but slowly and really, not always). But when it returns, the position object is always filled.
If I use the latest version of the plugin (1.0.1), getCurrentPosition () immediately returns with an empty object ({}). This does not cause an error.
If I completely remove the plugin and manually add permissions to the Android project:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
The same thing is happening. I just can't get it to work, but that doesn't make sense. The Android console does not display errors. Any thoughts?
source share