If I do not define any time and distance in requestLocationUpdates(), what will happen? [closed]
If I cant pass minimum time and distance in this method, what will happen? When will this method be called?
locationManager.requestLocationUpdates(provider,0, 0,locationListener);
by setting minTime and minDistance to 0 you will get a dead phone.
by the docs:
To obtain notifications as frequently as possible, set both parameters to 0.
you will just get very very rapid responses and also the battery drain on a device will be horrendous.
精彩评论