Back to project page reversegeo.
The source code is released under:
MIT License
If you think the Android project reversegeo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.zwenexsys.reversegeo.sample; //from w w w . j a va 2s . c om import android.app.Activity; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import com.zwenexsys.reverse.ReverseGeo; public class MainActivity extends Activity { private ReverseGeo reverseGeo; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); reverseGeo = new ReverseGeo("16.780833,96.149722"); reverseGeo.setType(ReverseGeo.LOCALITY); new GetLocation().execute(); } private class GetLocation extends AsyncTask<Void, Void, String> { @Override protected String doInBackground(Void... voids) { String st = reverseGeo.getSyncShortName(); Log.d("short name", "sn : " + st); return st; } @Override protected void onPostExecute(String s) { super.onPostExecute(s); Log.d("short name", "sn : " + s); } } }