Sie sind auf Seite 1von 57

A

Project Report
On
Family Tracker
Submitted
In partial fulfilment
For the award of the Degree of
BACHELOR OF TECHNOLOGY
In
COMPUTER ENGINEERING

Guided By: Submitted By:


Mr. Manish Choubisha Abhishek Sharma (13EAICS006)
Assistant Professor Komal Kumari (13EAICS182)
Gunjan Shekhawat (13EAICS047)

Department of Computer Science &Engineering


Arya Institute of Engineering & Technology, Jaipur
Rajasthan Technical University, Kota
[2013-17]
Candidates Declaration

I hereby declare that the work, which is being presented in the practical training seminar,
entitled Family Tracker in partial fulfilment for the award of Degree of Bachelor of
Technology in Computer Science & Engineering, submitted to the Department of
Computer Science & Engineering, Arya Institute of Engineering & Technology,
Rajasthan Technical University is a record of my own work carried under the Guidance of
Mr. Manish Choubisha, Assistant Professor, Department of Computer Science &
Engineering.
I have not submitted the matter presented in this Report anywhere for the award of any
other Degree.

(Signature of Candidate)
Abhishe Sharma (13EAICS006)

Acknowledgement
1
We wish to express our deep sense of gratitude to our Practical Training
Guide Mr. Manish Choubisha for guiding me from the inception till the
completion of the project. We sincerely acknowledge her for giving her
valuable guidance, support for literature survey, critical reviews and
comments for our Project.

We would like to first of all express our thanks to Dr. Arvind Agarwal,
Chairman of Arya Main Campus, for providing us such a great infrastructure
and environment for our overall development.

We express sincere thanks to Prof (Dr.)R C Bansal the Principal of AIET, for
his kind cooperation and extendible support towards the completion of our
project. Words are inadequate in offering our thanks to Er. Shayar Singh
Shekhawat, Head of CSE Department, for consistent encouragement and
support for shaping our project in the presentable form.

We also express our deepest thanks to Er. Vishnu Barodiya, Project


Coordinator for his support in providing technical requirement and fulfilling
our various other requirements for making our project success.

We also like to express our thanks to all supporting CSE faculty members
who have been a constant source of encouragement for successful completion
of the project.

Also our warm thanks to Arya Institute of Engineering & Technology, who
provided us this opportunity to carryout, this prestigious Project and enhance
our learning in various technical fields.

Abhishek Sharma (13EAICS186)

Abstract
Introduction:
2
Personal Tracking Systems are the tracking devices specially built up for personal
information. The person takes it with him and the information of where he is presently is
provided.
The same system has been implemented in this mobile tracking application
i.eTrackMeApp but various extended features that the existing system does not have. This
system is GPS enabled android mobile phone whose location is tracked. Our application
provides the functionality of defining the geo-fence areas as safe, risky and highly risky.
Objective:
The application aims at providing a simple way-out for ensuring the childs safety all the
while he is by his own. The main objectives of this application are as follows: The
application is basically a tool to be used in an emergency by the victim to get necessary
help from reliable people.

Some of the key goals of our project are as mention below:

The application would provide the ability to divide interested geo-graphical area
into different sub zones (e.g. safe, risky, highly risky etc.) and based on breaching
of these zones a different alert message would be sent to registered users.

The application would also provide the ability to automatically send a message to
registered users with mobiles current location after user configured time interval.

On geographical boundary breach, the application would warn user in the form of a
message with beep so that mobile user would also be well informed about risk
associated with his/her movement.

Benefits:
The app is very simple and interactive in design and to implement. The app requires very
low system resources and the app will work in almost all configurations. It has got
following features:

Time saving.

Reduce downtime

Optimize resources

Self demonstrative

Implementation Software and Hardware:


Android Studio 2.1.3
3
Jdk 1.8

GenyMotion

Software Requirements:

Operating System : Android

Front End : XML

Back End : Java

Hardware Requirements:
RAM : 2 GB( Android Studio installation ) , 150 MB in device

Hard-Disk : 5 GB

Table of Content

Cover Page
Certificate
Candidates Declaration i
Acknowledgement ii
4
Abstract iii
Table of Content v-vii
List of viii
Abbreviations.......................................................................................................
List of ix
Figures ..................................................................................................................
List of x
Tables ...................................................................................................................
Chapter 1 Introduction 1-6

1.1 1
Overview ............................................................................................... 1
1.2 Objective of the 1
Project .........................................................................
2
1.3 Technology to be
3
used ..........................................................................
3
1.3.1 Introduction to
4
Android .............................................................
5
1.3.2 Versions of
6
Android ...................................................................

1.3.3 Features of
Android ....................................................................

1.3.4 Building blocks of


Android ........................................................

1.3.5 Creating an Android


project.......................................................

1.4 Scope of the


Project .............................................................................
Chapter 2 Literature Survey 7-9

2.1 7
Introduction ........................................................................................... 7
2.1.1 Google 8
Map...................................................................................
8

5
2.1.2 Gps Module 9
...........................................................

2.1 Server Module


......................................................................

2.1.3 Client
Module ................................................................................
Chapter 3 Feasibility Study & Risk Analysis 10-13
3.1 10
Introduction ..........................................................................................
10
3.1.1 Technical Feasibility
10
.....................................................................
11
3.1.2 Economic
11
Feasibility .....................................................................
12
3.1.3 Operational
Feasibility .................................................................. 12

3.2 Risk 13

Analysis ......................................................................................

3.2.1 Project
Risk ..................................................................................

