requestLocationUpdates

@RequiresPermission(anyOf = ["android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"])
abstract fun requestLocationUpdates(pendingIntent: PendingIntent)

Register for location updates to be delivered via the provided PendingIntent.

The delivered pending intents will contain extras with the callback information. Depending on the underlying location provider the intent will contain:

To unregister for location updates, use removeLocationUpdates.

Parameters

pendingIntent

intent for the location result.

Throws

if permission is not granted to access location services.