LocationResponse
Stay organized with collections
Save and categorize content based on your preferences.
This class is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Result from SnapshotClient.getLocation().
Public Method Summary
|
Location
|
getLocation()
This method is deprecated. The Awareness API is deprecated and will be
turned down in a future Google Play services release, as early as January 2027.
There is no direct replacement.
|
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
public Location
getLocation ()
This method is deprecated.
The Awareness API is deprecated and will be turned down in a future Google Play services
release, as early as January 2027. There is no direct replacement.
Returns the current lat/lng location of the device.
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 2026-03-12 UTC.
[null,null,["Last updated 2026-03-12 UTC."],[],["`LocationResponse`, an extension of `Response`, provides results from `getLocation()`. It offers `getLocation()` to retrieve the device's current latitude and longitude. It inherits `getResult()` and `setResult()` for managing `LocationResult`. Additionally, it inherits standard Java object methods like `equals()`, `hashCode()`, `toString()`, and `wait()`. The core functionality revolves around fetching the device's geographical location and managing the associated response object.\n"]]