VISVESVARAYA TECHNOLOGICAL UNIVERSITY
Jnana Sangama, Belagavi-590010
MOBILE APPLICATION DEVELOPMENT MINI PROJECT REPORT
ON
“DICTIONARY APPLICATION”
Submitted in partial fulfillment of the requirements for the sixth semester
BACHELOR OF ENGINEERING
IN
INFORMATION SCIENCE AND ENGINEERING
For the Academic Year 2021-2022
Submitted by:
Kaushiki Krity 1MV19IS027
Kunal Goyal 1MV19IS033
Mohit Khatri 1MV19IS037
Under the guidance of:
Mr. Vijaykumar Y M
Assistant Professor, Department of ISE
Sir M. Visvesvaraya Institute of Technology, Bengaluru
DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING
SIR M. VISVESVARAYA INSTITUTE OF TECHNOLOGY
HUNASAMARANAHALLI, BENGALURU-562157
SIR M. VISVESVARAYA INSTITUTE OF TECHNOLOGY
Krishnadevaraya Nagar, International Airport Road,
Hunasmaranahalli, Bengaluru – 562157
DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING
CERTIFICATE
It is certified that the MOBILE APPLICATION DEVELOPMENT MINI PROJECT entitled
“DICTIONARY APPLICATION" is carried out by KAUSHIKI KRITY(1MV19IS027), KUNAL
GOYAL(1MV19IS033), MOHIT KHATRI(1MV19IS037) bonafide students of Sir M Visvesvaraya
Institute of Technology in partial fulfillment for the 6th semester for the award of the Degree of
Bachelor of Engineering in Information Science and Engineering of the Visvesvaraya Technological
University, Belagavi during the academic year 2021-2022. It is certified that all corrections and
suggestions indicated for Internal Assessment have been incorporated in the report deposited in the
department library. The project report has been approved as it satisfies the academic requirements in
respect of project work prescribed for the course of Bachelor of Engineering.
Name & Signature Name & Signature Name & Signature
of Guide of HOD of Principal
Mr. Vijaykumar Y M Dr. P.Vijaykarthik Dr. V.R. Manjunath
Assistant Prof & Internal Guide HOD, Dept. Of ISE, Principal,
Dept. Of ISE, Sir MVIT Sir MVIT Sir MVIT
Bengaluru - 562157 Bengaluru – 562157 Bengaluru - 562157
External Examination:
Name of Examiner Signature with Date
1)
2)
DECLARATION
We hereby declare that the entire project work embodied in this dissertation has been carried out by us
and no part has been submitted for any degree or diploma of any institution previously.
Place: Bengaluru
Date:
Signature of Students:
_____________________________ ____________________________
Kaushiki Krity(1MV19IS027)
Kunal Goyal(1MV19IS0033)
Mohit Khatri(1MV19IS037)
ACKNOWLEDGMENT
It gives us immense pleasure to express our sincere gratitude to the management of Sir M. Visvesvaraya
Institute of Technology, Bengaluru for providing the opportunity and the resources to accomplish our
project work in their premises.
On the path of learning, the presence of an experienced guide is indispensable and we would like to thank
our guide Mr. Vijaykumar Y M, Associate Professor, Dept. of ISE, for her invaluable
help and guidance.
Heartfelt and sincere thanks to Dr. P.Vijaykarthik, HOD, Dept. of ISE, for his suggestions, constant
support and encouragement.
We would also like to convey our regards to Dr. V.R. Manjunath, Principal, Sir. MVIT for providing us
with the infrastructure and facilities needed to develop our project.
We would also like to thank the staff of Department of Information Science and Engineering and
lab-in-charges for their co-operation and suggestions. Finally, we would like to thank all our friends for
their help and suggestions without which completing this project would not have been possible.
Kaushiki Krity(1MV19IS027)
Kunal Goyal(1MV19IS0033)
Mohit Khatri(1MV19IS037)
ABSTRACT
For Students, Teachers, and any individual across the world, Dictionary plays a significant role in
their life in a variety of ways. For instance, with the help of dictionaries, Students can understand
their subjects better, improve their communication, and improve their grades by using the words
correctly. For medical professionals, a dictionary consisting of medical terms, sorted
alphabetically, will be helpful for quick reference. The first ever dictionaries are in the form of
books, available even now in any bookstore. But they consume a lot of time in searching and the
risk of losing them or pages being torn out is high. With the evolution of technology, it is now
much easier to search the unfamiliar words on search engines such as Google, etc., with an active
internet connection. This advancement is much more efficient than the custom book-form, yet is
far from the best. This is because of some factors like battery consumption, internet charges, etc.,
that are evident with using search engines. Thus, the need for developing an android dictionary
app is in excess. There are some offline dictionary apps that exist before which fulfill the basic
requirement of providing meaning for a word or they’re just limited to a few features. But they do
not provide more features altogether in one app that would help users understand better. For
example, an “Easy English Dictionary Offline Voice Word Meaning” app available in the google
play store does not contain features like antonyms and word sharing and it also doesn’t give the
context in which the word can be used. In order to take care of all these issues, we created a
platform where the user finds all advanced features of the dictionary in a single app. This helps
them improve their language and expand their domain of vocabulary. This offline app is
developed by using Java for back-end and XML for front-end development, SQLite Database for
database creation, and Android Studio as IDE. This paper gives an understanding of how our
application is a package of many features available together, which a dictionary should essentially
incorporate in order to provide the user with the utmost understanding. In our app, we provide
features like definitions, synonyms, antonyms, examples, and pronunciations to the words using
Text-To-Speech class. The main aspect which distinguishes and makes our app special from the
other offline apps is its sharing feature. When a user browses through any document/site on his
mobile and comes across a word that he/she is unfamiliar with, the word can be simply shared to
the app from that document/site itself. The app then displays the word with its definition,
synonyms, etc. This eliminates the extra effort and time spent in opening the app and then
searching the word.
TABLE OF CONTENTS
CHAPTERS
1. INTRODUCTION
2. REQUIREMENT SPECIFICATONS
2.1 HARDWARE REQUIREMENTS
2.2 SOFTWARE REQUIREMENTS
3. XML CODE DESCRIPTION
4. XML IMPLEMENTATION
5. JAVA CODE DESCRIPTION
6. JAVA IMPLEMENTATION
7. SCREENSHOTS
8. CONCLUSIONS
9. REFERENCES AND WEBLINKS
Chapter 1
INTRODUCTION
● XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting,
and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is
both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0
Specification of 1998 and several other related specifications.
The design goals of XML emphasize simplicity, generality, and usability across the Internet. It is a
textual data format with strong support via Unicode for different human languages. Although the
design of XML focuses on documents, the language is widely used for the representation of
arbitrary data structures such as those used in web services.
Several schema systems exist to aid in the definition of XML-based languages, while programmers
have developed many application programming interfaces (APIs) to aid the processing of XML data.
● JAVA
Java is a high-level, class-based, object-oriented programming language that is designed to have as
few implementation dependencies as possible.
Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM)
regardless of the underlying computer architecture. The syntax of Java is similar to C and C++ but has
fewer low-level facilities than either of them.
One design goal of Java is portability, which means that programs written for the Java platform must
run similarly on any combination of hardware and operating system with adequate run-time support.
This is achieved by compiling the Java language code to an intermediate representation called Java
bytecode, instead of directly to architecture-specific machine code.
● Andriod
Android is open source code mobile phone operating system that comes out by Google. The
Dictionary in this project is application software based on Google Android. A dictionary is one of
the most important tools during your time studying at a university. A good dictionary can help
you understand your subject better, improve your communication and improve your grades
by making sure you are using words correctly.
A Dictionary is a listing of lexemes from the lexicon of one or more specific languages, often
arranged alphabetically, which may include information on definitions, usage, pronunciations,
translation, etc. Dictionary is one of the important media in learning English. Previously, the
only medium for dictionaries was through books, conventional dictionaries. Now, with the
rapid development of mobile technology at this time, the various applications for mobile are
widely developed as a medium of learning, one of them is the application of Advanced
Dictionary. All Rights Reserved Page |151 dictionaries, as users can receive information
quickly anywhere without space & time constraints. Our project mainly aims to create an
android dictionary application, in android studio using java and XML languages, with
thousands of words in English capable of running on Android-based phones. This
application is built to help & meet the needs of students, teachers or anyone across the
world searching for meanings of words. It makes them understand various English words
quickly & improve their language.
Chapter 2
SPECIFICATION
2.1 HARDWARE REQUIREMENTS
● Disk Space: 8 GB of available disk space minimum (IDE + Android SDK + Android Emulator)
● Processor: x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with
support for a Windows Hypervisor
● RAM: 8GB RAM or more
● Display: (1280 × 800) Capable video adapter and monitor
2.2 SOFTWARE REQUIREMENTS
● Operating System : Windows (8, 10, or 11)
● Workspace Editor : Android Studio Version 21.0
● Programming Language : XML, JAVA
Chapter 3
XML CODE DESCRIPTION
● EditText - Edittext refers to the widget that displays an empty textfield in which a user can enter
the required text and this text is further used inside our application.
o Empty Textfield is provided for user to write the content to save to the file.
● Button - A user interface element the user can tap or click to perform an action. To specify an
action when the button is pressed, set a click listener on the button object in the corresponding
activity code
o Create - On pressing ‘CREATE’ button the text will be saved as a text file in Mk SD card.
o Save - On subsequent changes to the text pressing the ‘SAVE’ button will save the latest
content to the same file.
o Open - The user can press ‘OPEN’ button for the display of the content saved to a file.
● Relative layout- RelativeLayout is a view group that displays child views in relative positions.
The position of each view can be specified as relative to sibling elements (such as to the left-of or
below another view) or in positions relative to the parent RelativeLayout area (such as aligned to
the bottom, left or center).
● View- This class represents the basic building block for user interface components. A View
occupies a rectangular area on the screen and is responsible for drawing and event handling. View
is the base class for widgets, which are used to create interactive UI components (buttons, text
fields, etc.). The ViewGroup subclass is the base class for layouts, which are invisible containers
that hold other Views (or other ViewGroups) and define their layout properties.
● Styles and themes on Android allow you to separate the details of your app design from the UI
structure and behavior, similar to stylesheets in web design. A style is a collection of attributes
that specify the appearance for a single View. A style can specify attributes such as font color, font
size, background color, and much more. A theme is a collection of attributes that's applied to an
entire app, activity, or view hierarchy—not just an individual view. When you apply a theme,
every view in the app or activity applies each of the theme's attributes that it supports. Themes can
also apply styles to non-view elements, such as the status bar and window background.
● TextView - TextView is the user interface which displays the text message on the screen to the
user. It is based on the layout size, style, and color, etc. TextView is used to set and display the
text according to our specifications
o TextView is used to display name of the application.
Chapter 4
XML CODE
● Following is the content of the ActivityMain.xml file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/grey"
tools:context=".MainActivity">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_margin="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="8dp"
app:cardBackgroundColor="@color/yellow"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.SearchView
android:id="@+id/search_view"
app:defaultQueryHint="Search words..."
app:iconifiedByDefault="false"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize">
</androidx.appcompat.widget.SearchView>
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_margin="16dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView_word"
android:textSize="24sp"
android:text="Word"
android:textColor="@color/yellow"
android:textAlignment="center"
android:padding="8dp"
android:textStyle="italic"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_phonetics"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:textSize="24sp"
android:text="Meanings"
android:textColor="@color/yellow"
android:textAlignment="center"
android:padding="8dp"
android:textStyle="italic"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_meanings"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
● Following is the content of the AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dictonaryapi">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.DictonaryAPI">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Chapter 5
JAVA CODE DESCRIPTION
● Activity.OnCreate Method-
OnCreate(Bundle, PersistableBundle) -
o SavedInstanceState Bundle
if the activity is being re-initialized after previously being shut down then this Bundle
contains the data it most recently supplied in #onSaveInstanceState. <b>Note: Otherwise it
is null.</b>
o PersistentState PersistableBundle
if the activity is being re-initialized after previously being shut down or powered off then
this Bundle contains the data it most recently supplied to outPersistentState in
#onSaveInstanceState. <b>Note: Otherwise it is null.</b>
● findViewById()- The findViewById () method is a method of Android’s View and Activity
classes. The method is used to find an existing view in your XML layout by its android:id
attribute.
● Environment.getExternalStorageDirectory() Environment.getExternalStorageDirectory () returns
top-level directory of the primary external storage. If device has multiple external storage
directories, returned directory represents the primary external storage that the user will interact
with.
● Environment.getExternalStorageDirectory().getAbsolutePath() - Gives you the full path the
SDCard. You can then do normal File I/O operations using standard Java.
● Toast.makeText()- Toast.makeText () creates a toast and returns it and we should pass three
parameters:
o context – The context to use. Usually @link android.app.Application}or {@link
android.app.Activity} object.
o text – The text to show. Can be formatted text.
o duration – How long to display the message. Either {@link #LENGTH_SHORT} or
{@link#LENGTH_LONG}
● FileOutputStream- FileOutputStream class in Java is used to write binary data to the file. It is a
subclass of OutputStream class and it is available from java 1.0 version onwards. It is used to
writing data into a file in a binary format one byte at a time.
● FileInputStream - Java FileInputStream class obtains input bytes from a file. It is used for reading
byte-oriented data (streams of raw bytes) such as image data, audio, video etc. You can also read
character-stream data. But, for reading streams of characters, it is recommended to use FileReader
class.
● InputStreamReader - An InputStreamReader is a bridge from byte streams to character streams: It
reads bytes and decodes them into characters using a specified charset . The charset that it uses
may be specified by name or may be given explicitly, or the platform's default charset may be
accepted.
● StringBuilder - StringBuilder in Java is a class used to create a mutable, or in other words, a
modifiable succession of characters. Like StringBuffer, the StringBuilder class is an alternative to
the Java Strings Class, as the Strings class provides an immutable succession of characters.
● BufferedReader - Java BufferedReader class is used to read the text from a character-based input
stream. It can be used to read data line by line by readLine() method. It makes the performance
fast. It inherits Reader class.
● RestAPI - Representational State Transfer (REST) is an architectural style that defines a set of
constraints to be used for creating web services. REST API is a way of accessing web services in
a simple and flexible way without having any processing.
REST technology is generally preferred to the more robust Simple Object Access Protocol
(SOAP) technology because REST uses less bandwidth, is simple and flexible making it more
suitable for internet usage. It’s used to fetch or give some information from a web service. All
communication done via REST API uses only HTTP requests .
● Retrofit -Retrofit is a type-safe HTTP networking library used for Android and Java.
Retrofit was even better since it was super fast, offered better functionality, and even
simpler syntax. Most developers since then have switched to using Retrofit to make API
requests.
Permissions in AndroidManifest.xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Chapter 6
JAVA CODE
package com.example.dictonaryapi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import com.example.dictonaryapi.Adapters.MeaningsAdapter;
import com.example.dictonaryapi.Adapters.PhoneticsAdapter;
import com.example.dictonaryapi.Models.APIResponse;
import com.example.dictonaryapi.Models.Phonetics;
public class MainActivity extends AppCompatActivity {
SearchView search_view;
TextView textView_word,textView_origin;
RecyclerView recycler_phonetics,recycler_meanings;
ProgressDialog progressDialog;
PhoneticsAdapter phoneticsAdapter;
MeaningsAdapter meaningsAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
search_view=findViewById(R.id.search_view);
textView_word=findViewById(R.id.textView_word);
recycler_phonetics=findViewById(R.id.recycler_phonetics);
recycler_meanings=findViewById(R.id.recycler_meanings);
progressDialog = new ProgressDialog(this);
//when user first time opens the app
progressDialog.setTitle("loading");
progressDialog.show();
//calling api
RequestManager requestManager=new RequestManager(MainActivity.this);
requestManager.getWordMeaning(listener,"hello");
//create a new package view holder and custom adapter
// set on query text listner to use api calling
search_view.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
progressDialog.setTitle("Fetching response for "+query);
progressDialog.show();
//calling api
RequestManager requestManager=new RequestManager(MainActivity.this);
requestManager.getWordMeaning(listener,query);
return true;
}
@Override
public boolean onQueryTextChange(String newText) {
return false;
}
});
}
private final OnFetchDataListener listener = new OnFetchDataListener() {
@Override
public void OnFetchData(APIResponse apiResponse, String message) {
progressDialog.dismiss();
if (apiResponse==null){
Toast.makeText(MainActivity.this, "No Data Found!!!", Toast.LENGTH_SHORT).show();
return;
}
showData(apiResponse);
}
@Override
public void OnError(String message) {
progressDialog.dismiss();
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
}
};
private void showData(APIResponse apiResponse) {
textView_word.setText("Word: "+apiResponse.getWord());
recycler_phonetics.setHasFixedSize(true);
recycler_phonetics.setLayoutManager(new GridLayoutManager(this,1));
phoneticsAdapter=new PhoneticsAdapter(this,apiResponse.getPhonetics());
recycler_phonetics.setAdapter(phoneticsAdapter);
recycler_meanings.setHasFixedSize(true);
recycler_meanings.setLayoutManager(new GridLayoutManager(this,1));
meaningsAdapter=new MeaningsAdapter(this,apiResponse.getMeanings());
recycler_meanings.setAdapter(meaningsAdapter);
}
}
● Following is the code for RequestManager.java
package com.example.dictonaryapi;
import android.content.Context;
import android.widget.Toast;
import com.example.dictonaryapi.Models.APIResponse;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.http.GET;
import retrofit2.http.Path;
public class RequestManager {
Context context;
//retrofit lib for base url
Retrofit retrofit=new Retrofit.Builder()
.baseUrl("https://api.dictionaryapi.dev/api/v2/")
.addConverterFactory(GsonConverterFactory.create())
.build();
//constructor for context
public RequestManager(Context context) {
this.context = context;
}
//method to handle calling two parameters--- listener(create custom listener) that will catch the
response from main activity and 2. is word
public void getWordMeaning(OnFetchDataListener listener, String word){
//create object of interface
CallDictonary callDictonary=retrofit.create(CallDictonary.class);
//call object
Call<List<APIResponse>> call= callDictonary.callMeanings(word);
//try catch block to get response
try {
call.enqueue(new Callback<List<APIResponse>>() {
@Override
public void onResponse(Call<List<APIResponse>> call,
Response<List<APIResponse>> response) {
if (!response.isSuccessful()){
Toast.makeText(context, "Error!!!", Toast.LENGTH_SHORT).show();
return;
}
//call listener from on data fetch method
listener.OnFetchData(response.body().get(0),response.message());
}
@Override
public void onFailure(Call<List<APIResponse>> call, Throwable t) {
listener.OnError("Request Failed!!");
}
});
}
catch (Exception e){
e.printStackTrace();
Toast.makeText(context, "An Error Occurred!!!", Toast.LENGTH_SHORT).show();
}
}
// now create interface for api calling
public interface CallDictonary{
@GET("entries/en/{word}")
//call of retrofit
Call<List<APIResponse>> callMeanings(
@Path("word") String word
);
}
}
Chapter 7
SCREENSHOTS
Chapter 8
CONCLUSION
This paper explains how dictionary apps can be used for improving strength in the English language
without any complicated time-consuming books or less-efficient apps. Our application saves time and
gives the best security. Users can use the system with utmost ease without any prior learning. This
application can be used easily by installing a .apk file in android supported device with an optimized
screen. With the completion of this application, we also became familiar with different resources for
making database handle on the mobile devices.
Chapter 9
REFERENCES AND WEB LINKS
● https://stackoverflow.com/
● https://github.com/
● www.youtube.com