botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Question] Bot c#: How can I get user location and time zone on the device from the bot

Open msBot1111 opened this issue 9 years ago • 9 comments

I need to get user location from bot without asking the user to writes address and also how can I get time zone of the users device to get the local time. My idea is when user says hi or hello bot to respond with good morning or good evening according to the time of the day. And for location, I want to use GPS from users phone to get me the location so I can suggest nearby places to user.

msBot1111 avatar Apr 20 '17 08:04 msBot1111

@msBot1111 what channel are you using with your Bot? Eg. Slack, Telegram, Facebook Messenger, Kik? Depending on the channel, the capabilities and corresponding instructions will be different. Most likely you will find the answer in the API docs for your specific channel.

nwhitmont avatar Apr 20 '17 19:04 nwhitmont

@nwhitmont I am using Skype and I've integrated my bot in xamarin app

msBot1111 avatar Apr 21 '17 07:04 msBot1111

@nwhitmont Is it possible in any platform to get user location and time zone?

alokraj68 avatar Apr 26 '17 12:04 alokraj68

Is there a way I can get gps location from users device in bot? My bot is integrated in skype channel and in the xamarin app. When I try to get the location from skype it returns null. I saw this link for messenger, but in skype it doesn't work. https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Samples/EchoBot/EchoLocationDialog.cs#L110

msBot1111 avatar Apr 27 '17 12:04 msBot1111

@msBot1111 It's all platform specific and hence its hard. you can ask the user to give his location and resolve it using google places.

alokraj68 avatar May 03 '17 06:05 alokraj68

@msBot1111 can you try looking at these and see if they help for location. The data is not stored by the framework itself though. I am going to close this because it is not exactly a bot framework issue, but a question on geolocation and time zones per device. Feel free to continue the discussion here if you feel so inclined, we can always reopen.

https://stackoverflow.com/questions/38054783/get-user-location-for-bot-framework

https://stackoverflow.com/questions/42904014/reverse-geocoding-with-botframework-location/42913084#42913084

JasonSowers avatar May 24 '17 20:05 JasonSowers

@JasonSowers Any plan to integrate this into the framework itself in near future?

karun-r avatar Oct 10 '17 18:10 karun-r

How about the time zone?! I'm always getting the UTC time through DateTime.Now, but no way to determine the time zone!

artemious7 avatar Jan 30 '18 14:01 artemious7

So are we able to get the latitude and longitude of the user in Skype Channel by asking whenever we need it?

Chaitanya1010 avatar Mar 28 '18 10:03 Chaitanya1010