Site Loader
Rock Street, San Francisco

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 1

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

CHAPTER 1 INTRODUCTION ……………………………………………………………………………………………………………….. 5
1.1 INTRODUCTION ……………………………………………………………………………………………………………………….. 6
1.2 BACKGROUND OF THE SYSTEM …………………………………………………………………………………………………… 6
1.3 OBJECTIVES OF THE SYSTEM ………………………………………………………………………………………………………. 6
1.4 STATEMENT OF PROBLEM ………………………………………………………………………………………………………….. 6
1.5 MOTIVATION…………………………………………………………………………………………………………………………… 6
1.6 FEASIBILITY ANALYSIS …………………………………………………………………………………………………………….. 7
1.6.1 Technical Feasibility ……………………………………………………………………………………………………. 7
1.6.2 Operational Feasibility: ………………………………………………………………………………………………… 7
1.6.3 Financial Feasibility: ……………………………………………………………………………………………………. 7
1.6.4 Schedule feasibility: …………………………………………………………………………………………………….. 7
CHAPTER 2 REQUIREMENT ANALYSIS ………………………………………………………………………………………………. 9
2.1 INTRODUCTION ……………………………………………………………………………………………………………………… 10
2.1.1 Product Scope …………………………………………………………………………………………………………… 10
2.1.2 Objective: ………………………………………………………………………………………………………………… 10
2.1.3 Benefits: …………………………………………………………………………………………………………………… 10
2.2 DOCUMENT CONVENTIONS ………………………………………………………………………………………………………. 10
2.3 OVERALL DESCRIPTION …………………………………………………………………………………………………………… 11
2.3.1 Product Perspective ……………………………………………………………………………………………………. 11
2.3.2 Product Functionality …………………………………………………………………………………………………. 11
2.3.3 Operating Environment ………………………………………………………………………………………………. 11
2.3.4 Design and Implementation Constraints …………………………………………………………………………. 12
2.3.5 User Documentation …………………………………………………………………………………………………… 12
2.3.6 Assumptions and Dependencies ……………………………………………………………………………………. 13
2.4 SPECIFIC REQUIREMENTS ………………………………………………………………………………………………………… 13
2.4.1 User Interfaces ………………………………………………………………………………………………………….. 13
2.4.2 Use Case diagram ………………………………………………………………………………………………………. 15
Contents

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 2

2.4.3 Fully Dressed Use Cases……………………………………………………………………………………………… 16
CHAPTER 3 SYSTEM DESIGN …………………………………………………………………………………………………………….. 20
3.1 INTRODUCTION ……………………………………………………………………………………………………………………… 21
3.2 SEQUENCE DIAGRAM………………………………………………………………………………………………………………. 21
3.2.1 Signup……………………………………………………………………………………………………………………… 21
3.2.2 Login ………………………………………………………………………………………………………………………. 22
3.2.3 Modify User ……………………………………………………………………………………………………………… 22
3.2.4 Remove User…………………………………………………………………………………………………………….. 23
3.2.5 Cancel Accident Message ……………………………………………………………………………………………. 23
3.2.6 Profile ……………………………………………………………………………………………………………………… 24
3.2.7 Message …………………………………………………………………………………………………………………… 24
3.2.8 Location …………………………………………………………………………………………………………………… 25
3.2.9 Logout …………………………………………………………………………………………………………………….. 25
3.3 COMPOSITION VIEW POINT ………………………………………………………………………………………………………. 26
3.3.1 Package Diagram ………………………………………………………………………………………………………. 26
3.3.2 Deployment Diagram …………………………………………………………………………………………………. 27
3.4 LOGICAL VIEW POINT ……………………………………………………………………………………………………………… 28
3.4.1 Class Diagram …………………………………………………………………………………………………………… 28
3.5 ENTITY RELATION DIAGRAM ……………………………………………………………………………………………………. 29
3.6 SYSTEM SEQUENCE DIAGRAM ………………………………………………………………………………………………….. 30
CHAPTER 4 PRACTICAL WORKING ………………………………………………………………………………………………….. 31
4.1 INTRODUCTION ……………………………………………………………………………………………………………………… 32
4.2 FUNCTIONS CALL …………………………………………………………………………………………………………………… 32
4.2.1 Class Definitions ……………………………………………………………………………………………………….. 32
4.2.2 Code comments …………………………………………………………………………………………………………. 32
4.2.3 Line Length & Control Structure ………………………………………………………………………………….. 32
4.3 DEVELOPMENT PLAN………………………………………………………………………………………………………………. 33
4.3.1 Resources …………………………………………………………………………………………………………………. 33
4.3.2 Schedule ………………………………………………………………………………………………………………….. 33

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 3

