gpt4 book ai didi

android - 如何通过 SDK 在每个 session 中实现 Google Places 自动完成功能?

转载 作者:可可西里 更新时间:2023-11-01 05:32:27 37 4
gpt4 key购买 nike

是否可以从适用于 Android 和 iOS 应用程序的 places sdk 实现基于 session 的自动完成?

根据 6 月 11 日生效的新 Google map 框架定价,对自动完成的请求可以分解为基于击键/ session 。

New Pricing coming into effect June 11th

this reference 外,我找不到描述实现步骤的文档.

enter image description here

最佳答案

session token 将在新版本的 Android 版 Google Places SDK 和 iOS 版 Google Places SDK 中提供。这些新版本在用户指南文档中公布。

Google is currently preparing new versions of the Places SDK for Android, and the Places SDK for iOS. The following section describes the changes and explains how they will affect you.

  • A new Places SDK for Android will be made available as a standalone library, and will no longer be available through Google Play services; This version will not be backward-compatible with the current SDK
  • A new Places SDK for iOS will be made available

It's worth noting that several Places SDK features will be updated to reflect overall Places API changes, affecting both mobile platforms:

  • Place Details (Android, iOS) request will have a new fields parameter.
  • Autocomplete billing will be session-based.

In the coming months we will share more details including a timeline and appropriate lead time to migrate to the new SDK versions. These new versions will replace the current SDK versions. The current SDKs will be deprecated and will follow appropriate deprecation timelines.

来源:https://cloud.google.com/maps-platform/user-guide/product-changes/

在当前版本的 Places SDK 中没有 session token 。不幸的是,新版本的 SDK 没有确切的预计到达时间。希望它们将在几个月内上市。请继续关注 Google 公告。

关于当前版本的 Places SDK for Android 和 Places SDK for iOS 的计费,我不确定。可能它们将作为弃用版本免费提供。我建议就此问题联系 Google 支持人员。

你也可以检查这个关于 session 的问题:

How long do the new Places API session tokens last?

我希望这能澄清您的疑问。

更新

Places Android SDK 的新版本现已推出。您可以在以下位置阅读有关新版本的信息

https://developers.google.com/places/android-sdk/client-migration

请注意,之前的 SDK 已弃用,将于 2019 年 7 月 29 日关闭。

新版本的 SDK 实现了自动完成的 session token 。

The new version of the Places SDK for Android is distributed as a static client library. Until now, the Places SDK for Android has been made available through Google Play Services.

A compatibility library is available, which enables you to switch from the deprecated Google Play Services Places library to the new static library with minimal effort.

There are all-new methods.

Field masks are now supported for methods that return place details. You can use field masks to specify which types of place data to return.

The exceptions used to report errors have been improved.

Autocomplete now supports session tokens.

关于android - 如何通过 SDK 在每个 session 中实现 Google Places 自动完成功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50468647/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com