3.2.2 Product
Risk ..................................................................................

3.2.3 Business
Risk ...............................................................................
Chapter 4 Requirement Analysis 14-15
4.1 14
Introduction .......................................................................................... 14
4.1.1 Operating
14
Environment ................................................................. 14
4.1.2 Hardware
14
requirements .................................................................
15
4.1.3 Software
15
requirements ..................................................................
15
4.1.4
15
Planning ........................................................................................
6
4.1.5
Activities........................................................................................
4.1.6
Layouts ..........................................................................................
4.1.7 Resource
files ................................................................................
4.1.8 Hardware
requirements ................................................................
Chapter 5 System Analysis & Design 16-22

5.1 Modules 16
Description ............................................................................. 16
5.1.1 Home
17
Screen ................................................................................ 17
5.1.2
17
Contacts .........................................................................................
5.1.3 Safety 18
18
tips ......................................................................................
5.1.4 App 19
info ........................................................................................ 19
5.2 System 19
Designing .................................................................................. 19
5.2.1 E-R 20
Diagram .................................................................................
5.2.2 Data-Flow
Diagram .......................................................................
5.2.3 UML
Diagrams .............................................................................
(a) Class
Diagram ........................................................................
(b) Use Case
Diagram ..................................................................
(c) Sequence
Diagram ..................................................................

Chapter 6 Coding 23-33

6.1 21
HomeScreen ......................................................................................... 31

7
6.2 About
me ..............................................................................................
Chapter 7 Projects Snapshots 34-40
32
7.1 Home
Screen ......................................................................................... 33
7.2 Log
34
In..................................................................................................... 35
7.3 Sign Up
36
. ............................................................................................ 37
7.4 Google Play
38
Services ............................................................................
7.5 Current 39
Location ...................................................................................
7.6 Friends
Location.....................................................................................

7.7 About me
.......................................................................................
Chapter 8 Testing & Maintenance 41-42

8.1 Test 40
Cases ............................................................................................. 40
8.1.1 Home 41
screen ................................................................................
41
8.2 Deployment &
41
Maintenance .................................................................

8.2.1 Inputs to be
supplied ...................................................................
8.2.2 How to get
help ..........................................................................
Conclusion

Summary............................................................................... 43
......... 43
Future
Scope .................................................................................
References

8
List of Abbreviations
S.NO ABBREVIATIONS DESCRIPTION

1 App Application
2. RAM Random Access Memory
3. UI User Interface
4. JDK Java Development Kit
5. XML Extensible Mark-up Language
6. GUI Graphic User Interface
7. SDK Software Development Kit
8. FTP File Transfer Protocol
9. API Application Programming Interface
10 IT Information Technology
11. ERD Entity Relationship Diagram
12. DFD Data Flow Diagram

List of Figures

S NO. TITLE OF THE FIGURE PAGE

9
1.1 Android Icon 2
2.1 Google Map 7
2.2 Gap Module 8
5.1 E-R Diagram 18
5.2. DFD Level-0 19
5.3 (a) Class Diagram 20
5.3 (b) Use-Case Diagram 21
5.3 (c) Sequence Diagram 22
7.1 Home Screen 34
7.2 Log in 35

7..3 36
Sign Up
7.4 37
Google Play Series
7.5 38
Current Location
7.6 39
Friend Location
7.7 40
About Me

List of Tables
TABLE TITLE PAGE
3.1 Project Risk 12
3.2 Product Risk 12
3.3 Business Risk 13
8.1 Test Case for Home screen 36

10
Chapter: 1
INTRODUCTION
1.1 OVERVIEW

A GPS tracking unit is a device that uses the Global Positioning System to determine the
precise location of a vehicle, person, or other asset to which it is attached and
to record the position of the asset at regular intervals. The recorded location data can be
stored within the tracking unit, or it may be transmitted to a central location data base, or
internet-connected computer, using a cellular (GPRS), radio, or satellite
modem embedded in the unit. This allows the asset's location to be displayed
against real-time or when analysing the track later, using customizedsoftwareCCTV is an
acronym for Closed Circuit Television: closed circuit as in an installation of directly
connected components creating a circuit which cannot be viewed by anybody outside of
the circuit, unlike a terrestrial television broadcast system which can be viewed by
anybody with the appropriate reception equipment.

1.2 OBJECTIVE OF THE PROJECT


The project is designed to fulfill objectives as mentioned below. These objectives are the
foundation stones, keeping that in mind this app is developed to help people in all folds of
life.
To develop an Android App with which a you can

Notify your designated contacts about your location

Use the app with less efforts. Easy Navigation

Fetch the current location relatively fast than the default location manager in
Android

1.3 TECHNOLOGY TO BE USED


This project is entirely an android-based application .The technology used to develop the
application is Android.
Android is the latest working technology that is updating year by year. The android
technology is popular since its development in the year 2008. Android is a user-friendly
and interactive platform which provides a number of features and facilities to its user not
only to use its products but also to develop a new one.

1
FamilyTrcker
Android at present is the emerging technology in the latest world. It provides a wide range
of features to the users.

1.3.1 INTRODUCTION TO ANDROID

Android is an open source and Linux-based mobile Operating System. It is designed


primarily for touchscreen mobile devices such as smartphones and tablets. Android was
developed by the Open Handset Alliance, led by Google, and other companies. Android is
written in Java, C and C++. [12]

Android offers a unified approach to application development for mobile devices which
means developers need only develop for Android, and their applications should be able to
run on different devices powered by Android.

The first beta version of the Android Software Development Kit (SDK) was released by
Google in 2007 where as the first commercial version, Android 1.0, was released in
September 2008. On June 27, 2012, at the Google I/O conference. [12]

The source code for Android is available under free and open source software licenses.
Google publishes most of the code under the Apache License version 2.0 and the rest,
Linux kernel changes, under the GNU General Public License version 2. [12]

Android comes with an Android market which is an online software store, Google Play
Store. It was developed by Google. It allows Android users to select, and download
applications developed by third party developers and use them. There are around 2.0 lack+
games, application and widgets available on the market for users. [12]

Fig 1.1 Android Symbol

2
FamilyTrcker
Android applications are written in java programming language. Android is available as
open source for developers to develop applications which can be further used for selling in
android market. There are around 200000 applications developed for android with over 3
billion+ downloads. Android relies on Linux version 2.6 for core system services such as
security, memory management, process management, network stack, and driver model. [3]

For software development, Android provides Android SDK (Software development kit),
which provides an interface and tools to develop applications in android.

1.3.2 VERSIONS OF ANDROID

Android 1.5,Cupcake(27 April 2009)

Android 1.6,Donut

Android 2.1,Eclair

Android 2.2,Froyo

Android 2.3,Gingerbread

Android 3.0,Honeycomb

Android 4.0,Ice Cream Sandwich

Android 4.1,Jelly Bean

Android 4.4,KitKat

Android 5.0,Lollipop

Android 6.0,Marshmallow

Android 7.0,Nougat(release 22 august 2016) [1]

1.3.3 FEATURES OF ANDROID

3
FamilyTrcker
Android is a powerful operating system competing with the Apple. Some of its wide range
of features are listed below:

Beautiful UI

Multi-tasking

Multi-language

Supports all types of media

Uses a light-weighted relational databases, SQLite for storage

Offers wide range of connectivity facilities like GSM/EDGE, LTE, Wifi, Bluetooth,

GPS, etc.

Multi-touch

Resizable widgets

Supports Wi-Fi-Direct

User-friendly

Highly Interactive

1.3.4 BUILDING BLOCKS OF ANDROID


Main Building blocks are components that you use as an application developer to build
Android apps. Application Components are the essential building blocks of an Android
application. Each component is a different point through which the system can enter your
application. Not all components are actually entry points for the user and some depend on

4
FamilyTrcker
each other, but each one exists as its own entity and plays a specific role-each one is a
unique building block that helps define your applications overall behaviour.
There are four different types of application components.
Activities
Service
Content Provider

Broadcast Receivers

1. ACTIVITIES
An activity represents a single screen with a user interface. For example, a message
application might have one activity that shows a list of new messages, and another activity
to create a new message, and another activity to reading messages.
Although all activities work together to form a cohesive user experience in the messages
application, each one independent of the others.
2. SERVICES
Services run in the background and dont have any user interface components. They can
perform the same actions as Activities without any user interface. Services are useful for
actions. For example, a service might play music in the background while user is in a
different application.
Services have a much simpler lifecycle than activities. You start a service, or stop it.
Also, the service lifecycle is more or less controlled by the developer, and not so much by
the system. So, we as developers have to be mindful to run our services that they dont
unnecessarily consume shared resources, such as CPU and battery.
3. CONTENT PROVIDERS
Content Providers are interfaces for sharing data between applications. Android by default
runs each application in its own sandbox so that all data that belongs to an application is
totally isolated from other application on the system.
You can store the data in the file system, a SQLite database, on the web, or any other
persistent storage location your application can access. Through the Content Provider,
other applications can query or even modify the data (if the content provider allows it).
4. BROADCAST RECEIVERS
A broadcast receiver is a component that responds to system-wide broadcast
announcements. Many broadcast originate from the system.

5
FamilyTrcker
The system itself broadcasts events all the time. For example, when an SMS arrives, or call
comes in, or battery runs low, or system gets booted, all those events are broadcasted and
any number of receivers could be triggered by them.
You can also send your own broadcasts from one part of your application to another, or a
totally different application.
Broadcast receivers themselves do not have any visual representation nor are they actively
running in memory. But when triggered, they get to execute some code, such as start an
activity, a service, or something else.
1.3.5 CREATING AN ANDROID PROJECT
The ADT plug-in provides a New Project Wizard that you can use to quickly create a new
Android project (or a project from existing code). To create a new project:
Select File > New > Project.
Select Android > Android Project, and click Next.
Select the contents for the project:
Enter a Project Name. This will be the name of the folder where your project is created.
Under Contents, select Create new project in workspace. Select your project workspace
location.
Under Target, select an Android target to be used as the project's Build Target. The Build
Target specifies which Android platform you'd like your application built against.
Unless you know that you'll be using new APIs introduced in the latest SDK, you should
select a target with the lowest platform version possible, such as Android 1.1.
Under Properties, fill in all necessary fields.
Enter an Application name. This is the human-readable title for your application the
name that will appear on the Android device.
Enter a Package name. This is the package namespace (following the same rules as for
packages in the Java programming language) where all your source code will reside.
Select Create Activity (optional, of course, but common) and enter a name for your main
Activity class.
1.4 SCOPE OF THE PROJECT
The scope of the application lies in the fact that it is an android application. For its
implementation, it is necessary that the user must have an android device, otherwise
he/she will not be able to use this app.

6
FamilyTrcker
Another limitation to the app is that all android devices with API level higher than 13 can
be able to run this app.

