LocationSettingsResponse
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Method Summary
From class com.google.android.gms.common.api.Response
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
Retrieves the location settings states.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eLocationSettingsResponse\u003c/code\u003e indicates the result of checking device location settings using the \u003ccode\u003eSettingsApi\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt helps determine if the current location settings meet the requirements of your application.\u003c/p\u003e\n"],["\u003cp\u003eIn case of failure, it provides a \u003ccode\u003eResolvableApiException\u003c/code\u003e that can potentially resolve the issue.\u003c/p\u003e\n"],["\u003cp\u003eAccess the current location settings states using the \u003ccode\u003egetLocationSettingsStates()\u003c/code\u003e method.\u003c/p\u003e\n"]]],["`LocationSettingsResponse` handles the result of checking location settings via `SettingsApi.checkLocationSettings`. A failed check results in a `ResolvableApiException`. The current location settings are accessible through `getLocationSettingsStates()`, returning a `LocationSettingsStates` object. This class inherits methods like `getResult()` and `setResult()` from the Response class. It also inherits basic object methods from Java. `getLocationSettingsStates()` is the primary method for obtaining settings information.\n"],null,["# LocationSettingsResponse\n\npublic class **LocationSettingsResponse** extends [Response](/android/reference/com/google/android/gms/common/api/Response)\\\u003c[LocationSettingsResult](/android/reference/com/google/android/gms/location/LocationSettingsResult)\\\u003e \nSuccessful response of checking settings via [SettingsApi.checkLocationSettings(GoogleApiClient, LocationSettingsRequest)](/android/reference/com/google/android/gms/location/SettingsApi#checkLocationSettings(com.google.android.gms.common.api.GoogleApiClient,%20com.google.android.gms.location.LocationSettingsRequest)).\n\nIf a [Task](/android/reference/com/google/android/gms/tasks/Task) with this\nresponse type fails, it will receive a [ResolvableApiException](/android/reference/com/google/android/gms/common/api/ResolvableApiException)\nwhich may be able to resolve the failure. See [SettingsClient](/android/reference/com/google/android/gms/location/SettingsClient)\nfor more details.\n\nThe current location settings states can be accessed via [getLocationSettingsStates()](/android/reference/com/google/android/gms/location/LocationSettingsResponse#getLocationSettingsStates()). See [LocationSettingsResult](/android/reference/com/google/android/gms/location/LocationSettingsResult)\nfor more details. \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [LocationSettingsStates](/android/reference/com/google/android/gms/location/LocationSettingsStates) | [getLocationSettingsStates](/android/reference/com/google/android/gms/location/LocationSettingsResponse#getLocationSettingsStates())() Retrieves the location settings states. |\n\n### Inherited Method Summary\n\nFrom class com.google.android.gms.common.api.Response \n\n|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| [LocationSettingsResult](/android/reference/com/google/android/gms/location/LocationSettingsResult) | getResult() |\n| void | setResult([LocationSettingsResult](/android/reference/com/google/android/gms/location/LocationSettingsResult) arg0) |\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [LocationSettingsStates](/android/reference/com/google/android/gms/location/LocationSettingsStates)\n**getLocationSettingsStates** ()\n\nRetrieves the location settings states."]]