4.3.3 Division of Work……………………………………………………………………………………………………….. 33
4.4 CONFIGURATION MANAGEMENT TOOL……………………………………………………………………………………….. 34
4.5 DAT ABASE(FIREBASE)…………………………………………………………………………………………………………….. 34
4.5.1 Database firebase ………………………………………………………………………………………………………. 34
4.5.2 Real-time Database…………………………………………………………………………………………………….. 34
4.5.3 Authentication …………………………………………………………………………………………………………… 35
4.5.4 Working …………………………………………………………………………………………………………………… 35
4.5.5 Identifier ………………………………………………………………………………………………………………….. 35
4.5.6 Created ……………………………………………………………………………………………………………………. 35
4.5.7 Signed In ………………………………………………………………………………………………………………….. 35
4.5.8 User ID ……………………………………………………………………………………………………………………. 35
4.5.9 Delete User ………………………………………………………………………………………………………………. 36
4.5.10 Disable User …………………………………………………………………………………………………………… 36
4.5.11 Reset Password ……………………………………………………………………………………………………….. 36
4.5.12 Profile ……………………………………………………………………………………………………………………. 36
CHAPTER 5 HARDWARE ……………………………………………………………………………………………………………………. 37
5.1 ARDUINO ……………………………………………………………………………………………………………………………… 38
5.2 VIBRATION SENSOR………………………………………………………………………………………………………………… 39
5.3 BLUETOOTH SENSOR ………………………………………………………………………………………………………………. 39
5.4 JUMPER WIRES ………………………………………………………………………………………………………………………. 40
5.5 CIRCUIT DIAGRAM …………………………………………………………………………………………………………………. 42
CHAPTER 6 TEST CASES ……………………………………………………………………………………………………………………. 43
6.1 INTRODUCTION ……………………………………………………………………………………………………………………… 44
6.2 TEST PLAN ……………………………………………………………………………………………………………………………. 44
6.2.1 Module testing ………………………………………………………………………………………………………….. 44
6.2.2 Integrated testing ……………………………………………………………………………………………………….. 44
6.2.3 Deployment testing…………………………………………………………………………………………………….. 44
6.3 TEST CASES ………………………………………………………………………………………………………………………….. 45
6.3.1 Test Case No 1(Signup) ………………………………………………………………………………………………. 45

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 4

6.3.2 Test Case No 2 (Login)……………………………………………………………………………………………….. 46
6.3.3 Test Case No 3 (Manage Profile) ………………………………………………………………………………….. 47
6.3.4 Test Case No 4 (Collision Detection) …………………………………………………………………………….. 48
6.3.5 Test Case No 5 (Cancel Accident Message) ……………………………………………………………………. 49
6.3.6 Test Case No 6 (Send Accident Details) …………………………………………………………………………. 50
6.3.7 Test Case No 7 (Logout) ……………………………………………………………………………………………… 51
CHAPTER 7 FUTURE ENHANCEMENT……………………………………………………………………………………………….. 52
7.1 INTRODUCTION ……………………………………………………………………………………………………………………… 53
7.2 RESULT AND DISCUSSIONS ………………………………………………………………………………………………………. 53
7.3 FUT URE ENHANCEMENT ………………………………………………………………………………………………………….. 53
7.4 CONCLUSION OF CONTRACTOR ASSIST ANT AND INVENTORY MANAGEMENT SYSTEM ………………………….. 53
CHAPTER 8 USER GUIDE ……………………………………………………………………………………………………………………. 55
8.1 INTRODUCTION ……………………………………………………………………………………………………………………… 56
8.2 INSTALLATION GUIDE ……………………………………………………………………………………………………………… 56
8.3 RESCUE APP………………………………………………………………………………………………………………………….. 56
8.3.1 Signup/Register: ………………………………………………………………………………………………………… 57
8.3.2 Login ………………………………………………………………………………………………………………………. 58
8.3.3 Connectivity: …………………………………………………………………………………………………………….. 59
8.3.4 Cancel button ……………………………………………………………………………………………………………. 60
8.3.5 Accident alert ……………………………………………………………………………………………………………. 61
8.3.6 Get user location from mobile GPS ……………………………………………………………………………….. 62
8.4 ADMIN PANEL ……………………………………………………………………………………………………………………….. 63
8.4.1 Admin Signup & Login …………………………………………………………………………………………….. 63s
8.4.2 View List of User ………………………………………………………………………………………………………. 63
8.4.3 Delete User ………………………………………………………………………………………………………………. 64
8.4.4 Disable User ……………………………………………………………………………………………………………… 65
8.4.5 Reset Password …………………………………………………………………………………………………………. 66
8.4.6 Profile ……………………………………………………………………………………………………………………… 67

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 5

Chapter 1 Introduction

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 6

1.1 Introduction
This is a hardware based android application that detect accident and send automatic message to
family. Sensors are positioned at different locations in a vehicle. When an accident happens the
Arduino will send a message to mobile Android Application. The Android Application will receive an
alert message. Then Android App will send the message to family whose number is stored in profile.
This message includes driver information (Name, Father Name, Blood Group, Disease, latitude and
longitude of the accident location). The rescue will respond in lesser time and help to the accident
zone immediately.

1.2 Background of the System
The background of the system is that the information that our system is showing is gathered by
entering data (Name, Father Name, Blood Group, Disease) into database. This information is then
saved and retrieved as reports and displayed to the Rescue center and siblings on his/her android
device’s screen.