Chapter : 2
LITERATURE REVIEW
2.1 INTRODUCTION
In this chapter, a review of previous related projects will be discussed. This study is a tool
to generate some ideas about how this project works based on the achievement of the
related projects and also to think about the advantages of the proposed solution. This may
help in problem solving skills and options required for the design and develop this project.

2.1.1 GOOGLE Maps

7
FamilyTrcker
Google Maps is a desktop and mobile web mapping service application and technology
provided by Google, offering satellite imagery,, and Street View perspectives, as well as
functions such as a route planner for traveling by foot, car, bicycle(beta test), or
with public transportation. Also supported are maps embedded on third-party websites via
the Google Maps API, and a locator for urban businesses and other organizations in
numerous countries around the world. Google Maps satellite images are not updated in real
time;; however, Google adds data to their Primary Database on a regular basis. Google
Earth support states that most of the images arena more than 3 years old

Fig 2.1 GOOGLE Map

2.1.2 GPS Module


The Global Positioning System (GPS) is a satellite-based navigation systemmade up of a
network of a minimum of 24, but currently 30, satellites placedinto orbit by the U.S.
Department of Defense. Military action was theoriginal intent for GPS, but in the 1980s,
the U.S. government decided toallow the GPS program to be used by civilians. The
satellite data is free andworks anywhere in the world.

8
FamilyTrcker
Fig 2.2 GPS Module

2.1.3 Server Module


The server receives users' location and alerts two friends if they are in the same location or
update the user about the location of family members. The Android DVR viewer app is
designed to work with Viewtron CCTV camera video surveillance recorders. The Viewtron
app allows users to view security cameras live from remotely over the Internet and also
supports searching and playing back recorded video footage from the DVR hard drive.
This Android app works on all Android phone and tablet devices in portrait and landscape
modes.

Viewtron video surveillance DVR models VT-HD404 and VT-HD408 support both HD
security cameras (HD-SDI CCTV) and traditional standard resolution CCTV cameras.
When video is played back that was recorded from HD-SDI cameras, video resolution up
to 1080p is supported.

The Viewtron mobile app can control PTZ cameras that are connected to Viewtron DVRs.
Pan tilt zoom controls are enabled in live mode when a PTZ camera is selected.
2.1.4 Client Module
The mobile requests its location from the positioning system periodically and sends it
through the communication network to the server. The user can request the location of a
family member at any time from the server. Also an alert can be received whenever the
user and a friend are in the same location.

9
FamilyTrcker
Chapter : 3
FEASIBILITY STUDY
3.1 INTRODUCTION
A feasibility study is an analysis and evaluation of a proposed project to determine if it
(1) is technically feasible,

(2) is feasible with the estimated cost, and

(3) will be profitable.

A feasibility study determines the actual steps required to build the project in order to
achieve success.

There are three types of feasibility study done in the development of a project:

Technical feasibility

Operational feasibility

10
FamilyTrcker
Economic feasibility

3.1.1 TECHNICAL FEASIBILITY


The system must be evaluated from the technical point of view first.

The assessment of this feasibility must be based on an outline design of the system
requirement in the terms of input, output, programs and procedures.

The project should be developed such that the necessary functions and performance
are achieved within the constraints.

The project is developed within latest technology.

The project can be upgraded after it is complete.[4]

The system has been developed using Java and XML as well as Android SDK on the latest
version of Android Studio. This project is technically feasible for development.

3.1.2 ECONOMIC FEASIBILITY


The economic analysis is the mostly used method for comparing the cost with benefit from
developed system.

In the proposed system, the following economic feasibility study has been done:

Number of persons involved will be reduced,

Storage of all these records will be arranged and easier to find.

The maintenance cost is less.

A system can be developed technically and that will be if installed it must still be a
good investment for the organization.

Financial benefits must equal or exceed the development costs.

The project is economically feasible and will give earning to the development organization
as it bears less development cost.

3.1.3 OPERATIONAL FEASIBILITY


People are inherently resistant to change and computers have been known to facilitate
changes.

An estimate should be made of how much effort is required to adapt to changes towards
computerized system.

11
FamilyTrcker
In the proposed system, manpower and time factor are reduced.

The project should work properly after it is being developed and implemented.

There should a sufficient support from the management for the user.

3.2 RISK ANLAYSIS


Risk management in software engineering is related to the various future harms that could
be possible on the software due to some minor or non-noticeable mistakes in software
development project or process.

Risk management is the most important issue involved in the software project
development. These risks in the software project is identified and managed by software
risk management which is a part of Software Project Management. During the life cycle of
software projects, various risks are associated with them. [11]

Some of the important aspects of risk management in software engineering are software
risk management, risk classification and strategies for risk management. Following are
some of the risks associated with the project:

3.2.1 PROJECT RISK

Table 3.1 Project Risk

S NO. RISK PROBABILITY EFFECT RISK PLANNING


01 The experience Low Serious Use more than one
staffs leave the staffs for each section,
project before it which might minimize
finish. this risk.
02 The methodology High Serious Must study more than
which solve the one methodology to
problem cant minimize the risk.
work
03 Budget is not Low Catastrophi Contract if there any
enough or there is c more expenses, the

12
FamilyTrcker
no budget fund side must pay it.

3.2.2 PRODUCT RISK

Table 3.2 Product Risk


PROBABILIT
S NO. RISK EFFECT RISK PLANNING
Y
01 Packages and High Serious Put a condition to the
develop tool not time of project delivery
enough. depends on the
problem.
02 Cant find the High Catastrophic Programmer must have
suitable programming skill to
components. write new code which
can minimize this risk.

