I want to get periodic (say every 2 minutes) current location updates for this I\'m following official documentation, I wrote this code but its not giving current location u
For make it simple, try with this library https://github.com/mrmans0n/smart-location-lib. This will use the Fused Location Provider.
You just put this code
SmartLocation.with(context).location(new LocationBasedOnActivityProvider(callback)) .start(new OnLocationUpdatedListener() { ... });