After I closed my app for a while then reopen it again,my app will not update location or sometime it will take long time( about 5min) before update. How can I fix it? This
first thing why u have used 0 mintime and 0 precision it will drain your battery very fast..avoid this if its not necessity
secondly
the time lag u mentioned here is definitely the time taken by the gps chip to access the gps data which can vary sometimes depending on GPS signal availability
and regarding update u should try this
public void onLocationChanged(Location loc) {
if (loc != null) {
TextView gpsloc = (TextView) findViewById(R.id.widget28);
gpsloc.setText("Lat:"+loc.getLatitude()+" Lng:"+ loc.getLongitude());
}
else
{gpsloc.setText("provider not available");}//provider available or not
}
there might be a chance that there is no provider available to update the location