Thomas wrote:
> Using Eclipse Ganymede
> I found various bits of code on the internet and put together some
> code to test javascript and Android attaching latitude, longitude to a
> browser form application. If I comment out the location loc code and
> execute the two assignment lines, things work as expected.  The
> javascript code in the browser picks up latitude, longitude.  With the
> loc code, the browser displays a blank screen for a moment and then
> goes away.  Any help and thoughts appreciated

getLastKnownLocation() may return null.

You can find a worked-out edition of the same sort of code at:

http://commonsware.com/AdvAndroid

Scroll down, download the source code via the link, and look at the
WebView/GeoWeb1 and WebView/GeoWeb2 projects.

For these, in the emulator, you need to use DDMS to feed in a fake GPS fix.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~---------~--~----~------------~-------~--~----~
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