Skip to content

Instantly share code, notes, and snippets.

@Lavanyagaur22
Last active April 26, 2020 12:20
Show Gist options
  • Save Lavanyagaur22/4e89bf0a535717c08063e2e16548abce to your computer and use it in GitHub Desktop.
Save Lavanyagaur22/4e89bf0a535717c08063e2e16548abce to your computer and use it in GitHub Desktop.
// FusedLocationProviderClient - MainActivity class for receiving location updates.
private lateinit var fusedLocationProviderClient: FusedLocationProviderClient
// LocationRequest - Requirements for the location updates, i.e., how often you
// should receive updates, the priority, etc.
private lateinit var locationRequest: LocationRequest
// LocationCallback - Called when FusedLocationProviderClient has a new Location.
private lateinit var locationCallback: LocationCallback
override fun onCreate(savedInstanceState: Bundle?) {
// ...
fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment