title: android: locationManager onLocationChanged does not update Activity
body: <p>I need your help.
  I have a activity that get every 5 min the current lat lon <code>gps = new GpsData(StartActivity.this);</code>. That works fine! But when I left a county and the activity refresh. Then I do not get the current lon lat. I dont know why.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.listplaceholder);
  
          btnShowLocation = (Button) findViewById(R.id.report_btn);
          btnShowLocation.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View arg0) {
                  Intent intent = new Intent(StartActivity.this, ReportActivity.class);
                  startActivity(intent);
                  finish();
  
              }
          });
  
      }
  
       @Override
       public void onResume() {
        super.onResume();
        autoUpdate = new Timer();
        autoUpdate.schedule(new TimerTask() {
         @Override
         public void run() {
          runOnUiThread(new Runnable() {
           public void run() {
               //start GPS
               gps = new GpsData(StartActivity.this);
               //start json download
               new task().execute();
           }
          });
         }
        }, 0, 300000); // updates each 5 min
       }
  
  class task extends AsyncTask&lt;String, String, Void&gt;
  {
  private ProgressDialog progressDialog = new ProgressDialog(StartActivity.this);
      InputStream is = null ;
      String result = "";
      protected void onPreExecute() {
         progressDialog.setMessage("Status Update...");
         progressDialog.show();
         progressDialog.setOnCancelListener(new OnCancelListener() {
      @Override
          public void onCancel(DialogInterface arg0) {
          task.this.cancel(true);
         }
      });
       }
         @Override
      protected Void doInBackground(String... params) {
              //get Location Data
                 double latitude = gps.latitude;
                 double longitude = gps.longitude;
                 String mlat = String.valueOf(latitude);
                 String mlon = String.valueOf(longitude);
  
                 //if (gps.latitude != 0.0) {
  
             JSONObject json = jsonFunctions.getJSONfromURL("http://myurl);
  </code></pre>
  
  <p>Here is my GpsData</p>
  
  <pre><code>public class GpsData extends Service implements LocationListener {    
  public GpsData(Context context) {
              this.mContext = context;
              getLocation();
          }
  
          public Location getLocation() {
  
          // Get the location manager
          locationManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
  
          locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
          return null;
  
        }
  
        /* Request updates at startup */
        protected void onStart() {
  
        }
  
        /* Remove the locationlistener updates when Activity is paused */
        protected void onPause() {
          locationManager.removeUpdates(this);
        }
  
        @Override
        public void onLocationChanged(Location location) {
            latitude = location.getLatitude();
            longitude = location.getLongitude();
            time = location.getTime();
            speed = location.getSpeed();
        }
  </code></pre>
  
  <p>It is simple: I want every 5 min the current lat lon and refresh the List view with the current data from the current county... How can I do this?</p>