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

Is there a Portable library for DirectLine API , which can be installed in the Xamarin Portable Lib Project in Android Solution

Open AnandChitale opened this issue 9 years ago • 6 comments

I am creating a sample Android application and using Xamarin to develop one. I want to use DirectLine API to communicate to bot from Android APP. Is there a portable lib which can be installed in Xamarin Portable project and not in .Droid Project.

The directline API gets installed in .Droid project but not in Portable project , which makes the implementation specific to android and not cross platform.

AnandChitale avatar Feb 20 '17 11:02 AnandChitale

Just a suggestion - you could write a wrapper class in your Xamarin Portable project while you're waiting. The DirectLine REST API is fairly simple. Attaching example helper code from a load test as a starting point, (not a full example) that posts to direct line and extracts for watermark. CustomExtractJsonNodeValue.zip

robertbaumann avatar Feb 28 '17 22:02 robertbaumann

Some developers who have asked for PCL support in the past have found that the .Net Standard 1.3 libraries in our Nuget package (https://www.nuget.org/packages/Microsoft.Bot.Connector.DirectLine) work for them.

If those don't work, the Nuget package is 99% generated code on top of the Direct Line swagger file (https://docs.botframework.com/en-us/restapi/directline3/swagger.json). The remaining code is just to set the Authorization header (Bearer scheme) and to set the endpoint to directline.botframework.com.

dandriscoll avatar Mar 10 '17 01:03 dandriscoll

@dandriscoll FYI @angelobelchior seems to be trying to use this in a PCL project without success. It seems this Nuget is still native only.

matvelloso avatar May 18 '17 18:05 matvelloso

Thanks @matvelloso ! I followed the APIs documented in Swagger and created a library. Soon I publish the source code.

angelobelchior avatar May 24 '17 13:05 angelobelchior

Hello @angelobelchior, can you share the source code with us?

EDIT: I've found this awesome tutorial: https://mindofai.github.io/Bot-Framework-and-Xamarin.Forms-Application-Integration-using-DirectLineClientAPI/

Best. Francesco.

fzoccara avatar Feb 16 '18 14:02 fzoccara

@fzoccara, Is their source code for the below mention tutorial. EDIT: I've found this awesome tutorial: https://mindofai.github.io/Bot-Framework-and-Xamarin.Forms-Application-Integration-using-DirectLineClientAPI/

And will this work for a bot built using TypeScript.

Thanks, Edward

Edwardfelix08 avatar Feb 14 '20 14:02 Edwardfelix08