The app uses the Geocoder object. It works fine on my stock Froyo Nexus One. But then I run the exact same app on a different device (an Advent Vega 10" tablet also running Froyo) and I get this exception: Service not Available. The method I'm using is getFromLocationName()
, I'm building against the Android 1.6 Google API.
I'm aware of an issue where this exception is thrown on the emulator, but I suspect this is different. Why would it be thrown on one device running Froyo but not another?
The app is a location app, and as the tablet has no GPS or mobile network, in a scenario where the Wi-Fi connection doesn't provide a location, the user must manually specify it, so not being able to use the Geocoder object is bad news.
I could add a way for the user to select the location on a map, but it's not ideal. Possibly I could use the Google Maps API directly, but I'm keen to understand the nature of the issue first as would be nice to have an easier solution.
Hopefully in a future release Android will include an OS-level "default location" for non-Geocoder devices, so location-aware apps work out of the box on devices like Google TV.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…