[Solved] Retrieving location every 5 seconds

[ad_1]

In a nutshell:

LocationRequest locationrequest = LocationRequest.create();
locationrequest.setInterval(5000);   // 5 seconds
LocationClient locationclient = new LocationClient(this, this, this);
locationclient.requestLocationUpdates(locationrequest, this);

https://developer.android.com/training/location/index.html

In this link, it is suggested that you use the new Google Play services location APIs. But they have the same idea.

[ad_2]

solved Retrieving location every 5 seconds