Google 助理操作 - 设备位置 [英] Google Assistant Actions - Device Location
问题描述
如何在 Google Actions 中获取用户设备位置(纬度、纬度)?我发现了一些使用 actions-on-google
库来请求用户许可并获取设备位置的示例.但是在创建新项目时,它使用 @assistant/conversation
而不是 actions-on-google
.如果我理解正确,这个对话库是一个新标准,我应该使用它.不幸的是,我在 @assistant/conversation
中找不到任何有关权限或设备位置的信息.我应该使用其他一些图书馆吗?或者它仍在开发中,我应该坚持使用旧的 actions-on-google
直到它准备好?
How can I get user device location (lat, lng) in Google Actions? I have found some examples using actions-on-google
library to ask user for permission and get device location. But when creating a new project it is using @assistant/conversation
instead of actions-on-google
. If I understand correctly, this conversation lib is a new standard and I should be using it.
Unfortunately, I cannot find any information about permissions or device location in @assistant/conversation
. Is there some other library I should use? Or maybe it is still in development and I should stick to older actions-on-google
until it will be ready?
推荐答案
Google 发布了他们的 Google Action 文档的更新,现在有一个部分如何请求和获取用户的位置,请参阅此处:https://developers.google.com/assistant/conversational/permissions
Google released an update of their Google Action docs and now there is a section how to request and obtain the user's location, please see here: https://developers.google.com/assistant/conversational/permissions
这篇关于Google 助理操作 - 设备位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!