How to avoid Android ANR while using handler thread in maps integration app?
<p>I am trying to build a Google map integration in android. My app simply displays a current location in maps. I am able to get correct Latitude and Longitude values from GPS and also its been pointed on nearest location on maps using overlays class. I am trying to convert GPS Latitude and Longitude values to its place name, and this is done in separate handler thread. When my app is running after sometime android device is going to in screen lock mode. After unlocking screen sometime i have seen that my current mapActivity did not responds back in some time and system generates Android ANR message to "force - close" this activity. Is it happened only because of my handler Thread is not responds back to main system ui thread?. or having any other issues regarding to this? 
My code snippet for handler thread is given below...</p>

<pre><code>        private void ConvertPointToLocation(GeoPoint point) {
        final GeoPoint p= point;
        Thread thrd = new Thread()
        {
        public void run(){

                    Geocoder geoCoder = new Geocoder(       
                        getBaseContext(), Locale.getDefault());
                    try {
                        List&lt;Address&gt; addresses = geoCoder.getFromLocation(
                        p.getLatitudeE6()  / 1E6, 
                        p.getLongitudeE6() / 1E6,  1);

                        if (addresses.size() &gt; 0) {
                            for (int indexValues = 0;    
                                index &lt; addresses.get(0).getMaxAddressLineIndex(); indexValues++)
                                address += addresses.get(0).getAddressLine(indexValues) + " ";
                        }
                        uiCallback.sendEmptyMessage(0);

                    }
                    catch (IOException e) {        
                        e.printStackTrace();
                    }
        }
    };
    thrd.start();
    }

     private Handler uiCallback=new Handler(){
         @Override
         public void handleMessage(Message msg)
         {
       //TextView locationNameDisplay value is set by address String variable...
             locationNameDisplay.setText(address);
             address="";
         }
     };
</code></pre>

<p>I need to know why Android Not Responding dialog came when my activity is going to in background.</p>

<p>Your help and suggestions are welcome as I am new to this field and I am acquiring to learn a new things? </p>
