New pricing changes went into effect on July 16, 2018. For more information, check out the Guide for Existing Users.

Place Report

An app can create a place report to indicate that the device is currently located at a particular place. By reporting places that users have confirmed, you can help Google build a local model of the world. You should report that a device is at a place only if you're confident that the user is at the place, at the time when you report it.

To indicate that a device is located at a specific place, call PlaceDetectionClient.reportDeviceAtPlace(), passing a PlaceReport object that includes the following information:

  • The placeId of the place you are reporting. You can retrieve this place ID by calling Place.getId(). For more information about place IDs, see the place ID overview.
  • An app-specific tag that defines the context of the place report. A typical app can expect to have 1 to 5 tags, corresponding to the difference checkin flows in the app. For example, let's assume your app includes three flows: review a place, add a place, and share a place. You would define three tag codes, one for each of the flows. Note: There are no pre-defined tags. The value of the tags within your application is entirely up to you. The tags provide a useful way of identifying the place reports from each type of call made by your app.

Reporting the location of a device is similar to a checkin. It's not possible to retrieve the report later, and the report is not linked to the user's account.

The following code example shows calling reportDeviceAtPlace().

String PLACEREPORT_REVIEW = "review";

final PlaceReport report = PlaceReport.create(placeId, PLACEREPORT_REVIEW);

Enviar comentários sobre…