Skip to content
Joshmitha307 edited this page Oct 13, 2018 · 18 revisions

Lab Assignment Submitted by Team : 13-2

Member 1 : Anusha Jasti

Class ID : 18

Member 2 : Joshmitha Tammareddy

Class ID : 49


Objective :

Task 1: To create an android application using any Machine Learning API and any of the smart phone hardware features like Sensors/Camera/Media/Connectivity/Maps etc.

Task 2: To create an ionic application which is a mashup of two web services out of which one should be a machine learning and the other should be a cordova plugin.


Approach :

Task 1: For the Android application IBM Watson Speech recognition is used as the Machine Learning API, Camera as smartphone hardware and Firebase is used for Login and Registration Page.

Task 2: For the Ionic application we have used as Machine Learning API and Google Video Search API. Camera and QR Code as the Cordova plugins used.


Part I :

Android Application

The android application has three parts in it:

1.The Login and Registration pages :

  • In this page the user can register to the application. Once they are registered they can log in to the application whenever they want using their credentials.
  • To deploy Firebase into Android we use the following code which we get when we create our firebase account in chrome.

  • The login details entered are verified from the firebase.
  • Upon clicking the register button the page redirects to the RegisterActivity.class page from the Main page.

  • The formats for the registration fields are also verified and if the details do not match then registration will be unsuccessful and also if the password entered is incorrect while logging in it shows a password mismatch.

  • If all the details for the registration page are not entered it prompts an error saying "Please fill in all the details" at the end of the page as a message.

2.Home Activity :

  • In the home activity we used the Machine Learning Watson's Visual Recognition API.

  • "IamOptions.Builder()" function should be called along with the API key inorder to retrieve results .

3.Features :

  • We use camera as the input for the Visual Recognition API.This API helps in recognizing the image taken and displays the name of the item in the image.

  • This is the code required to open camera in our application.


Part II :

Ionic Framework

The ionic application also has three parts

  1. It has a login and register page. The user has to register to the ionic application so that they can login. We use Firebase to store the user credentials and the images taken by the user.

The following snippet is the script code for firebase authentication.

  • The login page has the login content that is the email and password.It also has two buttons, login- to login directly if you have already registered and register- to register if you are not registered.

  • The login function verifies the details entered from the firebase.

  • The logout page redirects to the login page when you click on the logout button.

  1. It has a home page which consists of the Take Photo and Logout buttons.The camera used here is imported from the Cordova plugin.

  • These are the pages we created which a user can access after logging in.
  1. We use QR code and Video Search to create a mashup application.
  • For QR code we can enter any input in the text box and we get the input in the form of QR code.

  • In Video search you can give the name of the video you want to search and you get the videos related to the search and also the channel in which they are present.

  • This is Google Video Search API which is used to search videos.

  • We will have a text box to enter the input that is the name of the video you want to search and you get all the results related to the channel and also in which channel they are available.


Video Link :

https://drive.google.com/open?id=1wYbn_yYioljrbWOmcN-kjg07TEoD44Ng


Contribution:

Android Application : Joshmitha

Ionic Application : Anusha


References:

https://youtu.be/QETnC6SEwa0

https://www.kdnuggets.com/2017/02/machine-learning-data-science-apis-updated.html


Conclusion:

We have learned how Machine Learning can be used with Android and Ionic.

Clone this wiki locally