Geolocation.latLng() not working in android

I’m using mdg:geolocation package and I’m trying to run it in android device but I’m not getting lat and lang anymore, when I tried this few months back it is working fine

I’m using 1.0.3* version of that package

chrom is throwing above warning which takes me to this page

as it is a warning it should work.

I even tried to run the app by giving --mobile-server=https://myapp.com still it is not working.

any ideas?

My versions
meteor - 1.1.* ( not the latest one)
geolocation- 1.0.3

EDIT

I tried using navigator object like below

var onSuccess = function(position) {
   console.log('Latitude: '          + position.coords.latitude          + '\n' +
  'Longitude: '         + position.coords.longitude         + '\n' +
  'Altitude: '          + position.coords.altitude          + '\n' +
  'Accuracy: '          + position.coords.accuracy          + '\n' +
  'Altitude Accuracy: ' + position.coords.altitudeAccuracy  + '\n' +
  'Heading: '           + position.coords.heading           + '\n' +
  'Speed: '             + position.coords.speed             + '\n' +
  'Timestamp: '         + position.timestamp                + '\n');
};

// onError Callback receives a PositionError object
//
function onError(error) {
  console.log('code: '    + error.code    + '\n' +
  'message: ' + error.message + '\n');
}

navigator.geolocation.getCurrentPosition(onSuccess, onError);

I didn’t get any logs in console no error or success callbacks are called

@martijnwalraven any guess here?
I strongly feel the issues is, meteor sets it’s origin as meteor.local instead of localhost, so according to new chrome updates, it will either allow https or localhost, but here it is meteor.local so chrome not allowing updates

When I used it, I’ve fixed my issues with:
1- Wrapped in a autorun() block (it’s a reactive variable)
2- Force a random position in Chrome’s dev console (dunno why, but it was a good thing to do)

Hey thanks for the reply, can you elaborate this point? I’m lost here

  • Force a random position in Chrome’s dev console (dunno why, but it was a good thing to do)