Search code examples
actions-on-google

Google Assistant Actions - Device Location


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?


Solution

  • 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