Geolocation in emulator


Last Updated:

  1. smaryka

    smaryka New Member This Topic's Starter

    Joined:
    Oct 22, 2010
    Messages:
    4
    Likes Received:
    0
    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
     

    Advertisement
  2. smaryka

    smaryka New Member This Topic's Starter

    Joined:
    Oct 22, 2010
    Messages:
    4
    Likes Received:
    0
    I have answered my own question. You need to use the Google APIs in your project and AVM not the Android APIs.

    Steve
     

Share This Page

Loading...