1.3 Objectives of the System
? User can use this application whenever he/she wants.
? User can be rescued easily without doing any call or text message.
? Chances of human error are greatly reduced.
? Siblings and Rescue Center can easily see location of accident and user profile.

1.4 Statement of Problem
Nowadays, rescue center and hospitals are not much facilitating they are not up to date with the up
growing technology like other developed countries. Daily to many people die due to road
accidents but the main reason is they are not rescued in time. No body know that where they are
and what is there exact location and what happened to them.

1.5 Motivation
? It is much difficult for the rescue center and siblings to identify the location of accident and to
rescue the person in time.
? Our team is going to develop an application to automate the rescue system.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 7

1.6 Feasibility Analysis
1.6.1 Technical Feasibility
? Android studio
? Arduino
? Firebase

1.6.2 Operational Feasibility:
Our app will ease the workload of rescue center. It saves time and would help to the system
generalized rather than person dependent Our app will be user friendly and requires minimum data
entry from user, this is easy to use.

1.6.3 Financial Feasibility:
Feasibility of financial aspects e.g. pricing and source of availability and financing of
tools and other resources required for the project. Provide tabulated information in the
given format:

Table 1.6.3 Financial Feasibility

1.6.4 Schedule feasibility:
Figure describes Plan overall strategies of our project have been placed, fully informed the time spam
of each step under the development of project are define in this development plans.

Name Price Source
Android Studio Free https://Developer.android.com
Arduino Free https://www.arduino.cc
Firebase Free https://firebase.google.com/

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 8

Figure 1.6.4 Gantt chart

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 9

Chapter 2 Requirement Analysis

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 10

2.1 Introduction
The purpose of requirement analysis is to obtain requirements and information from the stakeholder
and users for developing software. This chapter includes product scope, functionalities of system and
covering functional, non-functional and specific requirements of Rescue App with Hardware.

2.1.1 Product Scope
We will make an Android application for Rescue Center to create an environment in which it locates
the vehicle and send an emergency message to rescue center and siblings. This app will save a lot of
time of rescue center and save a lot of lives. The android application will help to improve the rescue
center.

2.1.2 Objective:
In future with the growing population traffic is increasing day by day and the ratio off accident is also
increasing. For managing these accidents, we have to work smart to save our time and also to save the
life of people. For this purpose, we build this android application.

2.1.3 Benefits:
This application will be very beneficial for rescue center in terms of time. This will send the location of
accident to rescue center and siblings. Physical Assistant will replace with e-assistant.

2.2 Document Conventions
Table 2.2 Conversions
Name Convention
Content Time New Roman 10 point
Font Time New Roman 12 point
Heading 2 Bold,14 point
Heading 3 Bold,12 point
Line spacing 1.15

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 11

2.3 Overall description
This section consists of the description of the project. i.e. functionality, user’s perspective etc.

2.3.1 Product Perspective
This section will give an overview of the whole system. The system will be explained in its
context to show how the user interacts with the system and perform the basic functionality o f
it. It will also describe how the user uses the features of it. The constraints and assumptions for
the system will be presented. Product prospective includes a figure which shows working of
system and software functionality include functionalities of system with respect to projects.
Operating environment explains the specifications and requirements regarding system, Design
and implementation portion will cover the possible constraints of system, in last portion
assumptions and dependencies of system will be covered. We are developing a Rescue App
with Hardware system to facilitate Rescue Center to keep information about people.

2.3.2 Product Functionality
Application will be install on Android phone

• User will Login if not, then sign up first.
• Edit profile
• Delete user
• Modify user
• Cancel message
• Send accident details (location)
• Send profile of user
• Logout

2.3.3 Operating Environment
Table 2.3.3 describe system, under construction which will operate on the Android Smartphone
using latest versions of android (mobile based Operating system). It will be developed using
Android studio.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 12

Table 2.3.3 Operating Environment
Requirements Specification
Hardware Platform Android Smartphone, Arduino, vibration sensor
Operating System Android (mobile operating system)
Database Firebase

2.3.4 Design and Implementation Constraints
? Implementation Constraints:
Application will require a working internet connection where normally application will work
offline.

? Time Constraint
This application is our Final year project hence we have to complete it within the prescribed
framework of two semesters.

2.3.5 User Documentation
3 to 4-page document of user manual will be provided along with the application to let the user know
• Standardizations/Constraints
• How to use the application?

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 13

2.3.6 Assumptions and Dependencies
• App will require active Wireless Area Network (WAN) for login and mostly it be use offline.
• App will only use in android phone.
• Response may be low for some depend on traffic on server because of database loading.
• User familiarity with mobile phone and internet surfing.

2.4 Specific Requirements
2.4.1 User Interfaces
This section contains all of the functional and quality requirements of the system. It gives a
detailed description of the system and all its features.
App will contain the following interfaces:
• User Signup
• User Login
• Edit Profile Information
• Connectivity
• Paired Devices List
• Home page
• Cancel Message
• Accident Alert
• Message

