LocationSettingsResult
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Inherited Method Summary
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()
|
From interface android.os.Parcelable
abstract int |
describeContents()
|
abstract void |
writeToParcel( Parcel arg0,
int arg1)
|
From interface com.google.android.gms.common.api.Result
Public Methods
Retrieves the location settings states.
public void writeToParcel (Parcel dest, int
flags)
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\u003eLocationSettingsResult\u003c/code\u003e indicates whether a dialog should be shown to the user to change their location settings based on an app's requirements.\u003c/p\u003e\n"],["\u003cp\u003eUse \u003ccode\u003egetStatus()\u003c/code\u003e to check if the location settings request was successful.\u003c/p\u003e\n"],["\u003cp\u003eIf the request was unsuccessful and the user has permission, use \u003ccode\u003eStatus.startResolutionForResult()\u003c/code\u003e to prompt the user with a location settings change dialog.\u003c/p\u003e\n"],["\u003cp\u003eAccess the current location settings states using \u003ccode\u003egetLocationSettingsStates()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["public final class **LocationSettingsResult** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) [Result](/android/reference/com/google/android/gms/common/api/Result) \nResult 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)),\nindicates whether a dialog should be shown to ask the user's consent to change their\nsettings.\n\nThe method [getStatus()](/android/reference/com/google/android/gms/location/LocationSettingsResult#getStatus())\ncan be be used to confirm if the request was successful. If the current location settings\ndon't satisfy the app's requirements and the user has permission to change the settings, the\napp could use [Status.startResolutionForResult(Activity, int)](/android/reference/com/google/android/gms/common/api/Status#startResolutionForResult(android.app.Activity,%20int)) to start an intent to show a\ndialog, asking for user's consent to change the settings.\n\nThe current location settings states can be accessed via [getLocationSettingsStates()](/android/reference/com/google/android/gms/location/LocationSettingsResult#getLocationSettingsStates()). See [LocationSettingsResult](/android/reference/com/google/android/gms/location/LocationSettingsResult)\nfor more details. \n\nInherited Constant Summary \nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\nField Summary\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|---|\n| public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[LocationSettingsResult](/android/reference/com/google/android/gms/location/LocationSettingsResult)\\\u003e | [CREATOR](/android/reference/com/google/android/gms/location/LocationSettingsResult#CREATOR) | |\n\nPublic Method Summary\n\n|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [LocationSettingsStates](/android/reference/com/google/android/gms/location/LocationSettingsStates) | [getLocationSettingsStates](/android/reference/com/google/android/gms/location/LocationSettingsResult#getLocationSettingsStates())() Retrieves the location settings states. |\n| [Status](/android/reference/com/google/android/gms/common/api/Status) | [getStatus](/android/reference/com/google/android/gms/location/LocationSettingsResult#getStatus())() |\n| void | [writeToParcel](/android/reference/com/google/android/gms/location/LocationSettingsResult#writeToParcel(android.os.Parcel,%20int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags) |\n\nInherited Method Summary \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\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nFrom interface com.google.android.gms.common.api.Result \n\n|--------------------------------------------------------------------------------|-------------|\n| abstract [Status](/android/reference/com/google/android/gms/common/api/Status) | getStatus() |\n\nFields \n\npublic static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[LocationSettingsResult](/android/reference/com/google/android/gms/location/LocationSettingsResult)\\\u003e\n**CREATOR** \n\nPublic Methods \n\npublic [LocationSettingsStates](/android/reference/com/google/android/gms/location/LocationSettingsStates)\n**getLocationSettingsStates** () \nRetrieves the location settings states. \n\npublic [Status](/android/reference/com/google/android/gms/common/api/Status)\n**getStatus** () \n\npublic void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) dest, int flags)"]]