Hi I have recently noticed that when Running the function geoCoder.getFromLocationName() on android 2.2 (Froyo) then i Receive a IOExeption (Which does not occur on other SDK versions).
After some reserch i have found suggentions to add the following Permisions:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
However this does not solve the problem, and this appears to be a Android SDK Bug.
Is there a knows solution to this problem?
EDIT: Here is the stack trace though it is not particularly helpful the inner stack trace is null so not great.
08-26 18:37:53.831: WARN/System.err(347): at android.location.Geocoder.getFromLocationName(Geocoder.java:159)
08-26 18:37:53.831: WARN/System.err(347): at com.Finko.HomeScreen.onCreate(HomeScreen.java:32)
08-26 18:37:53.851: WARN/System.err(347): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-26 18:37:53.851: WARN/System.err(347): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
08-26 18:37:53.851: WARN/System.err(347): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-26 18:37:53.861: WARN/System.err(347): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-26 18:37:53.861: WARN/System.err(347): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-26 18:37:53.871: WARN/System.err(347): at android.os.Handler.dispatchMessage(Handler.java:99)
08-26 18:37:53.882: WARN/System.err(347): at android.os.Looper.loop(Looper.java:123)
08-26 18:37:53.882: WARN/System.err(347): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-26 18:37:53.891: WARN/System.err(347): at java.lang.reflect.Method.invokeNative(Native Method)
08-26 18:37:53.903: WARN/System.err(347): at java.lang.reflect.Method.invoke(Method.java:521)
08-26 18:37:53.903: WARN/System.err(347): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-26 18:37:53.911: WARN/System.err(347): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-26 18:37:53.911: WARN/System.err(347): at dalvik.system.NativeStart.main(Native Method)
now then,
It seems to me that this is a problem with the emulator… The getFromLocationName method seems to work just fine on the devices (at least I’m not getting reports of it not working from any users)
Whilst this is a total pain whilst developing and debugging on this version of Android, it seems you can use it.
I ended up adding a couple of text boxes that I’d just stick long and lat into whilst debugging, then removing before final build.
Not the best answer, but it might get you moving man. Good luck with it