Professional Documents
Culture Documents
On
Submitted By:
VAIBHAV NATH 19SCSE1010199
RUPESH KUMAR DWIVEDI 19SCSE1010010
1
ABSTRACT
This mobile application can be used for translating one language into another. In today’s
world I have seen many times language becomes barrier in order to convey any idea that’s
why I want to create this application to overcome this issue. This application is easy to use,
anyone can download and tipe any existing language to translate into any other language.
As everyone knows in our country there are so many languages has been spoken, to
understand one’s culture it is very important to know their language. In this application one
can translate the image text into any language. In dark one can use flash light to take a pick
of the image to translate its text into any language, flash light option will be available
2
CONTENTS
Title Page
No.
Candidates Declaration
Abstract II
Contents III
List of Figures IV
Acronyms V
Chapter 1 Introduction 6-7
1.1 Basic Introduction
1.2 Purpose of Application
3
List of Figures
S. Page
Particular
No Number
s
4
Acronyms
5
CHAPTER-1
INTRODUCTION
This mobile application can be used for translating one language into
another. In today’s world I have seen many times language becomes barrier in
order to convey any idea that’s why I want to create this application to
overcome this issue. This application is easy to use, anyone can download and
tipe any existing language to translate into any other language. As everyone
knows in our country there are so many languages has been spoken, to
application one can translate the image text into any language. In dark one can
use flash light to take a pick of the image to translate its text into any language,
flash light option will be available inside the application. In country like India
which is very diverse like culture, language, food and many more things. Need
are many translator application already available in this field but developing my
seen that going in other country or in other state the language barrier is very big
problem not having the knowledge of another’s language gets difficult to start
conversation.
6
1.2 Purpose of Application
so that one can understand the other languages very easily. This application is
easy to use, anyone can download and tipe any existing language to translate
into any other language. As everyone knows in our country there are so many
know their language. In this application one can translate the image text into
any language. In dark one can use flash light to take a pick of the image to
translate its text into any language, flash light option will be available inside
the application. In country like India which is very diverse like culture,
language, food and many more things. Need of a mobile application for
and putting what I want in a translator to make it unique. It is seen that going
in other country or in other state the language barrier is very big problem not
auxiliary to text translation which forms the basis of the service. While the
user can input text using the device keyboard, they can also use pre-existing
text in the form of email or SMS messages received on the user's device
(email/SMS translation).
7
CHAPTER-2
LAYOUT DESIGN
application is started or if there is network problem this screen helps to make the
Linear Layout
Animation View
Figure-2.1
8
Linear Layout
Linear Layout has two orientation horizontal, vertical. In this design vertical
orientation has been used and a view to keep the animation source known as
View
running. In this Splash Screen animation view is used to show the animation on first
screen when app is launched. The source of animation is Lottie animation this
animation is downloaded in the form of JSON file and kept inside the layout’s raw
folder and in animation view at source tag .json file has been set.
9
2.2 Main Screen Layout
This is the main screen where all functionalities has been defined like
where the tiped text will be kept, where translated text will be kept. After taking
input by keyboard where this text will be shown. When Input is taken by
microphone where this text will go where the output will be shown everything is
defined and declared on this screen. How to rest the text one reset button is also
added on this screen. Taking the photo using camera there is a button also has been
This main layout is comprised of different-2 Views and layouts which are shown on
next page.
Linear Layout
CardView, Relative Layout, Scroll View, EditText View, TextView, Buttons and
many more views and layouts. Linear Layout is working like a container for all
Toolbar
The main or starting of main layout which is seen on the screen is toolbar.
Toolbar is like a heading for the screen where we can set the title for the layout it
may be the name of the application or it can be the screen name at which it is
shown.
10
Linear Layout
Toolbar
Card View
Relative Layout
Scroll
ScrollView
View
EditText (Widget)
EditText (Widget)
Scroll View
TextView (Widget)
ImageButton (Widget)
Relative Layout
Relative Layout
Spinner (Widget)
TextButton (Widget)
Spinner (Widget)
Relative Layout
ImageButton (Widget)
ImageButton (Widget)
ImageButton (Widget)
CardView is a new widget in Android that can be used to display any sort of
CardView is the view that can display views on top of each other. The main usage
of CardView is that it helps to give a rich feel and look to the UI design. This
widget can be easily seen in many different Android Apps. CardView can be used
for creating items in listview or inside Recycler View. The best part about
Android.
Relative Layout
The relative layout is used to arrange the child views in a proper order which
means arranging the child objects relative to each other. Generally, if we create an
application using linear layout that consists of 5 buttons. Even if we specify wight
and gravity properties they will not be relatively arranged. To arrange them in a
proper order we need to use the relative layout. To arrange them we need some
properties while creating an application using the linear layout. But we need some
more advanced properties which are supported by relative layout some of the most
layout_alignParentTop
layout_alignParentBottom
layout_alignParentLeft
12
layout_alignParentRight
layout_aligncenterHorozontal
layout_centerVertical
layout_above
layout_below
ScrollView
scrollable views. A scroll view contains a single direct child only. In order to place
multiple views in the scroll view, one needs to make a view group(like
LinearLayout) as a direct child and then we can define many views inside it. A
EditText (Widget)
EditText widget refers to the elements of the UI that helps user interacts with
the Android App. EditText is one of many such widgets which can be used to
retrieve text data from user. EditText refers to the widget that displays an empty
textfields in which a user can enter the required text and this text is further used
TextView (Widget)
plays a very important role in the UI experience and depends on how the
13
information is displayed to the user. This TextView widget in android can be
TextView contains a hyperlink that directs to be a particular web URL, then it has to
be spanned with hyperlink and has to be underlined. Have a look at the following
Spinner
Android Spinner is a view similar to the dropdown list which is used to select
one option from the list of options. It provides an easy way to select one item from
the list of all values when we click on it. The default value of the android spinner
will be the currently selected value and by using Adapter we can easily bind the
items to the spinner objects. Generally, we populate our Spinner control with a list
Button
some action when clicked or tapped. It is a very common widget in Android and
developers often use it. This widget makes out application interactive.
ImageButton
button having image and to perform exactly like button when we click on it but
here, we add an image on Image Button instead of text. There are different types of
14
buttons available in android like ImageButton, ToggleButton et.
programmatically
Figure-2.5
15
2.3 History Screen Layout
When user visits this screen, can see all the word meanings has been searched and
can delete the word meanings from the history if user thinks that it is not worth to
keeping this word meaning. Because It is very important to see the history whatever
has been searched if needed we can refer the history and will be able to recap
Constraint Layout
Toolbar
Recycle View
Item1
Item2
Item3
Item4
Item5
Item6
Item7
Figure-2.6
16
Constraint Layout
provides the ability to completely design your UI with the drag and drop features
performance over other layouts. With the help of ConstraintLayout, we can control
components which we used in our app. In most of the cases, the result obtain will
not be the same as we got to see in the design editor. Linear Layout provides
usability with which we can equally divide all the UI components in a horizontal or
vertical manner using wight sum but in Constriant Layout we have to arrange this
UI component manually.
Recycler View
the latest v-7 support packages. It has been created to make possible construction of
any lists with XML layouts as an item which can be customized vastly while
achieved by recycling the views which are out of the visibility of the user. For
example, if a user scrolled down to a position where item 4 and 5 are visible; item 1,
Figure-2.7
18
2.4 Camera Screen Layout
used to show the heading of the screen when screen is opened. CardView is used to
show the detected text form the image. Relative Layout contains three text buttons
which is used to show capture the image, for detecting text from the image and if
needed to translate one button can send the text for translation and we can translate
Linear Layout
Toolbar
ImageView (Widget)
Card View
Scroll View
TextView (Widget)
Relative Layout
Button (Widget)
Button (Widget)
Button (Widget)
Figure-2.8
19
All the views and widgets are defined above. In this design We have shown that
what are the views and widgets we have used to capture the image and then
Figure-2.9
20
CHAPTER-3
REQUIREMENTS & IMPLEMENTATION
3.1 Requirements
Requirements of application means what are tools and technology has been
Interfaces) have been used. What are the Hardware requirements and permissions
API Used: Android ML-Kit for Translation one language into another
PackageManager
3.2 Implementation
Studio which is used to develop the mobile applications. We have two choices to
develop a mobile application either we can write the working of application using
Java or Kotlin. This application is written in Java because I was familiar with java
language very well to write this application in java is very convenient for me.
21
Language) which is basically used to design the layouts for the mobile applications.
It is like HTML (Hypertext Markup Language) which is used to design the web-
pages layouts. First Screen where we have used an Animation this animation is
taken from the Lottie website we have downloaded the .json file and with the help
of AnimationView provided by Android we have set the src as .json file. And the
second screen where the main functionality has been implemented which translating
the language from one to other. To accomplish this task we have have used
Google’s ML-kit for Translating one language into another. To detect the text from
the image we have used another Google’s ML-kit for text detection from the image.
These are the Android ML APIs which is provided by the Google to accomplish our
task. We can take the input using mobile keyboard and using Google’s voice
detector microphone. And we have also used one image button to reset the text on
EditText and TextView. To select the language we have used one spinner for source
language selection and one spinner for target language selection. To set the
When user clicks the triple dots one item of option menu is shown if use clicks over
that item a new History Intent gets open where user can see the searched word
meaning. For detecting the text from the image we have implemented it using
Google’s ML-kit API for Image to text detection. When user clicks the camera
button of main screen it directs the use to the intent where user can capture the
image and detect the text from the image and if needs translation use can click the
22
need translation button to get the translation of detected text.
To store the history of word meanings we have used ROOMDB provided by the
ROOMDB
mobile phone it is like a wrapper over SQLite DB here we have to use some
annotations to perform CRUD operations which makes this DB very powerful and
very efficient. We have used this DB to make a local Database to store the word
meanings which has been searched by the user. Creating a local Database makes the
application more powerful because having past searched word meanings is very
important we can refer it in future in case if we forgotten the word meaning. Each
time when we have to create a local Database using ROOMDB we create three
things
Model Class
ModelDAO interface
Model Class
This is the class where we define the schema of the Database how many
columns are there in Database. Name of the table, primary key, foreign key and
constraint.
ModelDAO
This is the interface where all the CRUD operations is defined using
23
ROOMDB annotations like (insert, update, getting all the data, delete) all the
ModelDatabase
that we can perform all the operation defined in ModelDAO interface. It is used to
create a singleton class so that we get only one instance of the ROOMDB. To show
all the data present in Database to the user we have used Recycler view to
accomplish this task. In Recycler view we have to only create one layout to show as
24
CHAPTER-4
DATA FLOW DIAGRAM
DFD (Data Flow Diagram) which is used to show how data is flowing in the
application.
Figure-4.1
25
4.2 History Screen DFD
History Screen DFD (Data flow Diagram) is to show how the data is
Figure-4.2
26
CHAPTER-5
FUNCTIONALITY & WORKING
make conversation easy for the people. The main functionality of the application is
that user can translate the text using tiping and also using speaking in microphone
provided in the application. After translating user can reset the text boards using
reset button. If user needs to translate some image text user can do by clicking the
camera icon present in main screen which will direct him to the Object Scanner
Screen where user can take the image of the application and also can get the text on
the image if user want to translate he can translated using Need Translation Button
provided on the Object Scanner Screen. Whatever user will search it will be saved
into the History where he can refer in future in case if he forgets any meaning. As
we all know today almost everyone have a smart phone and people getting lazy as
technology is helping them a lot so adding voice translation is very important for
this application. And one more functionality which is added which user can listen
the translated text just clicking the speaker image provided in the application’s main
screen. Because sometimes we don’t know the pronunciation of the work which has
been translated once we listen the pronunciation we feel confident when we speak
to someone. The key functionality which we have also added when user selects the
language from spinner the microphone takes the input in that language. And speaker
also speaks in the same language as the target language has been set.
27
5.2 Working
The main work of the application is to translate the language smoothly either
the main screen there is many functionality but we will explain each function
working one by one. Let’s start with edit text where the input provided by the user
is set when user clicks on the edit text area automatically the keyboard of the device
comes user can tipe whatever he wants to translate then selecting the language from
source spinner is very important because without this user will get an Toast
Message that source language is not selected then use have to select the target
language in which user want to translate the language if he will no select the target
language he will get a warning Toast Message again select target language once
these steps has been done user can press translate button provided in between the
both spinner.
Working of Microphone
If user does not want to user key board to take the input, he can use the
microphone provided in the application for this he has to select the source language
to translate otherwise he will get a Toast Message again source language is not
selected. Once source language selected user can press the microphone icon
provided in the application one small window will be opened now user can speak
whatever he want to translate when user will stop speaking the text will be shown in
This application which is used for translating the language is very demanding
application almost everyone needs this application. This application can work like
dictionary for normal human people and for working professional it is very
important because they have to visit other state, other country and it is also not
possible to learn all states and countries language so having this application is very
important. Almost all functionality and DFD, layout Design is explained in above
chapters of this report. This application is supporting 14 languages right now but in
future it will increase. This application functionality is amazing one can use it at any
time rather than writing in the copy one can search here it will store the meaning of
the searched word in history screen so that in future one can refer it. We have not
make it too much messy it is very clean only one meaning appears for each text
29