turnOnLocationRequest

Prompts the user to enable location services if they are disabled.

This method creates a location settings request and checks if the current device settings satisfy it. If the settings are inadequate (location is disabled), it returns an IntentSenderRequest that can be used with the activity result API to show the system dialog for enabling location.

Return

An IntentSenderRequest to prompt the user to enable location, or null if the request failed or location is already enabled.

Parameters

activity

The activity used as context for the location request.