Cordova geolocation work on desktop browser, but not in native android and mobile browser android?

450 views
Skip to first unread message

ega radiegtya

unread,
Sep 21, 2014, 3:07:30 AM9/21/14
to meteo...@googlegroups.com
Hi, Everyone.

I have a question why Cordova geolocation work on desktop browser, but not in native android and mobile browser android?

after i am adding "meteor add cordova:org.apache.cord...@0.3.9"

then using this simple code:
    Meteor.startup(function() {
        navigator.geolocation.getCurrentPosition(function(position) {
            alert(position.coords.latitude)
        });
    });

it's working perfectly in my desktop browser. But when I am testing in android emulator and accessing from real device mobile browser, the latitude/geolocation functionality doesn't work.

Please help. Thanks

ega radiegtya

unread,
Sep 23, 2014, 7:19:17 AM9/23/14
to meteo...@googlegroups.com
Any idea about this? I am still stuck.

Philip Nuzhnyy

unread,
Oct 1, 2014, 5:26:02 PM10/1/14
to meteo...@googlegroups.com
i think it has to do with the cordova plugin itself. updating to the latest version did the trick for me (on iOS 8). Pull request is pending here (https://github.com/meteor/mobile-packages/pull/6)  

ega radiegtya

unread,
Oct 1, 2014, 10:39:42 PM10/1/14
to meteo...@googlegroups.com
Hi Philip,

Thanks for the answer. Now it's work when I am using mdg:geolocation package rather than default cordova geolocation.
I don't know why (it still error though I am updating the cordova geolocation package).

Regards
Reply all
Reply to author
Forward
0 new messages