2.4.1.1 Signup/Register:
In signup interface user will enter email and password to create his/her account. Android application
will check that the email entered is a valid email or not and if any field is empty this will generate an
error message.

2.4.1.2 Login
In login interface a registered user will enter the email and password and then he/she can use this android
application. If user enters wrong email or password this will not login and generate an error message.

2.4.1.3 Profile
In this interface user have to provide his/her Name, Father Name, Disease (sugar/blood pressure/ heart problem),
Blood Group and save the profile.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 14

2.4.1.4 Connectivity
When the user wants to use the app first he/she connects the app with hardware via Bluetooth Our
Hardware will work on Vehicle, if vehicle is moving then our hardware will work in efficient way.

2.4.1.5 Cancel Button
Sometimes accident may not be horrible, If the user wants to cancel the message then he cancels the
message but they must cancel the message with in time otherwise message will be sent automatically
within time.

2.4.1.6 Accident alert
When accident occurs, it gets alert through vibration sensor via Bluetooth sensor and send the profile
information and location of accident to family via text message.

2.4.1.7 Message
When accident occurs the app will get the location of user from mobile GPS and send it to family.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 15

2.4.2 Use Case diagram
Figure 2.4.2. Shows method through which analyze clarify, identifying and organize the system
requirements.

Figure 2.4.2 Use Case Diagram

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 16

2.4.3 Fully Dressed Use Cases

2.4.3.1 Use case UC1: Sign Up
Description:
User Open android app and signup using signup form. After that user data and profile will save in
database.
Level: Signup
Priority: 1
Primary Actor: User
Pre-Conditions: Android application properly working.
System fails /crash: If app is not working properly then signup form generate error.
Special Requirements: Sensors must work properly.

2.4.3.2 Use case UC2: Login
Description: User Open android app and login using login form. After that user data and profile
will
retrieve from database.
Level: Login
Priority: 2
Primary Actor: User
Pre-Conditions: User must Signup first
System fails /crash: If app is not working properly and user inputs wrong data then login form
generate error
Special Requirements: Sensors must work properly

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 17

2.4.3.3 Use Case UC3: User profile
Description: A Profile will be send to rescue center and family
Level: User profile
Priority: 3
Primary Actor: family and rescue
Pre-Conditions: App modules should be correctly worked.
Success Guarantee: When message from server to the appropriate people (database) is
successfully received it means our information in the database is correct
Extensions:
System fails /crash: Response an error message to the user. Special Requirements: Database
connectivity

2.4.3.4 Use Case UC4: Modify User
Description: As Admin open the application a list of different icons shown. Admin can modify
existing user personal data like user name, vehicle id, latitude, longitude. After make changes, user
data information is stored in the database.
Level: Modify User
Priority: 4
Primary Actor: Admin
Pre-Conditions: Sensors should be correctly installed and opened.
Success Guarantee: Ignition key is turned on, when system is stuck with something then sensors
will send a notification message to the server.
Extensions: System fails /crash: If server down then all data will be lost. And if sensor stopped
working then no
message will be forwarded to the server.
Special Requirements: Sensors must work properly.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 18

2.4.3.5 Use Case UC5: Cancel message
Description:
When user is safe the he/she press the safe button then message will not sent
Level: Cancel message
Priority: 5
Primary Actor: User
Pre-Conditions:
App modules should be correctly installed.
Success Guarantee:
App modules will work properly
Extensions: System fails /crash: If problem occurs then message cancelation button cannot be
shown
Special Requirements: All the modules should work properly.

2.4.3.6 Use Case UC6: User profile
Description: A Profile will be send to rescue center and family
Level: User profile
Priority: 6
Primary Actor: family and rescue
Pre-Conditions: App modules should be correctly worked.
Success Guarantee: When message from server to the appropriate people (database) is
successfully received it means our information in the database is correct
Extensions: System fails /crash: Response an error message to the user.
Special Requirements: Database connectivity

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 19

2.4.3.7 Use Case UC7: Accident message
Description: A simple and small text message will be send to rescue center and family
Level: Accident message
Priority: 7
Primary Actor: family and rescue
Pre-Conditions: App modules should be correctly worked.
Success Guarantee: When message from server to the appropriate people (database) is
successfully received it means our information in the database is correct
Extensions: System fails /crash: Response an error message to the user.
Special Requirements: Database connectivity

2.4.3.8 Use Case UC8: Geo location
Description: Geo location module will calculate latitude x and longitude y and estimated time for
rescue team to reach on time
Level: Geo location
Priority: 8
Primary Actor: User
Pre-Conditions: App modules should be correctly worked.
Success Guarantee:
When message from server to the appropriate people (database) is successfully received it means
our information in the database is correct.
Extensions:
System fails /crash: If message is not received then our database information is incorrect.
Special Requirements:
The information about the user should be appropriate and correct.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 20

Chapter 3 System Design

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 21

3.1 Introduction
This chapter explains the software through different diagrams, i-e. the design of the
system, which shows the interaction of different components of the system with each
other. This chapter will include some of the diagrams, interfaces and algorithms that are
used in making of this software. Interface section of this chapter includes some
screenshots of the Application that is the user menu and the scene images.