3.2.3 BUSINESS RISK


Table 3.3 Business Risk

S PROBABILIT
RISK EFFECT RISK PLANNING
NO. Y
Cant found the Monitoring the work
01 suitable place or Moderate Tolerable daily by E-mail
team to meeting. avoid this risk.
Distribution of
Marketing the
02 Low Catastrophic advertisement which
product system.
minimize this risk.

13
FamilyTrcker
Chapter : 4
REQUIREMENT ANALYSIS
4.1 INTRODUCTION
For the successful development of any project, it is very necessary to study about all the
requirements of the project. These requirement may be related to resource, hardware,
software, functionalities, etc .
This requirement analysis is as important as the implementation of the project. The
requirement analysis basically emphasizes on the listing of the necessary requirements
required for the development of the project.

4.1.1 OPERATING ENVIRONMENT


1. Hardware: A mobile device with
Android Mobile
RAM : minimum 500mb
Storage: minimum 1 GB
2. Software: The mobile device should have
Operating system: Android
Version: more than Gingerbread.

4.1.2 HARDWARE REQUIREMENTS


A Personal Computer with 2.6 GHz or higher processor clock speed.

4 GB of RAM or higher (8 GB is recommended)

500 GB of available hard disk space (Excluding the space for Development tools)

Wireless Network connectivity.

14
FamilyTrcker
4.1.3 SOFTWARE REQUIREMENTS
OS: Windows

Android Studio.

Jdk8

Genymotion.

4.1.4 PLANING
In this phase we are going to plan our activities and xml files, we are also defining the
fragments.
4.1.5 ACTIVITIES

ChooseActivity.java

CustomAdapter.java

CustomPagerActivity.java

DbHandler.java

ListContacts.java

MainActivity.java

MyInternetServcie.java

SafetyTips.java

4.1.6 LAYOUTS

Activity_main.xml

Choose_contacts.xml

Image_item.xml

List_contact.xml

Single_row.xml

Safety_tips.xml

15
FamilyTrcker
4.1.7 RESOURCE FILES

Manifest xml file

Colors xml file

String xml file

Style xml file

4.1.8 DIRECTORIES:

Java

Manifest

Res

Gradle Scripts

Chapter : 5

SYSTEM ANALYSIS & DESIGN


5.1 MODULES DESCRIPTION
Modules are the partitions of any project done to ease the task of development. Different
modules are designed so that debugging and other development phase gets the easiest
implementation.
In this project, we have divided the project into three modules:
1. Camera App (Client Side)
2. Contacts
3. Safety tips
4. App info

5.1.1 Home Screen

16
FamilyTrcker
As soon as the app opens up, the screen which appears after the splash screen is the home
screen. Home screen is the very interesting part of any project as it gives the knowledge to
the user what the app is all about. The Splash Screen keeps the user in excitement what
else is going to come.
The home screen contains icons with names representing different category of items that
the user can click to explore further. Clicking these icons let the user explore each item
specifically.
In this project, we have created an interactive Home Screen, consisting of items as :
Latitude and longitude displays the current location of the user where the device is
currently available.
It contains a Siren button which produces a vibrant sound so that the people around
you can come to know about the situation.
It also contains a Panic button which automatically sends a prompt message to your
designated contacts regarding your situation.
It provies an option to call Police directly through the app using a call button.

It also bears an overflow menu which has two options, safety tips and share.

5.1.2 About Me
When the user clicks on the Contacts button, this activity gets called.This activity
provides the user with an interface to add his/her designated contacts. The designated
contacts we mean that those contacts which the user going to use to acknowledge about the
emergency and looking to seek help.
In this activity, the user can add maximum 5 contacts to the app who will get a message
when you are in the emergency situation and press Panic button.

5.1.3 Friend Loaction


As soon as the app opens up, an overflow menu appears on the home screen at the top
right corner. Safety tips is a new feature which we have provided to create awareness
among the people about safety and security .
Today people are busy in their work, but they are more likely to use the interactive apps
that would give some knowledge and learning.

17
FamilyTrcker
Safety tips basically consists of an array of images which display the safety tips in thumb
nails format.

5.1.4 Log in
This option gives the user information about the application regarding its storage path,
memory used, copy to sd, permissions.
5.1..5 Sign Up
The home screen contains icons with names representing different category of items that
the user can click to explore further. Clicking these icons let the user explore each item
specifically.

5.2 SYSTEM DESIGNING


5.2.1 E-R DIAGRAM

18
FamilyTrcker
Fig 5.1 : E-R Diagram

5.2.2 DATA FLOW DIAGRAM

19
FamilyTrcker
Fig 5.2 DFD Level-0

5.2.3 UML DIAGRAMS


a) CLASS DIAGRAM

20
FamilyTrcker
Fig 5.3 (a) Class Diagram

b) USE-CASE DIAGRAM

Fig 5.3 (b) Use-Case Diagram

21
FamilyTrcker
c) SEQUENCE DIAGRAM

Fig 5.3 (c) Sequence Diagram

22
FamilyTrcker
Chapter : 6
CODING
6.1 HOMESCREEN
a) MainActivity.java
package com.example.yash.fusedlocation;

import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.location.LocationManager;
import android.net.Uri;
import android.os.Handler;
import android.os.ResultReceiver;
import android.provider.Settings;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationListener;
23
FamilyTrcker
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;

import java.util.List;
import java.util.Locale;

public class MainActivity extends AppCompatActivity


