Check settings
To get the current state of the location settings, call theA3LLocationSettingsResponse.getLocationSettingsStates() method.
To make sure the system settings of a user’s device are in a state that allow location services to successfully perform location requests, use the checkLocationSettings() API. If the API determines that the required settings aren’t enabled on the device, you can choose to display a dialog to the user that guides them to enable the setting.
Before you can check the system settings, you must create an A3LLocationSettingsRequest.Builder object that includes the A3LLocationRequest objects that your app uses. The following code shows an example of creating an A3LLocationSettingsRequest.Builder object with two location requests.
A3LLocationSettingsRequest.Builder object using the setNeedBle() method, as shown in the following code.
A3LLocationSettingsRequest object and pass it to the checkLocationSettings() method of the A3LSettingsClient class, as shown in the following example.
Task to handle the result. If the result throws an exception, your app can conditionally check the status codes to determine if the issue can be resolved. If the status code is RESOLUTION_REQUIRED, you can show a dialog to the user to ask them to allow the required setting. To do this, call ResolvableApiException.startResolutionForResult(), as shown in the following example.
A3LLocationSettingsStatusCodes.
The following example shows how to verify the results of startResolutionForResult() in the onActivityResult() method.
Get location availability
To determine if location data is available, use thegetLocationAvailability() method. A successful Task result returns an A3LLocationAvailability object. To get a Boolean that indicates the likelihood that location data can be retrieved, use the isLocationAvailable() method. A true response doesn’t guarantee the location is available, but it indicates the location data is likely to be available. Similarly, a false response doesn’t confirm the location is unavailable, but it indicates the location data is likely to be unavailable. The following code shows an example of how to get location availability.
getLocationAvailability() method only verifies whether the location is enabled or disabled.
Request continuous location updates
TherequestLocationUpdates() method allows your app to repeatedly get location updates. If your app tracks users’ locations over time, this API can handle that use case. The requestLocationUpdates() method takes an A3LLocationRequest, an A3LLocationListener and a Looper. The API delivers results to the listener on the looper provided. If your app makes a location update request and your app previously made a location update request using the same listener, the new request replaces the previous one. The following code shows an example of how to request location updates.
Stop location updates
To stop location updates on a listener, use theremoveLocationUpdates() method, as shown in the following code. The removeLocationUpdates() takes an A3lLocationListener object.

