Android Open Source - reversegeo Main Activity






From Project

Back to project page reversegeo.

License

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.

Java Source Code

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);
    }
  }
}




Java Source Code List

com.yelinaung.reverse.ApplicationTest.java
com.zwenexsys.reverse.AsyncMapService.java
com.zwenexsys.reverse.BaseService.java
com.zwenexsys.reverse.ReverseGeo.java
com.zwenexsys.reverse.SyncMapService.java
com.zwenexsys.reverse.models.AddressComponent.java
com.zwenexsys.reverse.models.Bounds.java
com.zwenexsys.reverse.models.Geometry.java
com.zwenexsys.reverse.models.Location.java
com.zwenexsys.reverse.models.Maps.java
com.zwenexsys.reverse.models.Northeast.java
com.zwenexsys.reverse.models.Northeast_.java
com.zwenexsys.reverse.models.Result.java
com.zwenexsys.reverse.models.Southwest.java
com.zwenexsys.reverse.models.Southwest_.java
com.zwenexsys.reverse.models.Viewport.java
com.zwenexsys.reversegeo.ApplicationTest.java
com.zwenexsys.reversegeo.sample.MainActivity.java