3.2 Sequence Diagram
Sequence diagram is used to show particular scenarios of use case, Events generate by
external actors, their order and possible inter-system events. Sequence diagram is most
popular UML artifact focuses on identifying the behavior and visualizes a use case.
Elements participating that exchange messages in system are actors and system.

3.2.1 Signup

Figure 3.2.1 Signup

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 22

3.2.2 Login

Figure 3.2.2 login

3.2.3 Modify User

Figure 3.2.3 Modify User

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 23

3.2.4 Remove User

Figure 3.2.4 Remove User

3.2.5 Cancel Accident Message

Figure 3.2.5 Cancel Accident Message

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 24

3.2.6 Profile

Figure 3.2.6 Profile

3.2.7 Message

Figure 3.2.7 Message

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 25

3.2.8 Location

Figure 3.2.8 Location

3.2.9 Logout

Figure 3.2.9 Logout

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 26

3.3 Composition View Point
This section shows the design diagrams of the project. All the design diagrams are as
follows.

3.3.1 Package Diagram
Figure 3.3.1 describes the hierarchical relationships between packages and other
packages or objects used in the project.

Figure 3.3.1 Package Diagram

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 27

3.3.2 Deployment Diagram
Figure 3.3.2 describe is a structure diagram which shows architecture of the system as
deployment of software artifacts to deployment targets

Figure 3.3.2 Deployment Diagram

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 28

3.4 Logical view Point
The logical view shows the classes and their interaction and relation among them. This
view is the overall view of classes which also shows the methods and variables used in
each class. The detailed class diagram of the project.

3.4.1 Class Diagram
Figure 3.4.1 shows each class and their attributes and methods used and specially the
relation which shows that is there any association, aggregation or composition. There is
no user defined inheritance in the whole project.

Figure 3.4.1 Class Diagram

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 29

3.5 Entity Relation Diagram
Figure 3.5 Entity relation diagram show the working process in the database. In which
the data modeling technique used which illustrates the system entities and also the
relation in between.

Figure 3.5 Entity Relation Diagram

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 30

3.6 System Sequence Diagram

Figure 3.6 System Sequence Diagram

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 31

Chapter 4 Practical Working

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 32

4.1 Introduction
In this chapter we discuss about the elements where this production is perfectly useful.
And also this production is important for the comprehension. Or in the future case any
changes can be occurring for improving the efficiency of this product.

? Which tools and frameworks are used during development?
? Which Libraries are used in applications?
? What are coding and style standards?

4.2 Functions Call
Functions Calls are used in following ways that

? There are no spaces used between function name, starting parenthesis and 1st
Parameter is used.
? Spaces between different parameters and commas are used.
? There is no use of space between Last parameter, closing parenthesis and
semicolon.

4.2.1 Class Definitions
There is opening brace of class declaration on new line which is used for underscore.

4.2.2 Code comments
C# Razor Style comment is used e.g. (/* */ or //).

4.2.3 Line Length & Control Structure
? For better code readability range of characters are approximately 70-80
characters per line.
? There is no TAB used but intend of 4 spaces are used.
? In control statements one space b/w control statement (if, else) and parenthesis
is used.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 33

4.3 Development Plan
Development plan deals with all the resources, schedules and individual participation
in the project as discussed below.

4.3.1 Resources
? 3 group Members
? Arduino Ide
? Android Studio
? Arduino Uno
? Bluetooth Sensor
? Vibration Sensor
? Bread Board
? Wires
? Battery
? Android phone check Android Rescue App
? Laptop with Specs of (Core i-5)
? Smartphone Samsung grand prime.

4.3.2 Schedule
We have presented and mentioned our schedule in the Gantt chart and have our vision
clear to lead in which direction. We have analyzed the skills of every group member
and assigned the work relevant to their best skills. We met every deadline and even
finished our work before submission time.

4.3.3 Division of Work
Table 4.3.3 section consists of tables showing the individual participation in the project
and each table has three columns one shows the name and other shows the task and the
third one shows the time taken to complete the task.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 34

Table 4.3.3 shows the tasks and duties of the first iteration
Name of Members Tasks Assigned Time Duration
Moazzam Anwar Android, Design and thesis 3 Months
Raja M Junaid Android, Design and thesis 2 Months
M Shahrukh Android, Design and thesis 2 Months

4.4 Configuration Management Tool
Android Studio used for coding because its feature of auto completion is helpful in
word and function completion.

4.5 Database(Firebase)

4.5.1 Database firebase
Firebase is web and mobile application development platform. In 2011 it was
developed by Firebase. Then it is acquired by Google in 2014. Firebase database is
Real-time and cloud-hosted database. In Real-time database data is stored as JSon and
synchronized to each and every connected client.

4.5.2 Real-time Database
Firebase database use data synchronization instead of typical HTTP requests. In
real-time database data is changing every time and update will be received in
milliseconds to any connected device. Real-time database SDKs use local cache on the
device to serve and store changes when user is offline. Data stored on cache
automatically synchronize when user comes online. Real-time database can be
integrated with Firebase authentication to provide easy and simple authentication
process.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 35

