I am developing an application that relies on the Internet to get location information. Everything works fine, except that sometimes the Internet is slow and the Geocoder class waits before sending the results.
Geocoder geocoder = new Geocoder(mContext, Locale.getDefault());
I tried to explore geocoding methods, but there is no timeout there. How can i fix this?
PS: addresses = geocoder.getFromLocation(lat, lon, 1);located inside asynctask doInBackground ().Thank.
source
share