title: Getting address of location from google map using json instead of Geocoder
body: <p>I am developing an application on Google map.I am new to work on Google map API V2. I want to click on location on map and get address of that location i use Geocoder and it works for me but on different versions of android it will not work so i want to use json anyone help me..<br>
  Mainactivity.java     </p>
  
  <pre><code>@Override
      public void onMapLongClick(LatLng point) {
  
          lat = point.latitude;
          lng = point.longitude;
  
  
           try {
             Geocoder geocoder = new Geocoder(this, Locale.getDefault());
             List&lt;Address&gt; addresses = geocoder.getFromLocation(lat, lng, 1);
             StringBuilder sb = new StringBuilder();
             if (addresses.size() &gt; 0) {
               Address address = addresses.get(0);
  
               sb.append(address.getCountryName()).append(", ");
               sb.append(address.getLocality()).append(", ");
               sb.append(address.getSubLocality()).append("\n");
               sb.append(address.getFeatureName()).append(", ");
               sb.append(address.getPostalCode()).append(", ");
               sb.append(address.getAdminArea()).append(", ");
               sb.append(address.getPhone()).append("");
  
             }
             addressString = sb.toString();
             mTapTextView.setText(addressString);
  
            } catch (IOException e) {}
      }      
  </code></pre>
  
  <p>AndroidManifest.xml    </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.googlemaps"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;permission
          android:name="com.example.googlemaps.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
  
      &lt;uses-permission android:name="com.example.googlemaps.permission.MAPS_RECEIVE" /&gt;
      &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
       &lt;uses-feature android:name="android.hardware.camera" /&gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="19" /&gt;
  
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  
      &lt;!-- Required to show current location --&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  
      &lt;!-- Required OpenGL ES 2.0. for Maps V2 --&gt;
      &lt;uses-feature
          android:glEsVersion="0x00020000"
          android:required="true" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.googlemaps.Main"
              android:label="@string/app_name"
              android:screenOrientation="portrait"
              android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;meta-data
              android:name="com.google.android.maps.v2.API_KEY"
              android:value="AIzaSyC9yx6mNQGAIQv9GNAPIMXRYaxWhWwMJ2c" /&gt;
          &lt;meta-data
              android:name="com.google.android.gms.version"
              android:value="@integer/google_play_services_version" /&gt;
  
          &lt;activity
              android:name="com.example.googlemaps.ShowDirection"
              android:label="@string/title_activity_show_direction" 
              android:screenOrientation="portrait"
              android:theme="@android:style/Theme.NoTitleBar.Fullscreen"&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>