4.5.3 Authentication
Firebase Authentication provide easy to use SDKs, ready-made User Interface libraries
and backend services to authenticate users to your app. Using Firebase Authentication
secure authentication system can easily build.
These are the methods to authenticate App’s users
• Email ; Password
• Phone numbers
• Google
• Facebook
• Twitter

In our project we used Email ; Password authentication method.

4.5.4 Working
• Identifier
• Created
• Signed In
• User ID

4.5.5 Identifier
This column has email of every user that is using this App and he/she registered himself
on Rescue App.

4.5.6 Created
In this column date is mentioned when this user was connected to this App.

4.5.7 Signed In
This column contains latest date when user was signed In.

4.5.8 User ID
In this column unique ID for each user is mentioned.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 36

4.5.9 Delete User
Admin can delete a registered user by selecting delete option selected user can be easily
deleted.

4.5.10 Disable User
Admin can disable a user that is registered with Rescue App by selecting disable option
selected user will be disable and can be enabled later.

4.5.11 Reset Password
Admin can reset a user’s password if he/she forget password by selecting reset
password option an email will be sent to selected users email having new password.

4.5.12 Profile
In database against every user there is saved profile of that user. In this table there are

• Name
• Father Name
• Email
• Emergency Phone Number
• Blood Group
• Disease (Sugar, Blood pressure)
• User ID

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 37

Chapter 5 Hardware

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 38

5.1 Arduino
Arduino is an open-source platform used for building electronics projects Arduino
consists of both a physical programmable circuit board (often referred to as
a microcontroller and a piece of software, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer code to
the physical board. The Arduino platform has become quite popular with people just
starting out with electronics, and for good reason. Unlike most previous programmable
circuit boards, the Arduino does not need a separate piece of hardware (called a
programmer) in order to load new code onto the board – you can simply use a USB
cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier
to learn to program. Finally, Arduino provides a standard form factor that breaks out the
functions of the micro-controller into a more accessible package.

Figure 5.1 Arduino

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 39

5.2 Vibration Sensor
Vibration sensor which is used to detect accident Through Vibration is called Vibration
sensor. This sensor gathers information when any hard impact occurs. It also provides 3
axis accelerometer functionalities. These sensors are connected with the car through
making a complete circuit through which accident detection is easily possible. This
sensor is also connected to the Arduino. When accident occur it gather information and
send it to the Arduino.

Figure 5.2 Vibration Sensor

5.3 Bluetooth Sensor
Bluetooth Network consists of a Personal Area Network or a piconet which contains a
minimum of 2 to maximum of 8 Bluetooth peer devices- Usually a single master and up
to 7 slaves. A master is the device which initiates communication with other devices.
The master device governs the communications link and traf?c between itself and the
slave devices associated with it. A slave device is the device that responds to the master
device. Slave devices are required to synchronize them transmit/receive timing with
that of the masters. In addition, transmissions by slave devices are governed by the

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 40

master device (i.e., the master device dictates when a slave device may transmit).
Speci?cally, a slave may only begin its transmissions in a time slot immediately
following the time slot in which it was addressed by the master, or in a time slot
explicitly reserved for use by the slave device. The basic function of Bluetooth sensor
in our project is that Bluetooth is connected with user phone to transfer the accident
alert via vibration sensor.

Figure 5.3 Bluetooth Sensor

5.4 Jumper Wires
The term “jumper wire” simply refers to a conducting wire that establishes an electrical
connection between two points in a circuit. You can use jumper wires to modify a
circuit or to diagnose problems in a circuit. The following steps outline how you can
safely use jumper wires in different electrical applications.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 41

Figure 5.4 Wires

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 42

5.5 Circuit Diagram

Figure 5.5 Circuit Diagram

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 43

Chapter 6 Test Cases

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 44

6.1 Introduction
The Testing of functionalities is a very important part in the development of a product,
because with this we can check the framework that whether it is working the way we
actually want. Also it is very important to deal with the errors and bugs of the
application that the developer finds.

6.2 Test Plan
In the tests here it involves these levels almost cover the testing from module testing to
post execution testing.
? Module testing
? Integrated testing
? Deployment testing
? Post execution testing

6.2.1 Module testing
We create the smaller and separate method for each single module in our undertaking
and tried each module of application separately. Testing done on module level by
dividing different functionalities and check quality of modules individually, following
modules are tested.
• Module of Hardware
• Module of Sensor
• Module of Admin
• Module of Geolocation
• Module of Message Cancelation

6.2.2 Integrated testing
After we tried to test each module separately, we tried each module with the entire
fundamental module together and tried them as like one application which works fine
and tested it. Integrated Testing ensured that all modules are compatible with one
another and work fine.

6.2.3 Deployment testing
We deployed this application on Firebase environment in order to test it and we found
that it works fine and it is quite easy to handle.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 45

6.3 Test Cases
6.3.1 Test Case No 1(Signup)
Table 6.3.1 is a test case used to check whether login functionality of Contractor is
working or not.
Table 6.3.1 Contractor LOGIN
Test Case ID: TC0001
Test Case Version Version 1
Functionality User Sign-up
Actor: User
Pre-Condition: Signup Page containing Signup fields displayed
Input data (Email, Password)
Normal Flow Expected Result Actual Result
1) User access Rescue App.
2) System redirect client to Login
page.
3) User enters valid login credentials
4) User clicks on SIGNUP button.
User is Signed-in User is Signed-in
Alternative flow Expected result Actual Result (Pass/Fail)
1) User access Rescue App.
2) System redirect client to Login.
3) User enters invalid login
credentials
4) User clicks on SIGNUP button.
-Display Error Message Pass
Date 20-June-2018
Tester name Mr. Moazzam
Verified By Dr. Raja Waseem Ahmad

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 46

