5

I have problem with call:

Geocoder geocoder = new Geocoder(ctx, Locale.getDefault());
List<Address> data = geocoder.getFromLocation(latitude, longitude, 1);

throw Exception:

java.io.IOException: Service not Available
W/System.err:     at android.location.Geocoder.getFromLocation(Geocoder.java:136)
W/System.err:     at <path to my class>.getGeolocationName(GPSTracker.java:325)

Nexus 5
Android 7.1.1 from xda
Google apps (Gapps) installed from here from "Aroma" variant. Google Play, Google Services are installed automatically. I added Google Maps, Google package installer.

Restart the device not fix the issue, because issue is about missing package i thing.

UPDATE
If Geocoder is not available, i use e Geocoding API: sample
From here: "The Geocoder is part of the Google API add-on that isn't part of the AOSP." Could i install it?

Community
  • 1
  • 1
t0m
  • 3,004
  • 31
  • 53
  • Possible duplicate of [Why is Android Geocoder throwing a "Service not Available" exception?](http://stackoverflow.com/questions/4761052/why-is-android-geocoder-throwing-a-service-not-available-exception) – azizbekian Mar 29 '17 at 14:41

1 Answers1

-3

Rebooting the Device will solve the problem

Mohan K
  • 1
  • 2