title: how to set an alarm or an alert on google map in android
body: <p>i m trying to implement the alarm based on GPS tat if i am in city x an i place a pin point at that place when i reach to that specific pinpoint it should give me an alert or alarm  i have implemented a full map structure also i had programmed for showing my current location an for placing a pinpoint.  i don't know how to attach the source code please help me in this way m really new to android and i don't know how to do it. here is the code please guide me where i m going wrong.</p>
  
  <pre><code>public void onLocationChanged(Location l) 
  {
   // TODO Auto-generated method stub
   lat=(int) (l.getLatitude() *1E6) ;
   longi=(int) (l.getLongitude() *1E6);
   ourLocation= new GeoPoint(lat,longi);
   OverlayItem overlayItem= new OverlayItem(ourLocation,"","");   
   CustomPinpoint custom=new CustomPinpoint(d,Main.this);
   custom.insertPinPoint(overlayItem);
   overlayList.add(custom);
   controller.setCenter(ourLocation); 
       geocoder= new Geocoder(getBaseContext(), Locale.getDefault());
  
      try
      {       
      List&lt;Address&gt;address1=geocoder.getFromLocation
      (ourLocation.getLatitudeE6()/1E6,ourLocation  .getLongitudeE6()/1E6, 1);
  
     if(address1.size()&gt;0 )
      {
     for(int i=0; i&lt;address1.get(0).getMaxAddressLineIndex();i++)
     {                
         display1 += address1.get(0).getAddressLine(i)+"\n";
  
      }
  
      }
  
  }
  catch(IOException e1)
  {
      e1.printStackTrace();
      Toast.makeText(getBaseContext(), "error", Toast.LENGTH_LONG).show();
  }
  
  if(display1.equals(display))
  {   
      AlertDialog alert= new AlertDialog.Builder(Main.this).create();
      alert.setTitle("Destination");
      alert.setMessage("You Reached to  destination");
      alert.setButton("OK",new DialogInterface.OnClickListener() 
  {
  
  
       public void onClick(DialogInterface arg0, int arg1) 
       {
           // TODO Auto-generated method stub
        }
         });
      alert.show();   
        }
      }
  </code></pre>