@misterjunio yes I have enabled it:
M
Save
Saving
MoreScratch
@MoreScratch
0
Reputation
3
Posts
544
Profile views
0
Followers
0
Following
Posts made by MoreScratch
-
RE: Geolocation not working on Android
@munsterlander I am using the Cloud IDE. However, I created a new project using LocalKit and using the docs here: https://docs.monaca.io/en/sampleapp/tips/gps/ and enabling the Cordova Geolocation plugin and I still can’t get a location.
-
Geolocation not working on Android
I can’t find a reliable way to get the geolocation plugin working on Android. I am using CLI 6.2.0 and v2.4.2 of the plugin. I don’t a “manifest” in my project. I see a config.xml under the Android directory. If I look at that, there is no permissions set for the geolocation plugin. Can someone provide me with a working example?
Here is my code:
function getUsersLocation( callback ) { navigator.geolocation.getCurrentPosition( function( position ) { geo.lat = position.coords.latitude; geo.lon = position.coords.longitude; if ( typeof callback !== "undefined" && typeof callback === "function" ) { callback(); } }, geolocationError, { maximumAge: 3000, timeout: 10000, enableHighAccuracy: true } ); } function geolocationError( error ) { ... show a dialog... }