6.3.2 Test Case No 2 (Login)
Table 6.3.2 is a test case used to check whether functionality of Add Project is working
or not.
Table 6.3.2 Signup
Test Case ID: TC0002
Test Case Version Version 1
Functionality Login
Actor: User
Pre-Condition: User will Signup
Input data User enter credentials
Normal Flow Expected Result Actual Result
1) User Login to app.
2) App validate User credential.
3) Redirect to Profile page.
4) User Successfully Login.
User added successfully User Profile added
Alternative flow Expected result Actual Result (Pass/Fail)
1) User Login to app.
2) User enters wrong information.
3) App validate User credential.
4) User not Successfully Login.
-Display Error Message Pass
Date 20-June-2018
Tester name Mr. Raja Junaid
Verified By Dr. Raja Waseem Ahmad

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 47

6.3.3 Test Case No 3 (Manage Profile)
Table 6.3.3 is a test case used to check whether functionality of Manage Profile is
working or not.
Table 6.3.3 Manage Profile
Test Case ID: TC0003
Test Case Version Version 1
Functionality Manage Profile
Actor: User
Pre-Condition: User Login
Input data User personal information
Normal Flow Expected Result Actual Result
1) User visit to app
2) User click on Profile
3) User enter personal information
4) App save User Information
5) User information added
successfully
User added successfully User Profile added
Alternative flow Expected result Actual Result (Pass/Fail)
1) User visit to app
2) User click on Profile
3) User enters invalid data
-Display Error Message Pass
Date 20-June-2018
Tester name Mr. Raja Junaid
Verified By Dr. Raja Waseem Ahmad

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 48

6.3.4 Test Case No 4 (Collision Detection)
Table 6.3.4 is a test case used to check whether functionality of Collision Detection is
working or not.

Table 6.3.4 Collision Detection
Test Case ID: TC0004
Test Case Version Version 1
Functionality Collision Detection
Actor: User
Pre-Condition: Hardware working perfectly
Input data

Normal Flow Expected Result Actual Result
1) User visit to app
2) User click on Bluetooth
connectivity
3) User select the paired device
4) Hardware connected successfully
Accident Detection Accident Detected
Alternative flow Expected result Actual Result (Pass/Fail)
1) User visit to app
2) User click on Bluetooth
connectivity
3) Hardware not connected
successfully
-Display Error Message Pass
Date 20-June-2018
Tester name Mr. Raja Junaid
Verified By Dr. Raja Waseem Ahmad

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 49

6.3.5 Test Case No 5 (Cancel Accident Message)
Table 6.3.5 is a test case used to check whether functionality of Cancel Accident
Message is working or not.

Table 6.3.5 Cancel Message
Test Case ID: TC0005
Test Case Version Version 1
Functionality Cancel Accident Message
Actor: User
Pre-Condition: Accident Detection
Input data

Normal Flow Expected Result Actual Result
1) User visit to app
2) Accident is detected
3) Cancel message dialogue box
appears
4) User can cancel message
5) Message is canceled
Message cancel
successfully
Message sending cancel
Alternative flow Expected result Actual Result (Pass/Fail)
1) User visit to app
2) Accident is detected
3) Cancel message dialogue box
appears
4) User can cancel message
5) Message is not canceled
-Display Error Message Pass
Date 20-June-2018
Tester name Mr. Shahrukh
Verified By Dr. Raja Waseem Ahmad

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 50

6.3.6 Test Case No 6 (Send Accident Details)
Table 6.3.6 is a test case used to check whether functionality of Send Accident Details
is working or not.

Table 6.3.6 Send Accident Details
Test Case ID: TC0006
Test Case Version Version 1
Functionality Send Accident Details
Actor: User
Pre-Condition: Accident Detected
Input data

Normal Flow Expected Result Actual Result
1) user visit to app
2) Accident is detected
3) Timer end
4) Message sending is not canceled
5) Message accident details are sent
successfully
Accident details will sent
successfully
Accident details are sent
successfully
Alternative flow Expected result Actual Result (Pass/Fail)
1) user visit to app
2) Accident is detected
3) Timer end
4) Message sending is not canceled
5) Message accident details are not
sent successfully
-Display Error Message Pass
Date 20-June-2018
Tester name Mr. Shahrukh
Verified By Dr. Raja Waseem Ahmad

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 51

