I want to discuss if there is possibility of getting real time current location update as we move, I tried with FusedLocationProviderClient to request for current location update every 2 minutes
What can we do to achieve this, implement detectActivity for walk and request current location update every 2 minutes or less in it?
or there is on location change listener thing in FusedLocationProviderClient? so that we can listen for if there is change in location and get latlng in real time and display in textview in application? the location change listener is available on GoogleMap object but isn't recommended to use now, am I right?
or should i stick to requestupdate of FusedLocationProviderClient?
Thanks beforehand
Also tell me if i move my phone from one room to another, will there be change in latlng?
You can use this class that i created :
In onStart of your activity call this :
And in onStop use this:
You will get the location updates in the onLocationChangedMethod of the class.
You have to add this dependency too:
Hope this helps.