implements GoogleApiClient.ConnectionCallbacks,
GoogleApiClient.OnConnectionFailedListener,
LocationListener {
TextView txtOutputLat, txtOutputLon;
private TextView textView2;
Location mLastLocation;
public AddressResultreceiver mReceiver;
private GoogleApiClient mGoogleApiClient;
private LocationRequest mLocationRequest;
String lat, lon;
boolean prog;
String message;
LocationManager locationManager;
private String Adrs;
final static String TAG = "yashtag";
DbHandler handler;
ProgressBar mProgressBar;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
txtOutputLat = (TextView)
findViewById(R.id.textView);
txtOutputLon = (TextView)
findViewById(R.id.textView3);
textView2 = (TextView) findViewById(R.id.textView2);
mProgressBar=(ProgressBar)findViewById(R.id.progress
Bar);
mReceiver = new AddressResultreceiver(new
Handler());
handler =new DbHandler(this);
locationManager = (LocationManager)
getSystemService(LOCATION_SERVICE);
if
(locationManager.isProviderEnabled(LocationManager.GPS_PROVI
DER)) {
// Toast.makeText(getBaseContext(), "Gps is
enabled", Toast.LENGTH_SHORT).show();
} else {
showDialog(0);
}
buildGoogleApiClient();
prog=false;

24
FamilyTrcker
progress();
}

@Override
protected void onStart() {
super.onStart();
mGoogleApiClient.connect();
}

@Override
protected void onDestroy() {
super.onDestroy();
mGoogleApiClient.disconnect();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.overflow,menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId())
{
case R.id.tips: {
startActivity(new
Intent(getBaseContext(),SafetyTips.class));
break;
}
case R.id.share:{ Intent i=new
Intent(android.content.Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(android.content.Intent.EXTRA_SUBJ
ECT,"Share HelpMeOut");
i.putExtra(android.content.Intent.EXTRA_TEXT
, "Help others by sharing our app");
startActivity(Intent.createChooser(i,"Share
via"));
break; }
}
return true;
}

@Override
public void onConnected(Bundle bundle) {
mLocationRequest = LocationRequest.create();
mLocationRequest.setPriority(LocationRequest.PRIORIT
Y_HIGH_ACCURACY);
mLocationRequest.setInterval(1000);

25
FamilyTrcker
LocationServices.FusedLocationApi.requestLocationUpd
ates(mGoogleApiClient, mLocationRequest, this);
mLastLocation =
LocationServices.FusedLocationApi.getLastLocation(mGoogleApi
Client);
if (mLastLocation != null) {
lat =
String.valueOf(mLastLocation.getLatitude());
lon =
String.valueOf(mLastLocation.getLongitude());
}
updateUI();
}

void updateUI() {
txtOutputLat.setText("Lattitude\n"+ lat);
txtOutputLon.setText("Longitude\n"+lon);
}

@Override
public void onConnectionSuspended(int i) {

@Override
public void onLocationChanged(Location location) {
lat = String.valueOf(location.getLatitude());
lon = String.valueOf(location.getLongitude());
updateUI();
}

@Override
public void onConnectionFailed(ConnectionResult
connectionResult) {
buildGoogleApiClient();
}

synchronized void buildGoogleApiClient() {


mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API)
.build();
}

//----------------------------------
public void addMainContact(View view) {
Intent intent = new Intent(this,
ChooseContacts.class);
startActivity(intent);
}

26
FamilyTrcker
public void refreshMainLocation(View view) {
textView2.setText("");
prog=true;
progress();
Intent intent=new
Intent(this,MyIntentService.class);
intent.putExtra(MyIntentService.Reciever,mReceiver);
intent.putExtra("latkey",lat);
intent.putExtra("lonkey",lon);
startService(intent);
}

public void presstoSend(View view) {


if(Adrs==null)
{
showDialog(1);
}
else
{
showDialog(2);
}
}

@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case 0:
return new AlertDialog.Builder(this)
.setIcon(R.mipmap.ic_launcher)
.setTitle("Location Request")
.setMessage("Click SETTINGS to
activate GPS")
.setPositiveButton("SETTINGS",
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int whichButton) {
Intent intent = new
Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(intent
);
}
}
)
.setNegativeButton("Cancel",
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss();

27
FamilyTrcker
//
Toast.makeText(getBaseContext(),"Cancel clicked!",
Toast.LENGTH_SHORT).show();
}
}
).create();
case 1:
return new AlertDialog.Builder(this)
.setIcon(R.mipmap.ic_launcher)
.setMessage("Press Location Button
first and wait for the location to be displayed")
.setPositiveButton("OK",
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss();
}
}
).create();
case 2:

return new AlertDialog.Builder(this)


.setIcon(R.mipmap.ic_launcher)
.setMessage("Are you sure you want
to send the message.\nThis may cost you money")
.setPositiveButton("OK",
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int whichButton) {
checkIfNoNumber();
SQLiteDatabase db =
handler.getReadableDatabase();
Cursor cursor =
db.query("contacts", new String[]{"phone"}, null, null,
null, null, null);
while
((cursor.moveToNext())) {
String ph =
cursor.getString(0);
sendSMS(ph,
message);
}
Toast.makeText(g
etBaseContext(),
"Message
sent", Toast.LENGTH_LONG).show();
}

28
FamilyTrcker
)

.setNegativeButton("Cancel",
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss();
}
}
).create();
}
return null;
}
private void sendSMS(String phonenumber, String message)
{
SmsManager sms=SmsManager.getDefault();
sms.sendTextMessage(phonenumber,null,message,null,nu
ll);
Log.i(TAG,"Message sent");
}

