tags:

views:

20

answers:

1

Hi, In geocoder class document i read below lines

The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform.

How can I know if my framwork(1.6) providing background service for Geocoder.Currently it gives me null result.

Thanks, aare.

+1  A: 

Instantiate the Geocoder class and try a query for which you can be reasonably sure there will be a result.

For example:

public boolean isGeocoderImplemented(Context context) {
    Geocoder coder = new Geocoder(context);
    List<Address> newyork = coder.getFromLocationName("New York", 10);
    return !newyork.isEmpty();
}
jhominal