Professional Documents
Culture Documents
Debre Berhan University: College of Computing Department of Computer Science
Debre Berhan University: College of Computing Department of Computer Science
COLLEGE OF COMPUTING
Prepared By:
Name:ID no.
JUN,10 , 2015
This is to certify that the work contained in this project entitled as, “Android Based
Mobile Anti-Theft System” was carried out by
AbieCheckol,FikrteTefera,GetahunTadesse,SolomonGetachew and YibekalAlamirew under
the supervision of Instructor Yitayal(MSc), at DebreBerhan University College of
Computing, department of computer science. It is fully adequate, in scope and in quality, for
degree of B.A In Computer Science.
Advisor: -------------------------
Examiner I: ---------------------------
______________________
______________________
______________________
______________________
Contents Page
List of Tables…………………………………………………………………………………VI
List of Figurers…………………………………………...…………….…………………… VI
Abstract………………………………………………………………………….... VIII
CHAPTER ONE ................................................................................................................... 1
SYSTEM PLANNING .......................................................................................................... 1
1.0 Introduction ..................................................................................................................... 1
1.1 Background ..................................................................................................................... 1
1.2 Statement of the Problem ................................................................................................ 2
1.2.1 Problem Definition ........................................................................................................................ 2
1.2.2 Problem Explanation...................................................................................................................... 2
1.3 Motivation .................................................................................................................. 2
1.4 Objectives of the project .................................................................................................. 2
1.4.1General Objective ........................................................................................................................... 2
1.4.2 Specific objective ........................................................................................................................... 3
1.5 Scope .............................................................................................................................. 3
Limitation ............................................................................................................................. 3
1.6Significant of the project .................................................................................................. 4
1.7Feasibility study of the new system .................................................................................. 4
1.7.1 Economic feasibility ...................................................................................................................... 4
1.7.2 Operational feasibility.................................................................................................................... 4
1.8Methodology .................................................................................................................... 4
1.8.1 Fact finding Techniques ................................................................................................................. 4
1.8.2 System Analysis and Design Techniques ...................................................................................... 5
Object Oriented Analysis (OOA)....................................................................................... 5
Object Oriented Design (OOD) ......................................................................................... 5
1.8.3 Tools and technologies .................................................................................................................. 5
1.9Resources ......................................................................................................................... 6
I
1.10 Risk ............................................................................................................................... 6
CHAPTER TWO .................................................................................................................. 8
SYSTEM ANALYSIS .......................................................................................................... 8
2.1 Introduction ..................................................................................................................... 8
2.2 Existing system description ............................................................................................. 8
2.3 Problems of the existing systems ..................................................................................... 8
Time consuming ................................................................................................................... 8
GPS dependent...................................................................................................................... 8
2.4 The proposed system ....................................................................................................... 8
2.4.1 Functional Requirements ............................................................................................................... 9
2.4.2 Nonfunctional requirement ............................................................................................................ 9
2.5 Overview of Data Requirements ....................................................................................... 9
2.6 Use Case Modeling ......................................................................................................... 9
2.6.1 Use case description..................................................................................................................... 10
2.7 Analysis of Class Modeling ........................................................................................... 15
2.8 Sequence Modeling ....................................................................................................... 16
2.9Activity Modeling .......................................................................................................... 21
2.10 Collaboration Modeling ............................................................................................... 25
2.11 State chart Modeling ................................................................................................... 29
CHAPTER THREE............................................................................................................. 31
SYSTEM DESIGN ............................................................................................................. 31
3.1 Introduction ................................................................................................................... 31
3.2 Design goals and objectives........................................................................................... 31
3.3 System architecture ....................................................................................................... 32
3.3.1 Architectural Design .................................................................................................................... 32
3.4 System Decomposition .................................................................................................. 34
3.5 Class mapping ............................................................................................................... 37
Description of class mapping .............................................................................................. 37
3.6 Data base design............................................................................................................ 39
CHAPTER FOUR ............................................................................................................... 40
IMPLEMENTATION DELIVERABLE OF THE NEW SYSTEM ..................................... 40
4.1 Introduction ................................................................................................................... 40
4.2 Component diagram ...................................................................................................... 40
II
4.3 Deployment diagram ..................................................................................................... 41
4.4user interface design ....................................................................................................... 42
CHAPTER FIVE ................................................................................................................ 50
Prototype Development ....................................................................................................... 50
CHAPTER SIX ................................................................................................................... 71
Testing ................................................................................................................................ 71
6.1 Introduction ................................................................................................................... 71
CHAPTER SEVEN............................................................................................................. 74
Conclusions and recommendation ....................................................................................... 74
7.1 Conclusions................................................................................................................... 74
III
List of Tables
Table 3.1: Data Base Design ............................................................................................................ 45
List of Figures
Figure 2.1: Use case Modeling ……………………………………………………………………………………………………15
Figure 2.2: Analysis class Modeling for mobile Anti-theft system………………….…...….16
Figure 2.3: Login Sequence Modeling ........................................... Error! Bookmark not defined.17
Figure 2.4 : Register detail in the database Sequence Modeling ............................................... 17
Figure 2.5: Re-register detail in the database Sequence Modeling ............................................ 18
Figure 2.6: Retrieve detail from database Sequence Modeling .................................................. 19
Figure 2.7: Receive SMS Sequence Modeling .............................................................................. 20
Figure 2.8: Retrieve GPS co-ordinate Sequence Modeling ......................................................... 21
Figure 2.9: Activity Modeling for login ......................................................................................... 22
Figure 2.10: Activity Modeling for Register detail in the database ........................................... 23
Figure 2.11: Activity Modeling for Re-register detail in the database ...................................... 24
Figure 2.12: Activity Modeling for Retrive detail in the database ............................................. 24
Figure 2.13: Activity Modeling for Receive SMS........................................................................ 25
Figure 2.14: Login Collaboration Modeling .................................................................................. 26
Figure 2.15: Register detail in the database Collaboration Modeling ........................................ 26
Figure 2.16: Re-register detail in the database Collaboration Modeling ................................... 27
Figure 2.17: Retrieve detail from database Collaboration Modeling ......................................... 27
Figure 2.18: Recive SMS Collaboration Modeling ...................................................................... 28
Figure 2.19: Retrieve GPS co-ordinate Collaboration Modeling ............................................... 28
Figure 2.20: Login state chart Modeling ........................................................................................ 29
Figure 2.21: Re-register detail in the database state chart Modeling ......................................... 30
Figure 2.22 Register detail in the database state chart Modeling ............................................... 30
Figure 3.1: Illustration of 3-Tier Architecture with Modeling .................................................... 42
Figure.3.2: System Architecture ....................................................................................................... 43
Figure 3.3: System Decomposition .................................................................................................. 45
Figure 3.4: Design Class diagram .................................................................................................... 46
Figure 4.1 Component Modeling .................................................................................................... 49
Figure 4.2 Deployment Modeling ................................................................................................... 50
Figure 4. 3Registrations Window of the system ............................................................................ 52
IV
Figure 4.4: Login window of the system…………………………………………………………………………………….53
Figure 4.5: Main window of the system………………………………………………………………………….…………54
Figure 4.6: Status window of the system……………………………………………………………………………….……55
Figure 4.7: Update window of the system…………………………………………………………………………….…….56
Figure 4.8: Uninstall Security window of the ystem………………………………………….…………….……...57
Figure 4.9: Help window of the system……………………………………………………………………………………...58
V
Acknowledgment
First of all we give praise for God of heaven, who brought us to Accomplishment our job and
who has given us success, helping us to pass safely through many difficulties Following this
we have no enough word to express our deepest gratitude and profound thanks to our advisor
Mr. Yitayal Abate for his technical guidance, constant Encouragement and specially
providing the necessary materials to complete this Documentation. We have no hesitation to
say that without his grateful help this work may have not been completed.
Last but not the least; we would like to thank all of our group members who contribute their
full effort & cooperation and our family members for their moral and financial support to
achieve all success in our life.
VI
Abbreviation and acronyms
UC Use case
UI User Interface
SDK Software Development Kit
GPS Global Positioning System
SMS Short Message Service
OS Operating System
SIM Subscriber Identity Module
API Application Programming Interface
IDE Integrated Development Environment
SQL Structured Query Language
MATS Mobile Anti-Theft System
OOA Object oriented analysis
OOD Object oriented design
UML unified modeling language
DFD data flow Modeling
DAL data access layer
DB Data base
DBMS data base management system
GSM Global system for mobile communication
OOSD object oriented system development methodology
ATS Anti-theft system
IMSI International Mobile Subscriber Identity
ABMATS Android Based Mobile Anti-Theft System
VII
Abstract
Mobile Anti-Theft system is an application based on Android used for tracing back
stolen or lost mobile. Once our system is installed onto android mobile phone and an
alternate number is fed into the software (ABMATS).
The owners SIM serial number gets registered in the file. Whenever phone is rebooted ATS is
invoked in stealth mode and verifies whether if the SIM card present in mobile phone is of
owner. If the SIM belongs to owner (registered in file), the software doesn’t do any
activity. If SIM is been changed and that SIM is not registered in the file then, ATS sends
a message to the alternative mobile number(friends / relatives number which is registered
by the owner of the android based mobile phone) in stealth mode and starts listening for
incoming SMS messages.
VIII
ANDROID BASED MOBILE ANTI-THEFT SYSTEM
CHAPTER ONE
SYSTEM PLANNING
1.0 Introduction
In today’s world cell phones play a very important role in every one’s life? It provides
multiple options like voice and video conversation, GPS tracking system, multimedia and
internet usage. Radio signals are constantly being broadcasted by cell phones and hence can
trace a lost mobile. Mobile phone tracking system technology can be deployed in any GSM
supported handsets. All cell phones constantly send signals to its nearest towers hence it is
been possible to track a lost phone accurately.
Mobile Anti- Theft System (ABMATS) is a project which is based on GPS satellite tracking
system which is been used by cars and road transport industry from years. GSM phone
tracking is likely to show the radius in which the phone is located but not the exact place and
even accuracy depends on factors like network coverage, landscape and weather conditions
also. When we couple GPS with Google maps the postal address of the lost mobile can be
found accurately [1].
1.1 Background
With the increasing of the mobile thefts, many tend to build interactive application for the
purpose of recover the lost mobile phone. But as the mobile technology developed, mobile
based application became increasingly popular among the people. Mobile phones are now
mini-computers which senses the environment through which they travel they gather and
generate data which can be Easley attached and abused yielding more intelligent aware
system. Newer mobile applications are leveraging the popularity of the social web revolution
and in particular system in which encourage users to generate and share content online to
enhance social mobile application.
Although there are many applications developed to recover the lost smart mobile phone in the
world but there is no any applications which work in smart phone which has Android OS
which doesn’t support GPS.
Android Baseed Mobile anti theft system is a project which helps us to recover the lost
smart phone.It consists of an Android client application which will automatically sendSMS.
when SIM cardis changed. Position tracker works on GPS (Global Positioning System) .
Even if a number of existing Mobile anti thef tandroid application are available in the world
they are not working in the smart phone which their android OS not support GPS.
1.4.1General Objective
The general objective of this project is to recover stolen or lost smart mobile phones.
1.5 Scope
Even if there are many people’s that require information about the thieves of their smart
phone in the world, The scope of the project is to model and design an application for most
well-known smart phones which support Google android operating system.
Limitation:
1.8Methodology
Methodology describes how the project team is going to implement the proposed system. In
order to do that first of all the project team have identified the main parts of the system
basically the project will be on developing a suitable mobile anti-theft system for the owner
of smart phone. And In order to do that we use the following methods.
Tools
The programming tools that the project concentrates are the following:
Software requirements:
Android SDK
ADT Plug-in
Eclipse [see Appendix A]
MS word 2007: for documentation and MS power point for presentation.
Paint: for editing
Window 7 Operating system
Edraw, MS Visio, Visual paradigm and Rational Rose.
Hardware requirements:
Printer: for printing document
Paper, pencil, pen, computer, projector, etc.
Technologies
Android SDK: It includes a mobile device emulator, a virtual device emulator that runs
directly on computer. With the help of this emulator we will prototype, develop and test our
application without having a physical device (when one was not available) [2]
1.9Resources
Based on the project plan above this project will need the following recourse's to meet our
objective. If fewer resources are available, the plan must be changed accordingly.
Expertise from mobile application android system developers this is crucial because
the whole application and project will relay on it. The amount of information we gather
will have direct effect on the application.
Time must be spent on studying how android application will work, UI design,
coding/implementation and reporting.
User: the project will need some user/friends to test our application and receive their
feedback to evaluate the overall of project quality in the end.
Hardware the project development must be based on a real Android phone so that the
scenario can be simulated, design and implementation can be better tested [1].
1.10 Risk
The main risks that we are going to face are:-
Difficulties for us to build an application for an Android phone because our lack of
knowledge and coding experience for a mobile. We will certainly make mistakes and
following the philosophy of learning by doing. We will address the issue by devoting
more time on study of android programming.
Our lack of knowledge about android system.
Lack of resources about mobile applications in general in this university.
Power fluctuation problem.
Damage on the computers that we work on.
The unavailability of data source (information gathering) on time may extend the
project completion time. We managed this problem using different methodology.
Damage on the computers that we work on, it is managed by using backup.
Lack of reference books. We managed this problem by using other methods
such as internet.
Shortage of Time. We managed such problem by using additional time from
our rest time.
Virus can attack our project. We used updated antivirus to manage this
problem.
Power fluctuation problem. It is using laptop that have high power pack ups
are used.
Team organization
The project team composed of 5 members, one team leader, one deputy leader, one
secretary, and 2 members .Problem solving is group activity. Decision on problem and
approach are made by group agreement, which is much better than individual decision.
CHAPTER TWO
SYSTEM ANALYSIS
2.1 Introduction
It is necessary to know the existing system of mobile anti-theft system or service to develop a
better system .The target area of this project is to develop a system that help the owner of
smart phone to recover his/her smart mobile phone by providing certain information about
the thieves. The system that we are going to develop is used for all smart phone users around
the world. In this section we are going to discusses about the existing system of mobile anti-
theft system in the world, the system that we are going to develop, functional requirements
for our system and also non-functional requirements about our system.
Time consuming
When the SIM card changes the application require more time to get the GPS location of the
lost mobile phone due to connection and other problem.
GPS dependent
Until GPS is work properly the current system is doesn’t send any information about the
thieves even if the lost mobile is rebooted.
System should not send SMS when the system status OFF.
That includes:
Performance Requirements:
Application must respond within 5 seconds excluding GPS enabling time. The user must use
the required option to get the information of the users.
Portability:
The project is built using JAVA [see Appendix A] and can be run on any device which uses
android OS.
Maintainability:
Since we are using JAVA software to support our application no maintenance is very easy
and economical.
Purpose:
Purpose the main purpose of a use case Modeling is to show who interacts with our system,
and the main goals they achieve with it. Its purpose is to present a graphical overview of the
functionality provided by a system in terms of actors, their goals (represented as use cases),
and any dependencies between those use cases and to document the interaction between the
users and the system using supporting use case descriptions. Use case Modeling s are used to
show the behavior of the system we are developing [3]
Identification: - UC01.
Description: - This use case describes how the Owner logs into the android based mobile
Anti-thief System.
Actor: - Owner.
Precondition: none.
Post condition: - If the use case was successful, the actor is now logged into the system. If
not the system state is unchanged.
Basic Flow
This use case starts when an actor wishes to log into the mobile Anti-thief System.
Alternative Flows
Invalid Name/Password
If in the Basic Flow the actor enters an invalid password; the system displays an error
message. The actor can choose to either return to the beginning of the Basic Flow or cancel
the login, at which point the use case ends.
Identification: - UC02.
Actor: - Owner
Preconditions
Post conditions
2. The owner is shown a screen where the owner can register the password, username and
the relative phone number of the application
3. The owner must add his password (mandatory), username (mandatory) and a relative
phone number (mandatory)
Identification: - UC03.
Actor: - Owner.
Precondition: - The owner must have all the necessary information to be updated and login
in to the application installed in their mobile phone.
Basic Flow
Identification: - UC04.
Actor: - Owner.
Precondition: - the owner must have login in to the application installed in their mobile
phones.
Post condition: - The owner accesses the information from the database.
Basic Flow
Identification: - UC05.
Actor: - Relative.
Precondition: - The phone must have the application installed in it and rebooted.
Post condition: - The relative get the GPS co-ordinate, SIM serial number and phone
number.
Basic Flow
Description: - Relative can view the location of the lost mobile phone.
Actor: - Relative.
Precondition: - The application must send the SMS when the SIM card changed.
Post condition: - The alternative can tell the location of lost mobile phone to the owner so
they can recover that of lost mobile phone.
Basic Flow
Identification: - UC07.
Description: - The thief changes the SIM card of his phone when he\she stole the phone.
Precondition: - none.
Basic Flow
Classes modeling describe the structure of the system in terms of classes and objects. Classes
are abstractions that specify the attributes and behavior of a set of objects. Objects are entities
that encapsulate state and behavior. Each object has an identity.
In the Modeling, classes are represented with boxes which contain three parts:
Sequence Modeling is dynamic model of use cases, showing the interaction among classes
during a specified time period. Sequences modeling graphically document the use case by
showing the classes, the messages, & the timing of the messages [7].
The interaction proceeds from top to bottom a vertical timeline, while the horizontal arrows
represent messages from one object to another.
Sequence Modeling is used to model the logic contained in usage scenarios. A usage scenario
is the description of the way a potential use case is used.
A sequence modeling in our system is used to formalize the behavior of the system and to
visualize the communication among objects. It helped us to identify additional objects and
participate in the use case. This phase of the document ties use cases with objects and shows
the behavior of a use case is distributed among its participating objects.
4.clickOk()
5.check()
6.Display()
Sequence
diagram for Application RegistrationWindow Registration MainWindow Database
Register detail in Owner
Controller
the database
use case 1.open()
2.Display()
3.FillForm
4.Ok() 5.Validate
6.continue()
Display()
4. Ok()
5. Check()
6. Display Window()
7. Click Update()
8. Display Update Window()
9. Fill Fields()
10. Ok()
11. Validate Phone Number()
12. continue()
III) sequence
diagrams for Application Login window View window Main window Database
Owner
Retri...
1.Open()
2.Display()
3.Enter username and password
4.Ok()
5.Check()
6.Display()
7.ClikView Button
8.Ok()
9.Display()
Activity Modeling is used to document the logic of a single operation/method, a single use
case, or flow of logic of business operation. In many ways activity Modeling are the object
oriented equivalent of flow charts and data flow Modeling s (DFD) from structured
development. This part of the project documentation consists of an activity Modeling that
shows the flow of action in main use cases [8].
But, the collaboration Modeling emphasizes the context and the overall organization of the
objects that interact. It shows the message the object sends in addition to the association
among objects. Moreover it arranged according to space whereas sequence Modeling is
arranged according to time. To represent a message, you draw an arrow near the association
line between two objects. The arrow points to the receiving object. A label near the arrow
shows what the message is. The message typically tells the receiving object to execute one of
its operations.
1: 1.Open()
Applicati
on
5: 5.check()
2: 2.Display login window()
4: 4.clickOk()
LginWind
Database ow
6: 6.Display()
MainWin
dow
3: 3.FillForm
RegistrationWi
ndow
2: 2.Display()
: owner
1:
7: Display()
4: 4.Ok()
MainWind
ow
Applicati
on
5: 5.Validate
6: 6.continue()
Registration Database
Controller
Applicati
on
1: 1. Open()
Login
3: 3.Enter Username and password
Window
2: 2.Display()
9: 9. Fill Fields()
: Owner
Update
Control
Database
12: 12. continue()
Applicati
1: 1.Open() on
3: 3.Enter username and password
Login
window
2: 2.Display()
: Owner
7: 7.ClikView Button
8: 8.Ok()
4: 4.Ok()
6: 6.Display()
9: 9.Display()
View
window
5: 5.Check()
Main Database
window
4: Send SMS()
Database
Mobile
phone Database
Applicati
on
: :Relative
State chart Modeling describes the flow of control from one state to another state. States are
defined as a condition in which an object exists and it changes when some event is triggered.
So the most important purpose of State chart Modeling is to model life time of an object from
creation to termination [7].
State chart Modeling are also used for forward and reverse engineering of a system. But the
main purpose is to model reactive system.
Initial State
Valid
Login
succsses
Complet State
Initial State
UNnormal Exit Normal Exit
Complet State
Initial State
UnNormal Exit
Confrim
Registration
Normal Exit
Complet State
CHAPTER THREE
SYSTEM DESIGN
3.1 Introduction
System design is the solution to the creation of a new system. This phase is composed of
several systems. This phase focuses on the detailed implementation of the feasible system. It
emphasis on translating design specifications to performance specification is system design.
System design has two phases of development logical and physical design.
During logical design phase the analyst describes inputs (sources), outputs (destinations),
databases (data stores) and procedures (data flows) all in a format that meats the user’s
requirements. The analyst also specifies the user needs and at a level that virtually determines
the information flow into and out of the system and the data resources. Here the logical
design is done through data flow diagram s and database design [5].
The physical design is followed by physical design or coding. Physical design produces the
working system by defining the design specifications, which tell the programmers exactly
what the candidate system must do. The programmers write the necessary programs that
accept input from the user, perform necessary processing on accepted data through call and
produce the required report on a hard copy or display it on the screen.
The goal of the system design is to manage complexity by dividing the system in to
manageable pieces.
Response time: It has less response time. That is active in short period of time.
Modifiability: The system should be modifiable to modify different services
depending on the need of the user.
Flexibility: The system should be changeable to suit new condition or situation.
Efficiency: The system must do what it supposed to do efficiently without the
problem.
Availability: Discusses the ability of an application to be present and ready for use
Portability: the system is portable from one cell phone platform in to other platforms
easily, i.e. the system primarily designed to be used in many plat forms.
End User Criteria: It has good user friendly relation and simple button term.
Security: our system is secure due to having strong password which contains letters,
numbers and special characters with user name.
3.3 System architecture
3.3.1 Architectural Design
3-Tier architecture is also called layered architecture. Some people called it n-tier
architecture. Layer architectures are essentially objects and work in object oriented
environment. 3-tier architecture is a very well-known architecture in the world of software
development, it doesn't matter whether you are developing web based application or desktop
based, it is the best architecture to use.
Presentation Layer:
Presentation layer consists of pages like .java or desktop based form where data is presented
to users or getting input from users.
Business logic layer contains all of the business logic. Its responsibility is to validate the
business rules of the component and communicating with the Data Access Layer. Business
Logic Layer is the class in which we write functions that get data from Presentation Layer
and send that data to database through Data Access Layer.
Data Access Layer is also the class that contains methods to enable business logic layer to
connect the data and perform desired actions. These desired actions can be selecting,
inserting, updating and deleting the data. DAL accepts the data from BAL and sends it to the
database or DAL gets the data from the database and sends it to the business layer. In short,
its responsibility is to communicate with the backend structure.
It is a common analytical technique, and business analysts use it frequently. Among the
things business analysts commonly decompose are:
Each subsystem has its own function and there is also communication among them to
exchange information. The system is decomposed according to the specialized task it
performs to ensure high coherence. The level of coupling is relatively low because the
interactions between subsystems are only exchange of data
Registration subsystem
This subsystem deals with the registration facilities of the system. It involves the information
that registers on the phone the Owner’s Relative about the phone details (phone No, name…).
There for this subsystem contains all information that we need to register to access thief’s
information.
Security subsystem
This subsystem controls the thief of the smart phone when he/she try to uninstall the
application.
Registration
Login
SMS Sending
Receive SMS
Security
Login
Attributes:
Filename:
It Identify name of the file
It has string data type
It has max-size 45
Mobile no
It has string data type
It has unique value
Class Name: login
Attributes:
User Name
It has string data type
It has max-size 25
It Identify username of the application
Password
It has string data type
It has max-size 32
It can maintain Numbers, text digits, special characters etc.
Class Name: Registration
Attributes:
User name
It has string data type
It Identify name of use
It Identify username of the application
Password
It has string data type
It has max-size 32
It can maintain Numbers, text digits, special characters etc.
Relative phone No
It has unique phone No
It has string data type
Max-size 10
Class Name: GPS tracker
Attributes
Location
It describes the place where the lost phone found
It has Boolean data type
It depends on Google map
It shows the latitude & longitude of the phone position
Attributes:
Much thought, as data and reporting requirements become more complex, those same people
will simply and produce the required data by incorrectly adding more columns of tables to the
database.
CHAPTER FOUR
IMPLEMENTATION DELIVERABLE OF THE NEW
SYSTEM
4.1 Introduction
Implementation refers to the Coding of the all documents gathered starting from
requirement analysis to Design phase. So now the team is in a position of converting
all documents gathered and designed into the code so that the system will be
implemented for the user to be used for the purpose it developed. To implement it the
user must have smart phones which have an android operating system.
In this Modeling components of the system will be wired showing that there is relation
among components, management of the system, database and operations performed on
databases such security issue. This in some extent shows which component or objects will be
accessed by whom and what type of security infrastructures it is using. The Modeling is
simulated below.
Android is a software stack for mobile devices that includes an operating system,
middleware and key applications. Android relies on Linux OS for core system services such
as security, memory management, process management, network stack, and driver model.
The Linux kernel also acts as an abstraction layer between the hardware and the rest of the
software stack [9].
Android applications are written in Java. Android SDK tools compile and package the code
along with any required data and resource files into Android application archive file having
.apk suffix. The .apk file represents one Android application to be deployed to the Android-
enabled mobile devices [1].
As an analysis artifact that enables you to explore the problem space with your
stakeholders.
As a requirements artifact to initially envision the system.
As a design artifact that enables you to explore the solution space of your system.
A vehicle for you to communicate the possible UI design(s) of your system.
A potential foundation from which to continue developing the system (if you intend to
throw the prototype away and start over from scratch then you don’t need to invest the
time writing quality code for your prototype) the following Figure 3.4 shows
interface prototype for our system .
In this system users will communicate with the system through the following user interfaces.
Registration Window: This form appears on the first form of the application in which the system
deployed is opened two buttons named save and cancel.
CHAPTER FIVE
Prototype Development
Prototype development can be defined it is the sample code of the given project.
These are some of the sample codes that we have done.
Package com.example.sim_card_tracking_ant_theft;
import java.io.FileOutputStream;
import com.example.sim_card_tracking_ant_theft.VivzDatabaseAdapter.VivzHelper;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.telephony.TelephonyManager;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
Intent i=null;
int simstatus;
String simNo;
Button btn1,btn2;
String pass11;
EditText txt1,txt2,txt3,txt4,txt5,pass;
VivzDatabaseAdapter vivzhelper;
VivzHelper v;
@Override
super.onCreate(savedInstanceState);
v=new VivzHelper(this);
v.getWritableDatabase();
vivzhelper=new VivzDatabaseAdapter(this);
if(s2==null||s2=="")
simstatus=tManager.getSimState();
if (simstatus != TelephonyManager.SIM_STATE_ABSENT)
simNo = tManager.getSimSerialNumber();//getSimSerialNumber();
FileOutputStream fos;
try {
fos.write(simNo.getBytes());
+ simNo);
fos.close();
} catch (Exception e) {
e.printStackTrace();
setContentView(R.layout.activity_boot_complete);
else
setContentView(R.layout.register);
txt1=(EditText)findViewById(R.id.name);
txt2=(EditText)findViewById(R.id.phone1);
txt3=(EditText)findViewById(R.id.phone2);
txt4=(EditText)findViewById(R.id.password);
txt5=(EditText)findViewById(R.id.password1);
String owner=txt1.getText().toString();
String pno1=txt2.getText().toString();
String pno2=txt3.getText().toString();
String pass=txt4.getText().toString();
String pass1=txt5.getText().toString();
if(owner==null||owner==""||!owner.matches("[A-Za-z]+"))
txt1.setText("");
txt1.setFocusable(true);
txt1.setBackgroundColor(Color.RED);
else if(pno1==null||pno1==""||pno1.length()<10||!pno1.matches("[0-
9]+"))
txt2.setText("");
txt2.setFocusable(true);
txt2.setBackgroundColor(Color.RED);
else if(pno2==null||pno2==""||!pno2.matches("[0-9]+"))
txt3.setBackgroundColor(Color.RED);
txt3.setText("");
txt3.setFocusable(true);
else if(pass==null||pass==""||pass.length()<6)
txt4.setBackgroundColor(Color.RED);
txt4.setText("");
txt4.setFocusable(true);
else if(!(pass.equals(pass1)))
txt5.setBackgroundColor(Color.RED);
txt4.setText("");
txt4.setFocusable(true);
txt5.setText("");
txt5.setFocusable(true);
else
if(id<0)
Message.message(this, "Unsuccessful");
else
txt1.setText("");
txt2.setText("");
txt3.setText("");
txt4.setText("");
txt5.setText("");
i=new Intent(this,Main.class);
startActivity(i);
System.exit(1);
pass=(EditText)findViewById(R.id.passwordLogin);
pass11=pass.getText().toString();
if(pass11.equals(sol))
i=new Intent(this,Main.class);
startActivity(i);
else
try {
String s3=vivzhelper.getpassword().toString();
SmsManagersmsManager = SmsManager.getDefault();
Toast.LENGTH_LONG).show();
catch (Exception e) {
Toast.makeText(getApplicationContext(),
Toast.LENGTH_LONG).show();
e.printStackTrace();
@Override
publicbooleanonCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_boot_complete, menu);
return true;
<LinearLayout
android:id="@+id/LinearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/images"
android:orientation="vertical"
android:padding="15dp"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingTop="10dp">
<TextView
android:id="@+id/txt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#000000"
android:gravity="center"
android:paddingBottom="2dp"
android:text="@string/top"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="24sp"
android:textStyle="normal|bold"/>
<EditText
android:id="@+id/name"
android:layout_width="280dp"
android:layout_height="50dp"
android:background="#ffffff"
android:ems="10"
android:inputType="textPersonName"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:focusable="true">
<requestFocus/>
</EditText>
<TextView
DBU DEP’T OF COMPUTER SCIENCE FINAL PROJECT 2007 E.C Page 57
ANDROID BASED MOBILE ANTI-THEFT SYSTEM
android:id="@+id/txt2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#000000"
android:gravity="center"
android:padding="2dp"
android:text="@string/top1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="24sp"
android:textStyle="normal|bold"/>
<EditText
android:id="@+id/phone1"
android:layout_width="280dp"
android:layout_height="50dp"
android:background="#FFFFFF"
android:ems="10"
android:inputType="phone"
android:maxLength="13"
android:paddingBottom="3dp"
android:paddingTop="3dp"
/>
<TextView
android:id="@+id/txt3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#000000"
android:gravity="center"
android:padding="2dp"
android:text="@string/top2"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="24sp"
android:textStyle="normal|bold"/>
<EditText
android:id="@+id/phone2"
android:layout_width="280dp"
android:layout_height="50dp"
android:background="#FFFFFF"
android:ems="10"
android:inputType="phone"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:maxLength="13"
/>
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#000000"
android:gravity="center"
android:padding="2dp"
android:text="@string/top3"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="24sp"
<EditText
android:id="@+id/password"
android:layout_width="280dp"
android:layout_height="50dp"
android:background="#FFFFFF"
android:ems="10"
android:inputType="textPassword"
android:paddingBottom="3dp"
android:paddingTop="3dp"/>
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#000000"
android:gravity="center"
android:padding="2dp"
android:text="@string/top4"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffff"
android:textSize="24sp"
android:textStyle="normal|bold"/>
<EditText
android:id="@+id/password1"
android:layout_width="280dp"
android:layout_height="50dp"
android:background="#FFFFFF"
android:ems="10"
android:inputType="textPassword"
android:paddingBottom="3dp"
android:paddingTop="3dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:paddingTop="10dp">
<Button
android:id="@+id/save"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="2"
android:background="@drawable/save66"
android:onClick="insert"/>
<Button
android:id="@+id/cancel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="2"
android:background="@drawable/cancel"
android:onClick="getAll"
android:paddingTop="10dp"/>
</LinearLayout>
package com.example.sim_card_tracking_ant_theft;
importandroid.content.ContentValues;
import android.content.Context;
importandroid.database.Cursor;
importandroid.database.SQLException;
importandroid.database.sqlite.SQLiteDatabase;
importandroid.database.sqlite.SQLiteOpenHelper;
import android.widget.Toast;
VivzHelper helper;
String phhh,phhh1;
helper=new VivzHelper(context);
SQLiteDatabase db=helper.getWritableDatabase();
/*int id1=3;
contentValues.put(VivzHelper.UID, id1);*/
contentValues.put(VivzHelper.NAME, name);
contentValues.put(VivzHelper.PHONENUMBER1, phone1);
contentValues.put(VivzHelper.PHONENUMBER2, phone2);
contentValues.put(VivzHelper.PASSWORD, pass);
contentValues.put(VivzHelper.STATUS, "ON");
contentValues.put(VivzHelper.UNINISTAL_SECURITY,
"DEACTIVATE");
return id;
SQLiteDatabase db=helper.getWritableDatabase();
String[]
columon={VivzHelper.UID,VivzHelper.NAME,VivzHelper.PHONENUMBER1,Viv
zHelper.PHONENUMBER2,VivzHelper.PASSWORD,VivzHelper.STATUS,VivzHel
per.UNINISTAL_SECURITY};
while(cursor.moveToNext())
intcid=cursor.getInt(0);
String name1=cursor.getString(1);
String ph1=cursor.getString(2);
String ph2=cursor.getString(3);
String phass=cursor.getString(4);
String status=cursor.getString(5);
String security=cursor.getString(6);
returnbuffer.toString();
SQLiteDatabase db=helper.getWritableDatabase();
String[]
columon={VivzHelper.UID,VivzHelper.NAME,VivzHelper.PHONENUMBER1,Viv
zHelper.PHONENUMBER2,VivzHelper.PASSWORD,VivzHelper.STATUS,VivzHel
per.UNINISTAL_SECURITY};
while(cursor.moveToNext())
intcid=cursor.getInt(0);
String name1=cursor.getString(1);
String ph1=cursor.getString(2);
String ph2=cursor.getString(3);
String phass=cursor.getString(4);
String status=cursor.getString(5);
String security=cursor.getString(6);
phhh=ph1;
returnphhh;
SQLiteDatabase db=helper.getWritableDatabase();
String[]
columon={VivzHelper.UID,VivzHelper.NAME,VivzHelper.PHONENUMBER1,Viv
zHelper.PHONENUMBER2,VivzHelper.PASSWORD,VivzHelper.STATUS,VivzHel
per.UNINISTAL_SECURITY};
while(cursor.moveToNext())
intcid=cursor.getInt(0);
String name1=cursor.getString(1);
String ph1=cursor.getString(2);
String ph2=cursor.getString(3);
String phass=cursor.getString(4);
String status=cursor.getString(5);
String security=cursor.getString(6);
phhh=ph2;
returnphhh;
SQLiteDatabase db=helper.getWritableDatabase();
String[]
columon={VivzHelper.UID,VivzHelper.NAME,VivzHelper.PHONENUMBER1,Viv
zHelper.PHONENUMBER2,VivzHelper.PASSWORD,VivzHelper.STATUS,VivzHel
per.UNINISTAL_SECURITY};
while(cursor.moveToNext())
intcid=cursor.getInt(0);
String name1=cursor.getString(1);
String ph1=cursor.getString(2);
String ph2=cursor.getString(3);
String phass=cursor.getString(4);
String status=cursor.getString(5);
String security=cursor.getString(6);
phhh1=name1;
return phhh1;
SQLiteDatabase db=helper.getWritableDatabase();
String[]
columon={VivzHelper.UID,VivzHelper.NAME,VivzHelper.PHONENUMBER1,Viv
zHelper.PHONENUMBER2,VivzHelper.PASSWORD,VivzHelper.STATUS,VivzHel
per.UNINISTAL_SECURITY};
while(cursor.moveToNext())
intcid=cursor.getInt(0);
String name1=cursor.getString(1);
String ph1=cursor.getString(2);
String ph2=cursor.getString(3);
String phass=cursor.getString(4);
String status=cursor.getString(5);
String security=cursor.getString(6);
phhh1=phass;
return phhh1;
SQLiteDatabase db=helper.getWritableDatabase();
String[]
columon={VivzHelper.UID,VivzHelper.NAME,VivzHelper.PHONENUMBER1,Viv
zHelper.PHONENUMBER2,VivzHelper.PASSWORD,VivzHelper.STATUS,VivzHel
per.UNINISTAL_SECURITY};
while(cursor.moveToNext())
intcid=cursor.getInt(0);
String name1=cursor.getString(1);
String ph1=cursor.getString(2);
String ph2=cursor.getString(3);
String phass=cursor.getString(4);
String status=cursor.getString(5);
String security=cursor.getString(6);
phhh1=status;
return phhh1;
SQLiteDatabase db=helper.getWritableDatabase();
String[]
columon={VivzHelper.UID,VivzHelper.NAME,VivzHelper.PHONENUMBER1,Viv
DBU DEP’T OF COMPUTER SCIENCE FINAL PROJECT 2007 E.C Page 66
ANDROID BASED MOBILE ANTI-THEFT SYSTEM
zHelper.PHONENUMBER2,VivzHelper.PASSWORD,VivzHelper.STATUS,VivzHel
per.UNINISTAL_SECURITY};
while(cursor.moveToNext())
intcid=cursor.getInt(0);
String name1=cursor.getString(1);
String ph1=cursor.getString(2);
String ph2=cursor.getString(3);
String phass=cursor.getString(4);
String status=cursor.getString(5);
String security=cursor.getString(6);
phhh1=security;
return phhh1;
SQLiteDatabase db=helper.getWritableDatabase();
int id=1;
String where=VivzHelper.UID+"="+id;
contentValues.put(VivzHelper.NAME, name);
DBU DEP’T OF COMPUTER SCIENCE FINAL PROJECT 2007 E.C Page 67
ANDROID BASED MOBILE ANTI-THEFT SYSTEM
contentValues.put(VivzHelper.PHONENUMBER1, phone1);
contentValues.put(VivzHelper.PHONENUMBER2, phone2);
contentValues.put(VivzHelper.PASSWORD, pass);
returndb.update(VivzHelper.TABLE_NAME, contentValues,
where,null )!=0;
SQLiteDatabase db=helper.getWritableDatabase();
contentValues.put(VivzHelper.STATUS, cursta);
String[] where={id};
int m=db.update(VivzHelper.TABLE_NAME,
contentValues,VivzHelper.UID+"=?",where);
return m;
SQLiteDatabase db=helper.getWritableDatabase();
contentValues.put(VivzHelper.UNINISTAL_SECURITY, cursta);
String[] where={id};
int m=db.update(VivzHelper.TABLE_NAME,
contentValues,VivzHelper.UID+"=?",where);
return m;
super(context,DATABASE_NAME,null,DATABASE_VERSION);
this.context=context;
@Override
try {
db.execSQL(CREATE_TEBLE);
} catch (SQLException e) {
@Override
try {
db.execSQL(DROP_TABLE);
onCreate(db);
} catch (SQLException e) {
CHAPTER SIX
Testing
6.1 Introduction
System Testing
Software testing is the process of evaluation a software item to detect differences between
given input and expected output. Also to assess the feature of A software item. Testing
assesses the quality of the product. Software testing is a process that should be done during
the development process. In other words software testing is a verification and validation
process [10].
Verification
Verification is the process to make sure the product satisfies the conditions imposed at the
start of the development phase. In other words, to make sure the product behaves the way we
want it to [10].
Validation
Validation is the process to make sure the product satisfies the specified requirements at the
end of the development phase. In other words, to make sure the product is built as per
customer requirements [10].
There are two basics of software testing: black box testing and white box testing.
Black box testing is a testing technique that ignores the internal mechanism of the system and
focuses on the output generated against any input and execution of the system. It is also
called functional testing [10].
White box testing is a testing technique that takes into account the internal mechanism of a
system. It is also called structural testing and glass box testing.
Black box testing is often used for validation and white box testing is often used for
verification [10]. There are many types of testing like:
Unit Testing
Unit testing is the testing of an individual unit or group of related units. It falls under the class
of white box testing. It is often done by the programmer to test that the unit he/she has
implemented is producing expected output against given input [10].
Integration Testing
Integration testing is testing in which a group of components are combined to produce output.
Also, the interaction between software and hardware is tested in integration testing if
software and hardware components have any relation. It may fall under both white box
testing and black box testing [10].
Functional Testing
Functional testing is the testing to ensure that the specified functionality required in the
system requirements works. It falls under the class of black box testing [10].
System Testing
System testing is the testing to ensure that by putting the software in different environments
(e.g., Operating Systems) it still works. System testing is done with full system
implementation and environment. It falls under the class of black box testing [10].
Performance Testing
Performance testing is the testing to assess the speed and effectiveness of the system and to
make sure it is generating results within a specified time as in performance requirements. It
falls under the class of black box testing [10].
Usability Testing
Usability testing is performed to the perspective of the client, to evaluate how the GUI is
user-friendly? How easily can the client learn? After learning how to use, how proficiently
can the client perform? How pleasing is it to use its design? This falls under the class of black
box testing [10].
Acceptance Testing
Acceptance testing is often done by the customer to ensure that the delivered product meets
the requirements and works as the customer expected. It falls under the class of black box
testing [10].
Finally we conclude that black box testing is more appropriate than white box testing,
because black box testing takes an external perspective of the test object to derive test cases.
These tests can be functional or non-functional, though usually functional. The test designer
selects valid and invalid input and determines the correct output. There is no knowledge of
the test object's internal structure.
CHAPTER SEVEN
Conclusions and recommendation
7.1 Conclusions
This is a system development project with two phases; the first phase deals with the analysis
phase and the next phase addresses the Design phase. As the end of the first phase, we need
to review that we have covered in accordance with what we have planned at the beginning.
We began our work by identifying the significance of creating a mobile application that can
guide user to recover their lost android smart phone. This involved defining the system
development methodology, identifying resource and cost requirements, and setting the
deliverable and scheduled for the project.
The Analysis phase helps the team to truly understand the major functional areas and
processes of the system. Through this we evaluate the existing system weakness and strength.
After that, we performed requirements identification to discover user and system
requirements. This phase consisted of drawing the functional as well as non-functional
requirements of the system. Then we have undertaken a major phase in system development
process: object oriented Analysis. In this phase, we tried to model the new system we
proposed using UML Modeling s: Use case, sequence, and activity and class Modeling s
Also, we designed the new system user interface prototype.
7.2 Recommendation
The system that we are trying to develop is not a fully executed system. Because we were
new to the system we missed out some parts which should be included in the system.
Future work of the system can perform the following functionalities. The developed
and previously tested functionalities can be modified later with more user-friendly functions
to make the system more useful.
Now the application is working for Device application.Maintainingshare pricedetails as
a localized system and accessing the details anywhere in the world. Later we can
implement some telecom concepts, so that the user will get the information about the
activities of the company in a mobile device. As technology and requirements are changing
day by day, we can add more functionality and we can implement the system with new
requirements. The system is designed in such a way that it is flexible to change any further
requirements Prescribed by the user.
DBU DEP’T OF COMPUTER SCIENCE FINAL PROJECT 2007 E.C Page 74