6.3.7 Test Case No 7 (Logout)
Table 6.3.7 is a test case used to check whether functionality of Logout is working or
not.

Table 6.3.7 Logout
Test Case ID: TC0007
Test Case Version Version 1
Functionality Logout
Actor: User
Pre-Condition: Login
Input data

Normal Flow Expected Result Actual Result
1) User visit to app
2) User Login to app
3) User Logout successfully
User will Logout User Logout successfully
Alternative flow Expected result Actual Result (Pass/Fail)
1) User visit to app
2) User Login to app
3) User not Logout successfully
-Display Error Message Pass
Date 20-June-2018
Tester name Mr. Shahrukh
Verified By Dr. Raja Waseem Ahmad

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 52

Chapter 7 Future Enhancement

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 53

7.1 Introduction
This chapter includes the results & outcomes of Rescue App and covers the possible
enhancement related with system.

7.2 Result and Discussions
Rescue App is an android application that will allow its users to keep his/her data in
application and user can also view his profile. This application can work in a flow which is as
follow.
• User will Signup
• User will Login if not, then sign up first
• User will Manage Profile
• Collision Detection by hardware
• User can Cancel Accident Message
• Send Accident Details
• User will Logout

7.3 Future Enhancement
Rescue App is an android based application which is complete and ready to use at the moment,
but some additional features can be made and implemented in future.
• Web page
• User tracking system
• In side visual view of vehicle
• Affiliation with motorway department

7.4 Conclusion of Contractor Assistant and Inventory Management
system
This chapter summarizes the main points from the study and concludes the work. The
main outcome is formalization of rescue app with hardware. This formalization is
validated through the firebase. This project gives the positive results of functionality
and quality of each model used.
The work performed in this project can further extended in several way/areas includes:

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 54

• Website Pages
• Tracking System
• Affiliation with the motorway
• In side visual view of vehicle
This research has produce the original and innovative idea. The key achievements of
this project is hardware based android application that detect accident and send
automatic message to the receipt.
Yet, every doctoral dissertation should have an end. So I rest my case.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 55

Chapter 8 User Guide

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 56

8.1 Introduction
Main motif of the user manual is user’s guidance that how user will use an application.
This includes application details and will guide the user to use this application.

8.2 Installation guide
This application will be available on the App store. User can easily install this
application and can get the full services of this application and will be benefit a lot. To
install and run this application the user has to follow the following steps.

• Signup
• Login
• Profile
• Connect to hardware
• Cancel Accident Message
• Message
• Location
• Admin Panel
• Delete User
• Modify User
• Disable User
• View List of Registered User

8.3 Rescue App
Here is the process that how to use the Rescue App and Hardware.
User have to buy the hardware and install it in the vehicle and then have to install the android
app to avail the services.

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 57

8.3.1 Signup/Register:
This is the signup screen where user firstly register themselves by entering the Email
and Password.

Figure 8.3.1 Signup

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 58

8.3.2 Login
Here a registered user can login to Rescue App by entering Email and Password.

Figure 8.3.2 Login

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 59

8.3.3 Connectivity:
In this screen user have to connect to the hardware using Bluetooth Paired devices.

Figure 8.3.3 Connectivity

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 60

8.3.4 Cancel button
Sometimes accident may not be horrible, If the user wants to cancel the message then
he cancels the message but they must cancel the message with in time otherwise
message will be sent automatically with in time.

Figure 8.3.4 Cancel Message

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 61

8.3.5 Accident alert
When accident occurs, it gets alert through vibration sensor and send the information to
family by text message.

Figure 8.3.5 Accident Alert

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 62

8.3.6 Get user location from mobile GPS
By clicking on the link received in text message android google maps will open and that
shows the location of the accident and shows the route to reach there.

Figure 8.3.6 Location

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 63

8.4 Admin Panel
8.4.1 Admin Signup ; Login
Admin have his/her own email and password for login and use Admin Panel. Admin
can View, Delete, Modify, Disable, Reset registered users.

8.4.2 View List of User
This screen will show the list of the registered users in database.

Figure 8.4.2 View

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 64

8.4.3 Delete User
Admin can delete user by selecting delete option selected user can be easily deleted.

Figure 8.4.3 Delete User

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 65

8.4.4 Disable User
Admin can disable user by selecting disable option selected user will be disable and can
be enabled later.

Figure 8.4.4 Disable User

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 66

8.4.5 Reset Password
Admin can reset Password of a user by selecting reset password option an email will be
sent to selected users email having new password.

Figure 8.4.5 Reset Password

Rescue App with Hardware

DEPARTMENT OF COMPUTER SCIENCE, CUI, ABBOTTABAD Page 67

8.4.6 Profile
In database against every user there is saved profile of that user. In this table there are

• Name
• Father Name
• Email
• Emergency Phone Number
• Blood Group
• Disease (Sugar, Blood pressure)
• User ID

Figure 8.4.7 Profile

Post Author: admin

x

Hi!
I'm Avery

Would you like to get a custom essay? How about receiving a customized one?

Check it out