I am using the new Places SDK in my Android app. One of the features that comes with it are AutocompleteSessionToken
. As per docs
Session tokens group the query and selection phases of a user search into a discrete session for billing purposes. We recommend using session tokens for all autocomplete sessions. The session begins when the user starts typing a query, and concludes when they select a place. Each session can have multiple queries, followed by one place selection. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session.
The class seems to have only one method, newInstance()
. I am trying to figure if there is a way to know if the session token expired so that I can generate a new one. Apparently, google would just start billing my query normally as if there was no token if it has expired. So how do I figure this out? Can't find any related info in the docs or online. Would appreciate any help. Thanks!!