- We can get current/updated location in a fixed time interval.
- Using this We can track user location.
implementation ("com.google.android.gms:play-services-location:21.1.0")
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
- Initialise FusedLocationProviderClient
- Show a dialog to ask location permission.
- Create a task to get last location using FusedLocationProviderClient