AI-generated Key Takeaways
-
The Place Detection API and the Google Play Services Places SDK are deprecated; a new SDK is available.
-
This API provides quick access to the device's current location and allows reporting the device's location at a specific place.
-
Access to some methods of the Place Detection API is subject to a quota limit.
-
The
getCurrentPlacemethod returns an estimate of the device's current location based on its last estimated location. -
The
reportDeviceAtPlacemethod allows reporting that the device is currently at a particular place.
This interface is deprecated.
The Google Play Services Places SDK is deprecated. A new SDK is available.
See the client
migration guide for more information.
Main entry point for the Google Place Detection API.
The Place Detection API provides quick access to the device's current place, and offers the opportunity to report the location of the device at a particular place (like a check in).
Some methods of the PlaceDetectionAPI are subject to a quota limit, as mentioned in the description of the methods concerned.
See PlacesStatusCodes
for detailed information about the error codes.
Public Method Summary
| abstract PendingResult<PlaceLikelihoodBuffer> |
getCurrentPlace(GoogleApiClient
client, PlaceFilter
filter)
Returns an estimate of the place where the device is currently known to be
located.
|
| abstract PendingResult<Status> |
reportDeviceAtPlace(GoogleApiClient
client, PlaceReport report)
Reports that the device is currently at a particular place.
|
Public Methods
public abstract PendingResult<PlaceLikelihoodBuffer> getCurrentPlace (GoogleApiClient client, PlaceFilter filter)
Returns an estimate of the place where the device is currently known to be located.
Generates a PlaceLikelihoodBuffer based on the device's last estimated location. Only places which match the given filter will be returned. If the filter requests only coarse place types, results may be obtained at lower latency and power cost, especially over repeated calls.
The returned values may be obtained by means of a network lookup. The results are a best guess and are not guaranteed to be meaningful or correct.
This API requires the calling application to have the
ACCESS_FINE_LOCATION permission.
Access to this method is subject to quota restrictions.
Parameters
| client | |
|---|---|
| filter | filtering criteria for the results. If the filter is null, then default
filtering parameters are used (see PlaceFilter). |
Returns
- the PlaceLikelihoodBuffer, which may be empty if the place or location is not known or does not match the filtering criteria.
public abstract PendingResult<Status> reportDeviceAtPlace (GoogleApiClient client, PlaceReport report)
Reports that the device is currently at a particular place.
Parameters
| client | |
|---|---|
| report | to be uploaded to the server. |