public void checkIfNoNumber()


{
SQLiteDatabase db = handler.getReadableDatabase();
Cursor cursor = db.query("contacts", new String[]
{"phone"}, null, null, null, null, null);
if(cursor.getCount() == 0)
{
Toast.makeText(this,"add
contacts",Toast.LENGTH_SHORT).show();
}
}

class AddressResultreceiver extends ResultReceiver {

public AddressResultreceiver(Handler handler) {


super(handler);
}

@Override
protected void onReceiveResult(int resultCode,
Bundle resultData) {
super.onReceiveResult(resultCode, resultData);
Adrs =
resultData.getString(MyIntentService.DataExtra);
prog=false;
progress();
if(Adrs==null)
{

29
FamilyTrcker
textView2.setText("Unable to fetch.\nPlease
check your internet connection and try again later");
}
else
{
textView2.setText(Adrs);
message = "I am here Please help me" + "\n"
+ Adrs;
}
}
}
public void progress()
{
if(prog)
{
mProgressBar.setVisibility(ProgressBar.VISIBLE);
}
else
{
mProgressBar.setVisibility(ProgressBar.GONE);
}
}

public void callhelp(View v) {


if (ActivityCompat.checkSelfPermission(this,
android.Manifest.permission.CALL_PHONE) !=
PackageManager.PERMISSION_GRANTED) {
android.app.AlertDialog.Builder builder = new
android.app.AlertDialog.Builder(MainActivity.this);

builder.setMessage(
"You need to give call permissions
first")
.setTitle("Call Permission")
.setCancelable(false)
.setPositiveButton("Ok",
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
})
.setNegativeButton("Cancel",
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});

30
FamilyTrcker
builder.create().show();
return;
}

Intent intent = new Intent(Intent.ACTION_CALL,


Uri.parse("tel:100)"));
startActivity(intent);

}
public void appinfo(View view)
{
Intent intent=new
Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.setData(Uri.parse("package:"+getPackageName()
));
startActivity(intent);
}
}

b) Contacts.java
package com.example.yash.fusedlocation;

import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import org.w3c.dom.Text;

public class ChooseContacts extends AppCompatActivity {

private TextView
choose1,choose2,choose3,choose4,choose5;
private TextView mob1,mob2,mob3,mob4,mob5;

private static final int CONTACT1 =1;


private static final int CONTACT2 =2;
private static final int CONTACT3 =3;
private static final int CONTACT4 =4;
private static final int CONTACT5 =5;

private String contactID;

31
FamilyTrcker
private DbHandler handler;

@Override
protected void onCreate(@Nullable Bundle
savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.choose_contacts);
choose1 = (TextView) findViewById(R.id.textView1);
choose2 = (TextView) findViewById(R.id.textView2);
choose3 = (TextView) findViewById(R.id.textView3);
choose4 = (TextView) findViewById(R.id.textView4);
choose5 = (TextView) findViewById(R.id.textView5);

mob1 = (TextView) findViewById(R.id.textView6);


mob2 = (TextView) findViewById(R.id.textView7);
mob3 = (TextView) findViewById(R.id.textView8);
mob4 = (TextView) findViewById(R.id.textView9);
mob5 = (TextView) findViewById(R.id.textView10);

handler = new DbHandler(this);

//setting already chosen contacts ..if exist


checkIfExist();

public void clickAdd1(View v)


{
startActivityForResult(new
Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI),CONTACT1);
}

public void clickAdd2(View v)


{
startActivityForResult(new
Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI),CONTACT2);
}

public void clickAdd3(View v)


{
startActivityForResult(new
Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI),CONTACT3);

32
FamilyTrcker
}
public void clickAdd4(View v)
{
startActivityForResult(new
Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI),CONTACT4);
}
public void clickAdd5(View v)
{
startActivityForResult(new
Intent(Intent.ACTION_PICK,
ContactsContract.Contacts.CONTENT_URI),CONTACT5);
}

//for deleting
public void clickDel1(View v)
{
handler.deleteByID(1);
clrText(choose1,mob1);
}

public void clickDel2(View v)


{
handler.deleteByID(2);
clrText(choose2,mob2);
}

public void clickDel3(View v)


{
handler.deleteByID(3);
clrText(choose3,mob3);
}

public void clickDel4(View v)


{
handler.deleteByID(4);
clrText(choose4,mob4);
}

public void clickDel5(View v)


{
handler.deleteByID(5);
clrText(choose5,mob5);
}

