Unable to display address using reverse Geocoding
<p>This is my code......</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);

            TextView myLatitude = (TextView)findViewById(R.id.mylatitude);
            TextView myLongitude = (TextView)findViewById(R.id.mylongitude);
            TextView myAddress = (TextView)findViewById(R.id.myaddress);

            myLatitude.setText("Latitude: " + String.valueOf(LATITUDE));
            myLongitude.setText("Longitude: " + String.valueOf(LONGITUDE));

            Geocoder geocoder = new Geocoder(this, Locale.getDefault());

            try {
                //List&lt;Address&gt; addresses = geocoder.getFromLocation(LATITUDE, LONGITUDE, 1);
                /* List&lt;Address&gt; addresses = new Geocoder(this,Locale.getDefault()).getFromLocation(LATITUDE, LONGITUDE, 1);

                if(addresses != null) {
                    Address returnedAddress = addresses.get(0);
                    StringBuilder strReturnedAddress = new StringBuilder("Address:\n");
                    for(int i=0; i&lt;returnedAddress.getMaxAddressLineIndex(); i++) {
                        strReturnedAddress.append(returnedAddress.getAddressLine(i)).append("\n");
                    }
                    myAddress.setText(strReturnedAddress.toString());*/

                List&lt;Address&gt; addresses = geocoder.getFromLocation(LATITUDE, LONGITUDE, 1); 
                StringBuilder sb = new StringBuilder(); 
                if (addresses.size() &gt; 0) { 
                   Address address = addresses.get(0); 

                   for (int i = 0; i &lt; address.getMaxAddressLineIndex(); i++) 
                      addr=address.getAddressLine(i); 
                }
                else{
                    myAddress.setText("No Address returned!");
                }
            } catch (IOException e) {
                // TODO Auto-generated catch block
                /*e.printStackTrace();
                myAddress.setText("Canont get Address!");*/
            }

        }
</code></pre>

<p>Can anyone sort out what is the problem???
Thanks in advance.</p>
