Using Emotion API In Android Apps - Part One

Introduction

Android is one of the most popular operating systems for mobile. Emotion API is used to identify how a face expresses in a particular photo. In this article, I will show you how to use Emotion API in Android application using Android Studio.

Requirements

  • Android Studio
  • Little knowledge of XML and Java.
  • Android Emulator (or) Android mobile
  • Stable internet connection during execution
  • Download link (Android Studio)

Steps to be followed

Carefully follow these steps to use Emotion API in Android application using Android Studio.

Step 1

Open the Android Studio and start a new project.

Android

Step 2

Put the application name and company domain. If you wish to use C++ for coding the project, mark the "Include C++ support" checkbox and click Next.

Android

Step 3

Select the Android minimum SDK. After you chose the minimum SDK, it will show the approximate percentage of people who use that SDK. Then, click Next.

Android

Step 4

Choose "Basic Activity", then click Next.

Android

Step 5

Put the activity name and layout name. Android Studio basically takes java class name similar to what you provided as the activity name. Finally, click Finish.

Android

Step 6

Go to the below link, choose Emotion API, and click "Create".

Link https://azure.microsoft.com/en-us/try/cognitive-services/

Android

Step 7

Choose your region and agree to the agreement. Then, click Next.

Android

Step 8

Sign-in to create your API through Outlook, LinkedIn, GitHub, or Facebook account.

Android

Step 9

Created are your API key and endpoint. Copy your API keys and endpoint.

Android

Step 10

Paste the copied API key into the strings.xml file.

Android

Deliverables

Here, we have successfully used Emotion API in Android application. 

Thank you for reading my article. Don’t forgot to like and follow me. If you have any doubts just comment below.