The second parameter where you have Integer.MAX_VALUE
is where you put in the distance.
See the documentation for LocationManager at http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(long, float, android.location.Criteria, android.app.PendingIntent)
1f
instead of Integer.MAX_VALUE
should do it, provided everything else is OK.
Edit Actually, check the documentation. Looks like your call there is more than a bit inaccurate (for what you are trying to do -- looks like wrong version of the function).
Edit #2 Based on your reply, you have set infinity as the minimum time between updates. Try 0f
. Also, for the minDistance, try 1f
instead of 1 to ensure it is a float.