getFromLocationName()
alsways throws a NullPointerException
in the Android 2.2 emulator but it's working fine in the Android 1.6 emulator.
This is my code snippet:
Geocoder geo = new Geocoder(GeocoderAppActivity.this, Locale.getDefault());
try {
List<Address> add = geo.getFromLocationName("Tagore Road,Rajkot", 1);
while (add.size() == 0) {
Log.e("Girish", "in while");
add = geo.getFromLocationName("Tagore Road,Rajkot", 1);
}
}
What is wrong?