Update: Google hasn't bothered to fix this open issue from April:
http://code.google.com/p/android/issues/detail?id=2545

The workaround may be found in Comment 38.

--Ben

On Sep 16, 12:34 am, BJP <[email protected]> wrote:
> I'm having a problem where I am able to update the location in the
> Android Emulator from the Eclipse DDMS exactly once per time an
> activity is loaded, but no more.
>
> I discovered the problem in my application where Activity2 (which
> accesses the GPS) is started by Activity1 (which doesn't do anything
> particularly interesting); when Activity2 is started, I can update the
> GPS position using the Manual input in Location Controls in the DDMS
> and everything works fine.  However, then I get a LogCat message
> "TTFF: XXXX" where XXXX is an apparently random number, and then the
> GPS will no longer update.  However, if I click the Back button in the
> emulator to return to Activity1, and then use Activity1 to restart
> Activity2, I can enter a new GPS location.  But, I can't enter a
> second one; tries to do so result in no apparent action.  My
> application works perfectly well on a real device with a real GPS
> signal.
>
> To test things further, I closed and reopened the emulator,
> immediately closed my application (from Activity1, which doesn't do
> anything besides load an XML layout and attach an onClick listener to
> a button), and loaded Google Maps.  I observed the same behavior here;
> I could send one position that Google Maps would respond to, but any
> subsequent attempts to update position fail.  When I close Google Maps
> and reopen it, I am able to send exactly one more location update from
> DDMS.
>
> The distance between my subsequent location updates is usually 0.02
> degrees, but I have tried it with up to 5 degrees also.  My
> application does not use ACCESS_MOCK_LOCATION because I want to switch
> back and forth between testing on a physical device and testing on the
> emulator without having to update the manifest for each build, plus it
> seems like setting a permission for my application shouldn't have
> anything to do with Google Maps on the emulator.
>
> Any ideas?  I would try loading up a GPX path, but the DDMS seems
> broken there 
> too:http://groups.google.com/group/android-developers/browse_thread/threa...
>
> Thanks,
> Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to