1. Are you ready for the Galaxy S20? Here is everything we know so far!

Geolocation in emulator

Discussion in 'Android Development' started by smaryka, Oct 23, 2010.

  1. smaryka

    smaryka Lurker
    Thread Starter

    I have tried over the last 2 days to get geolocation working in the browser on the emulator without success.

    I tried both the 2.2 and 2.1 releases with the following:

    • Simple AVM with GPS support added
    • Complete AVM with all support added
    • Device location and security setting to "Use GPS satellites"
    • Browser setting "Enable location"
    • Set location fix using both Emulator Controls from Eclipse, and Telnet "geo fix" commands
    • Host SDK platform both on Mac OS X 10.6.3 and Ubuntu 10.04
    I am testing against the site Hello World Geolocation sample with multiple providers

    In 2.1 I get the following exception whenever browser attempt to retrieve location data.

    10-23 14:31:10.487: ERROR/LocationManagerService(69): requestUpdates got exception:
    10-23 14:31:10.487: ERROR/LocationManagerService(69): java.lang.IllegalArgumentException: provider=network
    10-23 14:31:10.487: ERROR/LocationManagerService(69): at com.android.server.LocationManagerService.requestLocationUpdatesLocked(LocationManagerService.java:861)
    10-23 14:31:10.487: ERROR/LocationManagerService(69): at com.android.server.LocationManagerService.requestLocationUpdates(LocationManagerService.java:831)
    10-23 14:31:10.487: ERROR/LocationManagerService(69): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:79)
    10-23 14:31:10.487: ERROR/LocationManagerService(69): at android.os.Binder.execTransact(Binder.java:287)
    10-23 14:31:10.487: ERROR/LocationManagerService(69): at dalvik.system.NativeStart.run(Native Method)

    In this case LocationManager indicates provider=network, even though device setting specify GPS for location.

    In 2.2 I get no exception, but still no location.

    I have read a lot of different threads claiming problems and solutions related to geolocation in the emulator. Can anyone say definitively if geolocation does or does not work in the emulator? If yes, can anyone describe the configuration necessary to make it work.

    Thanks in advance.
    Steve
     



    1. Download the Forums for Android™ app!


      Download

       
  2. smaryka

    smaryka Lurker
    Thread Starter

    I have answered my own question. You need to use the Google APIs in your project and AVM not the Android APIs.

    Steve
     
Loading...
Similar Threads - Geolocation emulator
  1. AMAtaee
    Replies:
    1
    Views:
    803
  2. Charly Rose Diamond
    Replies:
    1
    Views:
    480
  3. Theappdev
    Replies:
    5
    Views:
    1,710
  4. fra8995
    Replies:
    0
    Views:
    2,195
  5. AndroMan2021
    Replies:
    0
    Views:
    1,557
  6. Nuno Feliciano
    Replies:
    0
    Views:
    1,735
  7. Kingdr
    Replies:
    0
    Views:
    1,283
  8. Ginjitzu
    Replies:
    0
    Views:
    937
  9. DrAbst
    Replies:
    1
    Views:
    370
  10. Debsmita Paul
    Replies:
    1
    Views:
    5,282

Share This Page

Loading...