Sample: Send user location
Bot Info
- SDK Platform: .NET Core
- SDK Version: Core
- Active Channels: WebChat
- Deployment Environment: Azure Bot Service, Azure App Service, Bot Emulator
Issue Description
I need to get information about the user's location, (longitude, latitude, browser data, etc.) either through an API call or by receiving a new message or conversationUpdate.
How can I do it?
Thanks!
Note to fixer
There are 2 approaches for this sample:
- [ ] Add a button on the page to send current location
- [ ] Add a custom attachment that will request the user for lat/long, for once
- The custom attachment should have two buttons, one is yes, another is no
- When "yes" button is clicked, we will send the lat/long (browser may popup a request dialog)
- If the request dialog is denied, we will notify the bot, same as if "no" button is clicked
- When "no" button is clicked, we will notify the bot about the denial
Can you help me? please
@serpino, please see the response to you question on the botbuilder repo located here.
Would be great to get a JS sample for this -- @stevkan are you interested?
Related to #1476.
I was able to get the latitude and longitude in Bot Framework v4 C# using the React.js web channel using DirectLine API payload and receive the data in the bot in turnContext.Activity,Values.