Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, May 15, 2019

Getting Started with Microsoft Azure Cognitive Services APIs account

Introduction:
Microsoft Cognitive Services awesome APIs and services for developers to create more intelligent applications. You can add more interesting feature like people emotion and video detection, facial, speech and vision recognition and speech and language understanding into our all the application. The following sample image showing for emotion and face detection using cognitive service.
In this article, you will get understand how to Create a Cognitive Services APIs account in the Azure Portal.
Prerequisites:
  1. Create a free trial Azure subscription from Azure portal.
  2. If you are looking paid version, Click here for detail
Create a Cognitive Services Account in Azure:
You can follow below steps for Create a Cognitive Services APIs account in the Azure Portal.
Step 1:  Sign in to the Azure portal.
Step 2: Click + NEW and Select AI + Cognitive Services
Step 3: You can see the entire list of Cognitive Services APIs. Click on the API of your choice to proceed.

Step 4: Select on required API and read about the API and Click on Create
Step 5: after click on create button, provide the following information for create cognitive service and click on create.
Name: Name of the account, Microsoft recommend a descriptive name. for example, <common name><APIName>Account.
Subscription: Select the available Azure subscriptions.
Location: Select the service locations.
Pricing tier: you can choose your pricing tier. F0 is free service and S0 paid service. based on your usage you can choose the pricing tier
Select the Resource group > confirm the Microsoft notice and Click on create for create the account
Step 6: wait for few second and you will get notification after complete. If Cognitive Services account is successfully deployed, click the notification to view the account information.
You can see and copy the Endpoint URL in the Overview section.
You can also copy keys in the Keys section to start making API calls in our Xamarin or other applications.
Summary:
In this article, you learned about how to Create a Cognitive Services APIs account in the Azure Portal.
We can use these keys and end point URL to the next article with app to communicate intelligent feature in Xamarin application.
If you have any questions/ feedback/ issues, please write in the comment box.

Xamarin Forms ChatBot using the Microsoft Bot Framework

Xamarin Forms ChatBot using the Microsoft Bot Framework
Introduction:
The Bots Framework that run inside skype ,web chat , Facebook ,Message ,etc. Users can interact with bots by sending them messages, commands and inline requests. You control your bots using HTTPS requests to our bot API.
In this article, how you can integrate a bot right into your Xamarin.Forms application via the Microsoft Bot Framework Web bots.
Create new bot Application:
You can read my previous article for Getting Started with Bots Using Visual Studio 2019 from here
Publish Bot Application to Azure:
You can read my previous articles for publish bot application to azure from here
Generate Web Chat Code:
After publish you bots into azure, you can generate web Chat html code from bots portal as per below
Step 1
Sign in to the Bot framework Portal - https://dev.botframework.com/
Step 2
Click My Bots
Step 3
Select your bot that you want to generate code
Step 4:
Click on Get bot embed Codes > Click on Web Chat icon > Click on (Click here to open Web Chat configuration page)
Step 5:
It will navigate to new web page for configuration and click on + Add New Site > Provide site or application name > Click on Done
Step 6:
You can copy your secret keys and embed code for integrate to xamarin forms application
Create new Xamarin .Forms Application :
Go to Run (Windows key +R) > type Devenv.exe or select from Windows Application list and select New project from File menu > New Project (ctrl +Shift+N) or click More project template from VS Start screen.
New Project >select Cross -Platform from Template > Cross platform App(Xamarin.Forms or native). It will show the screen, as shown below.
You can find above screen only on VS 2017. Select Blank apps > select Xamarin.Forms  > Select PCL and click on Ok .it will generate all the mobile platform project with PC
Open your MainPage.xaml file add webview control with following code for web chat enable
  1.   <StackLayout WidthRequest="300" HeightRequest="500" >
  2.        <Image Source="profile.png" WidthRequest="200" HeightRequest="200"></Image>
  3.        <Label Text="Live Chat with Suthahar via C Sharp corner" FontSize="20" ></Label>
  4.        <WebView x:Name="webview" Source="https://webchat.botframework.com/embed/DevEnvExeBot?s=8XGcUROXkAA.cwA.pZo.8pJ-6oQ3sJRpxq0tqIo9uLPji4oxBQuz2pW5qWobw2c"
  5.                 WidthRequest="300" HeightRequest=" 300"></WebView>
  6.    </StackLayout>
Now you can run the application in windows ,Android and iOS

Summary
In this article, your learned how to create a Bot application, publish Bot to Azure and bot implementation to Xamarin Forms using Visual Studio 2019. If you have any questions/ feedback/ issues, please write in the comment box.