Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android WebView geolocation

Hi

I can't get geolocation working on Android 1.6 or 2.2.

The KitchenSink geolocation example doesn't work (location is currently unavailable) and I can't get navigator.geolocation working in a WebView either. Neither the success or error callback fires, but navigator.geolocation is indeed not undefined.

What am I doing wrong? I've tried the following guide but no joy: http://localadda.wordpress.com/2010/11/26/appcelerator-android-emulator-geolocation-issue-location-is-currently-unavailable/

Code sample:

if ( navigator.geolocation ) {
navigator.geolocation.getCurrentPosition( function() {

    alert( 'awesome!' );

}, function() {

    alert( 'not so awesome' );

});

}

— asked November 30th 2010 by John Johnson
  • android
  • bug
  • geolocation
  • gps
  • kitchensink
0 Comments

3 Answers

  • Update: if I add the /tools/ folder to my PATH variable and keep ddms open I get a new error message in the KitchenSink example: "No providers are available".

    http://img12.imageshack.us/img12/8301/screenshot20101130at112.png

    — answered November 30th 2010 by John Johnson
    permalink
    0 Comments
  • Anyone?

    — answered December 1st 2010 by John Johnson
    permalink
    0 Comments
  • I also get "No providers are available" when trying to get the current geolocation, however I'm using the 1.7 CI builds. Any fix for this? It used to work with 1.5…

    — answered April 26th 2011 by Justin Toth
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.