PlaceReport
Stay organized with collections
Save and categorize content based on your preferences.
An indication that the device is currently located at a particular Place
.
Typically, your app should submit a place report in response to a user action, such as a
check in at a venue or a tap-to-pay event at a business. This place report indicates strong
confidence that the device is at that place. For more information, see the developer's guide
on Place Reports
.
Inherited Constant Summary
From interface
com.google.android.gms.common.internal.safeparcel.SafeParcelable
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Inherited Method Summary
From class
com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable
From class java.lang.Object
From interface android.os.Parcelable
abstract int |
describeContents
()
|
abstract void |
writeToParcel
( Parcel
arg0,
int arg1)
|
Public Methods
public String
getPlaceId
()
Returns the place id associated with this report.
public String
getTag
()
Returns the context tag associated with this report.
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\u003ePlaceReport\u003c/code\u003e indicates a device's current location at a specific Place, often triggered by user actions like check-ins or tap-to-pay events.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to submit Place Reports responsibly, mainly in response to explicit user interactions signifying strong location confidence.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can create a \u003ccode\u003ePlaceReport\u003c/code\u003e using \u003ccode\u003ecreate()\u003c/code\u003e, providing the Place ID and an optional context tag.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePlaceReport\u003c/code\u003e provides methods like \u003ccode\u003egetPlaceId()\u003c/code\u003e and \u003ccode\u003egetTag()\u003c/code\u003e to access its core information.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the developer's guide on Place Reports for comprehensive usage guidelines and best practices.\u003c/p\u003e\n"]]],["`PlaceReport` indicates a device's location at a specific `Place`. Apps should submit a place report when users perform actions like checking in or tap-to-pay. The `create` method generates a `PlaceReport` using a `placeId` and a context `tag`. `getPlaceId` retrieves the associated place's ID, and `getTag` retrieves the report's context tag. It contains a static `CREATOR` field for parcelable implementation and inherits methods for describing contents.\n"],null,["# PlaceReport\n\npublic class **PlaceReport** extends AbstractSafeParcelable \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nAn indication that the device is currently located at a particular [Place](/android/reference/com/google/android/gms/location/places/Place).\n\nTypically, your app should submit a place report in response to a user action, such as a\ncheck in at a venue or a tap-to-pay event at a business. This place report indicates strong\nconfidence that the device is at that place. For more information, see the developer's guide\non [Place Reports](//developers.google.com/places/android/report-place). \n\n### Inherited Constant Summary\n\nFrom interface com.google.android.gms.common.internal.safeparcel.SafeParcelable \n\n|-------------------------------------------------------------------|------|---|\n| [String](//developer.android.com/reference/java/lang/String.html) | NULL | |\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Field Summary\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|---|\n| public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[PlaceReport](/android/reference/com/google/android/gms/location/places/PlaceReport)\\\u003e | [CREATOR](/android/reference/com/google/android/gms/location/places/PlaceReport#CREATOR) | |\n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [PlaceReport](/android/reference/com/google/android/gms/location/places/PlaceReport) | [create](/android/reference/com/google/android/gms/location/places/PlaceReport#create(java.lang.String, java.lang.String))([String](//developer.android.com/reference/java/lang/String.html) placeId, [String](//developer.android.com/reference/java/lang/String.html) tag) Creates a [PlaceReport](/android/reference/com/google/android/gms/location/places/PlaceReport). |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getPlaceId](/android/reference/com/google/android/gms/location/places/PlaceReport#getPlaceId())() Returns the place id associated with this report. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getTag](/android/reference/com/google/android/gms/location/places/PlaceReport#getTag())() Returns the context tag associated with this report. |\n\n### Inherited Method Summary\n\nFrom class com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable \n\n|-----------|--------------------|\n| final int | describeContents() |\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\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\nFields\n------\n\n#### public static final [Creator](//developer.android.com/reference/android/os/Parcelable.Creator.html)\\\u003c[PlaceReport](/android/reference/com/google/android/gms/location/places/PlaceReport)\\\u003e\n**CREATOR**\n\nPublic Methods\n--------------\n\n#### public static [PlaceReport](/android/reference/com/google/android/gms/location/places/PlaceReport)\n**create** ([String](//developer.android.com/reference/java/lang/String.html) placeId, [String](//developer.android.com/reference/java/lang/String.html) tag)\n\nCreates a [PlaceReport](/android/reference/com/google/android/gms/location/places/PlaceReport). \n\n##### Parameters\n\n| placeId | The [place id](//developers.google.com/places/place-id) of the [Place](/android/reference/com/google/android/gms/location/places/Place) associated with this report. |\n| tag | An app-specific context string for the user flow that triggered the report. For more information about tags, see the [developer's guide](//developers.google.com/places/android/report-place). |\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getPlaceId** ()\n\nReturns the place id associated with this report. \n\n##### Returns\n\n- The place id. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getTag** ()\n\nReturns the context tag associated with this report. \n\n##### Returns\n\n- The context tag."]]