//handling results
@Override
protected void onActivityResult(int requestCode, int
resultCode, Intent data) {

33
FamilyTrcker
super.onActivityResult(requestCode, resultCode,
data);

if (resultCode == RESULT_OK) {
switch (requestCode) {
case CONTACT1: {

Uri result = data.getData();


Cursor cursor = managedQuery(result,
null, null, null, null);

if (cursor.moveToFirst()) {
String name =
String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},

ContactsContract.CommonDataKinds.Phone.CONTA
CT_ID + " = ? AND " +
ContactsContract.CommonDataKinds.Pho
ne.TYPE + " = " +
ContactsContract.CommonDataKinds.Pho
ne.TYPE_MOBILE,

new String[]{contactID},
null);

if (cursorPhone.moveToFirst()) {
contactNumber =
cursorPhone.getString(cursorPhone.getColumnIndex(ContactsCon
tract.CommonDataKinds.Phone.NUMBER));
}

cursorPhone.close();
return contactNumber;

public boolean isRepeat(String name)


{
String a = choose1.getText().toString();
String b = choose2.getText().toString();
String c = choose3.getText().toString();
String d = choose4.getText().toString();
String e = choose5.getText().toString();
if(name.equals(a) || name.equals(b) ||
name.equals(c) ||name.equals(d)||name.equals(e))
{
return true;
}
else
return false;
}

34
FamilyTrcker
public void clrText(TextView text1,TextView text2)
{
text1.setText("");
text2.setText("");
}

Chapter: 7
PROJECT SNAPSHOTS
7.1 HOME SCREEN

35
FamilyTrcker
Fig 7.1 Home Screen
7.2 LOG IN

36
FamilyTrcker
Fig 7.2 Log In

7.3 SIGN UP

37
FamilyTrcker
Fig 7.3 Sign Up

7.4 GOOGLE PLAY SERVICES

38
FamilyTrcker
Fig 7.4 Google play services

7.5 CURRENT LOCATION

39
FamilyTrcker
Fig 7.5 Current Location

7.6 FRIENDS LOCATION

40
FamilyTrcker
Fig 7.6 Friend Location

7.7 ABOUT ME

41
FamilyTrcker
Fig 7.7 About Me

Chapter: 8
TESTING & MAINTENANCE
42
FamilyTrcker
8.1 TEST CASES
8.1.1 HOME SCREEN

The home screen is the first activity that appears after the splash screen in the app.
Some test cases are generated as under:
Table: 8.1 Test Case for Home Screen
Step Inputs Actual Result Status(pass/fail Remark
s )
1 Click on Panic Message will be sent Pass None
button to your designated
contacts
automatically
2 Click on Flash- Flash-light will be Fail If ypur device
light turned on does not
support flash-
light, it will
give a toast
3 Click on Siren A vibrant sound is Fail Sound must not
button produced present in the
raw folder
4 Click on Call A call to Police (100) Pass None
button will automatically be
connected.
5 Click on Contacts An activity for Fail Database
adding the problem
designated contacts

8.2DEPLOYMENT AND MAINTENANCE


After successful testing and validation of the application, the application needs to be made
available to the users for implementation or use. Once the application development is
completed, an APK is generated .

This apk serves as the medium to implement the developed application on the user site, i.e.
the user is able to use the application only if he/she installs this apk in his/her android

43
FamilyTrcker
device. After the installation of the apk, the application gets available to the user for use.
Its icon gets shown in the home screen as soon as the application is installed.

Here are some of the basic instructions about how to use the application without any
difficulty:

8.2.1 Inputs to be supplied:


After installing application, the user has to register first by entering his name,
email, phone number and gender.

Then he/she is required to add 5 reliable contacts as to get help from them at the
time of emergency.

8.2.2 How to get help:


when the victim is at alone place and he/she gets into trouble can press the red
colour button Siren which produces an annoying loud noise that can be easily
heard from 1-2 km. This can make people around you to help you.

The victim can also press a button in centre, titled PANIC which immediately
sends message about your situation to the contacts listed by him/her at the time of
instalment. Then the listed people can come help you.

Suppose you dont have balance, then help messages cannot be sent. So in that
case, the application also provides an important feature to call the POLICE
immediately. You just have to press a button and a call will be directly made
without you dialling 100 manually.
After the deployment i.e. the application is installed in the users android device, the
application comes to practical state. Now it is made available to the user to use. As soon
as the user starts using it, the application falls into in-built feedback option available in
the navigation drawer menu. If he is satisfied with the app, he/she can also give his/her
satisfaction by rating us 5-stars in the app.the maintenance phase.

CONCLUSIONS
1. SUMMARY
Here, I have developed an android application titled HELPMEOUT using Java
and XML in android.
All the application codes are in Java and XML, which is the front end.

44
FamilyTrcker
This application basically allows the android users to a platform to get an aid from
their parents, friends and close people at the time of emergency.

This application has a simple user-interface that allows people to look for help

around themselves using the Siren button , which produces a vibrant sound.

2. FUTURE SCOPE

This application is always growing and developing step by step, and yet more to come. We
are planning for some more features to be added to the application so that it can be helpful
in all the circumstances and environment.

New Features which we are going to propose in the application are as follow:

Flash-light warnings will allow the victim to flash bright, white light on the eyes
of the culprits to avoid any harm to them.

We are planning to send the current location of the victim to the listed contacts
using the GPS feature of the device. But only those devices which have GPS sensor
can get the benefits.

The camera of the device will take instant snapshot of the culprits and will send it
to the listed contacts as a multimedia message.

This application can further be developed for First year students of colleges to
protect them against ragging or any issues regarding seniors.

REFERENCES
[1] Versions of Android: http://www.javatpoint.com/android-history-and-versions
[2] Project scopes: http://google.co.in/scope23
[3] VithU: http://vithu/android
[4] Feasibility study: http://www.academia.edu/9832967/Feasibility_study
[5] E-R diagram: https://www.google.co.in/search?q=e+r+diagram+for+android
[6] Data Flow diagram:https://www.visual-paradigm.com/tutorials/data-flow-diagram
[7] Splash screen Details: http://www.androidhive.info/2013/07/android-splash-screen
[8] Testing in Software Development: http://stackoverflow.com/unit-testing

45
FamilyTrcker
[9] Implementing test cases:https://developer.android.com/training/testing
[10] Risk Analysis From Wiki, http://www.wikipedia.org/software-engineering/risk-
analysis
[11] Android Introduction: https://developer.android.com/android/introduction

46
FamilyTrcker

Das könnte Ihnen auch gefallen