Project Report - Template
Project Report - Template
{Title}
A Project Report
Submitted in partial fulfillment for the award of the degree
of
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
by
Name : XXXXXX
Roll No:XXXX
I hereby declare that the project entitled “WOMEN SAFETY APP” submitted by
me in partial fulfillment of the requirement for the award of BACHELOR OF
TECHNOLOGY Degree in COMPUTER SCIENCE AND ENGINEERING,
comprises our original work and due references have been made in text to all other
material used.
ii
CERTIFICATE
This is to certify that the project entitled “WOMEN SAFETY APP” is the
bonafide work carried out by Himanshu Kathpalia(14001001021) who is a
student of B. Tech, DCRUST, Murthal, during the year 2017 , in partial fulfillment
of the requirements for the award of the Degree of Bachelor of Technology and
that the project has not formed the basis for the award of any degree earlier.
The purpose of the project is to to ensure the safety of women while travelling because today
the safety of women has become a serious issue in our society. This app basically allows the
women to send the danger message to the desired phone number. As soon as the women will
press the emergency button not only the message will be sent but also phone call will be
automatically made to the police number.The project basically has following modules.
1. Login Page
2. Complaint Tab
3. Filing An FIR.
4. Filing a complaint to an N.G.O.
5. Sending Safety Form
6. Camera
The app is both online as well as offline as some features uses internet access while others can
be used offline also.
iv
ACKNOWLEDGEMENTS
Finally, I would be failing to my duty if I did not put on record my deep sense
of obligation to my parents and friends, who provided me an environment
conducive to hardwork.
v
Table of contents
Title Page
Declaration of the Student
Certificate of the Guide
Abstract
Acknowledgement
Chapter 1. INTRODUCTION
1.1 Project Overview
1.2 Problem Statement
1.3 Feasibility Study
1.4 Feasibility Report
The main objective of the project is to develop an android application which could make women
feel safe while traveling . The project provides an easy way to handle all things .While travelling
the women can fill the safety form in advance and as soon as she feels there is a danger she could
press the danger button .It will not only send the sms at the desired phone number but would also
be able to make a call to women helpline number automatically. So during danger it helps a lot.
1.2. Problem Statement
Problem statement is one of the basic and important phases of project phase. When the basic
problem is determined, it is documented and the symptomatic problem is analyzed, then the
current list of basic problem is completed. A system is simply a set of components that interact to
accomplish some purpose.
This project aims at providing the facilities to the user to be safe in an easy and efficient manner
with multiple tabs. This application can be used for the benefit of user by saving a lot of lives by
not directly interacting with the users and insteadinforming to relatives and police.
All apps are generally online so at time there is no internet connection it creates problem.
Therefore, by facing all these problems we personally feel that there is a need of awomen safety
app to save the precious time and resources.
All projects are feasible given unlimited resources and infinite time. But the development of
software is plagued by the scarcity of resources and difficult delivery rates. It is both necessary
and prudent to evaluate the feasibility of a project at the earliest possible time.
Economic Feasibility:
This procedure is to determine the benefits and savings that are expected from a candidate
system and compare them with costs. If benefits outweigh costs, then the decision is made to
design and implement the system. Otherwise, further justification or alterations in proposed
system will have to be made if it is to have a chance of being approved. This is an ongoing effort
that improves in accuracy at each phase of the system life cycle.
Technical Feasibility:
Technical feasibility centers on the existing computer system (hardware, software, etc.,) and to
what extent it can support the proposed addition. If the budget is a serious constraint, then the
project is judged not feasible.
Operational Feasibility:
People are inherently resistant to change, and computers have been known to facilitate change.
1. Technical feasibility:
The system is self-explanatory and does not need any extra sophisticated training to learnto handle
women safety app. As the system has been built by concentrating on the User ease to understand
Concepts, the application can also be handled very easily with a novice User. The overall time that
is required to train the users upon the system is less than half an hour.
The System has been added with features of online complaints and button interaction methods,
which makes the user the master as he starts working through the environment.
2. Financial Feasibility:
Time Based: It requires time to build this app but since it is going to benefit a lot of
users so it does not matters much.
Cost Based: No special investment need to manage the app. Investment requires only
once at the time of preparation. The software used in this project is freeware so the cost
of developing the tool is minimal and hence the overall cost.
2. System Analysis and Design
System Analysis is first stage according to System Development Life Cycle model. This System
Analysis is a process that starts with the analyst.
Analysis is a detailed study of the various operations performed by a system and their
relationships within and outside of the system. One aspect of analysis is defining the boundaries
of the system and determining whether or not a candidate system should consider other related
systems. During analysis, data are collected on the available files, decision points, and
transactions handled by the present system.
Logical system models tools that are used in analysis. Training, experience, and common sense
are required for collection of the information needed to do the analysis.
Moreover the app don’t keeps the record of what you do.
Requirement Analysis is a software engineering task that bridges the gap between system level
software allocation and software design. It provides the system engineer to specify software
function and performance, indicate software’s interface with the other system elements and
establish constraints that software must meet.
The basic aim of this stage is to obtain a clear picture of the needs and requirements of the end-
user and also the organization. Analysis involves interaction between the clients and the analysis.
Usually analysts research a problem by asking questions and reading existing documents. The
analysts have to uncover the real needs of the user even if they don’t know them clearly. During
analysis it is essential that a complete and consistent set of specifications emerge for the system.
Here it is essential to resolve the contradictions that could emerge from information got from
various parties. This is essential to ensure that the final specifications are consistent.
Problem recognition
Evaluation and synthesis
Modeling
Specification
Review
Each Requirement analysis method has a unique point of view. However all analysis
methods are related by a set of operational principles.
They are
2. Memory : 2 GB RAM
3. Monitor : Mono/Color
b) Monitor
3. Layout : Xml
3. Implementation / Coding
ANDROID STUDIO
Android Studio is the official IDE for android application development.It
works based on IntelliJ IDEA, You can download the latest version of
android studio from Android Studio 2.2 Download, If you are new to
installing Android Studio on windows,you will find a file, which is named
as android-studio-bundle-143.3101438-windows.exe.So just download and
run on windows machine according to android studio wizard guideline.
If you are installing Android Studio on Mac or Linux, You can download the
latest version from Android Studio Mac Download,or Android Studio Linux
Download, check the instructions provided along with the downloaded file
for Mac OS and Linux. This tutorial will consider that you are going to setup
your environment on Windows machine having Windows 8.1 operating
system.
Installation
So let's launch Android Studio.exe,Make sure before launch Android Studio,
Our Machine should required installed Java JDK. To install Java JDK,take a
references of Android environment setup
Once you launched Android Studio, its time to mention JDK7 path or later
version in android studio installer.
Need to specify the location of local machine path for Android studio and
Android SDK, below the image has taken default location of windows 8.1
x64 bit architecture.
Need to specify the ram space for Android emulator by default it would take
512MB of local machine RAM.
At final stage, it would extract SDK packages into our local machine, it
would take a while time to finish the task and would take 2626MB of Hard
disk space.
4.
5. After done all above steps perfectly, you must get finish button and it
gonna be open android studio project with Welcome to android studio
message as shown below
You can start your application development by calling start a new android
studio project. in a new installation frame should ask Application name,
package information and location of the project.
After entered application name, it going to be called select the form factors
your application runs on, here need to specify Minimum SDK, in our tutorial,
I have declared as API23: Android 6.0(Mashmallow)
The next level of installation should contain selecting the activity to mobile,
it specifies the default layout for Applications
The Java Development Kit (JDK) is an implementation of either one of the Java Platform,
Standard Edition; Java Platform, Enterprise Edition or Java Platform, Micro Edition platforms
released by Oracle Corporation in the form of a binary product aimed at Java developers on
Solaris, Linux, macOS or Windows. The JDK includes a private JVM and a few other resources
to finish the development of a Java Application. Since the introduction of the Java platform, it
has been by far the most widely used Software Development Kit (SDK). On 17 November 2006,
Sun announced that they would release it under the GNU General Public License (GPL), thus
making it free software. This happened in large part on 8 May 2007, when Sun contributed the
source code to the OpenJDK.
The JDK has as its primary components a collection of programming tools, including:
appletviewer – this tool can be used to run and debug Java applets without a web browser
extcheck – a utility that detects JAR file conflicts
idlj – the IDL-to-Java compiler. This utility generates Java bindings from a given Java
IDL file.
jabswitch – the Java Access Bridge. Exposes assistive technologies on Microsoft
Windows systems.
java – the loader for Java applications. This tool is an interpreter and can interpret the
class files generated by the javac compiler. Now a single launcher is used for both
development and deployment. The old deployment launcher, jre, no longer comes with
Sun JDK, and instead it has been replaced by this new java loader.
javac – the Java compiler, which converts source code into Java bytecode
javadoc – the documentation generator, which automatically generates documentation
from source code comments
jar – the archiver, which packages related class libraries into a single JAR file. This tool
also helps manage JAR files.
javafxpackager – tool to package and sign JavaFX applications
jarsigner – the jar signing and verification tool
javah – the C header and stub generator, used to write native methods
javap – the class file disassembler
javaws – the Java Web Start launcher for JNLP applications
4.3. Java (programming language)
The latest version is Java 8 Update 121 which is the only version currently supported for free by
Oracle, although earlier versions are supported both by Oracle and other companies on a
commercial basis.
4.3.1. Performance
Programs written in Java have a reputation for being slower and requiring more memory than
those written in C++. However, Java programs' execution speed improved significantly with the
introduction of just-in-time compilation in 1997/1998 for Java 1.1, the addition of language
features supporting better code analysis (such as inner classes, the StringBuilder class, optional
assertions, etc.), and optimizations in the Java virtual machine, such as HotSpot becoming the
default for Sun's JVM in 2000. With Java 1.5, the performance was improved with the addition
of the java.util.concurrent package, including Lock free implementations of the ConcurrentMaps
and other multi-core collections, and it was improved further Java 1.6.
Some platforms offer direct hardware support for Java; there are microcontrollers that can run
Java in hardware instead of a software Java virtual machine, and some ARM based processors
could have hardware support for executing Java bytecode through their Jazelle option, though
support has mostly been dropped in current implementations of ARM.
Java uses an automatic garbage collector to manage memory in the object lifecycle. The
programmer determines when objects are created, and the Java runtime is responsible for
recovering the memory once objects are no longer in use. Once no references to an object
remain, the unreachable memory becomes eligible to be freed automatically by the garbage
collector. Something similar to a memory leak may still occur if a programmer's code holds a
reference to an object that is no longer needed, typically when objects that are no longer needed
are stored in containers that are still in use. If methods for a nonexistent object are called, a "null
pointer exception" is thrown.
One of the ideas behind Java's automatic memory management model is that programmers can
be spared the burden of having to perform manual memory management. In some languages,
memory for the creation of objects is implicitly allocated on the stack, or explicitly allocated and
deallocated from the heap. In the latter case the responsibility of managing memory resides with
the programmer. If the program does not deallocate an object, a memory leak occurs. If the
program attempts to access or deallocate memory that has already been deallocated, the result is
undefined and difficult to predict, and the program is likely to become unstable and/or crash.
This can be partially remedied by the use of smart pointers, but these add overhead and
complexity. Note that garbage collection does not prevent "logical" memory leaks, i.e., those
where the memory is still referenced but never used.
Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is
guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new
object; this can cause a program to stall momentarily. Explicit memory management is not
possible in Java.
Java does not support C/C++ style pointer arithmetic, where object addresses and unsigned
integers (usually long integers) can be used interchangeably. This allows the garbage collector to
relocate referenced objects and ensures type safety and security.
As in C++ and some other object-oriented languages, variables of Java's primitive data types are
either stored directly in fields (for objects) or on the stack (for methods) rather than on the heap,
as is commonly true for non-primitive data types (but see escape analysis). This was a conscious
decision by Java's designers for performance reasons.
Java contains multiple types of garbage collectors. By default HotSpot uses the parallel scavenge
garbage collector. However, there are also several other garbage collectors that can be used to
manage the heap. For 90% of applications in Java, the Concurrent Mark-Sweep (CMS) garbage
collector is sufficient. Oracle aims to replace CMS with the Garbage-First collector (G1).
4.3.3. Syntax
The syntax of Java is largely influenced by C++. Unlike C++, which combines the syntax for
structured, generic, and object-oriented programming, Java was built almost exclusively as an
object-oriented language. All code is written inside classes, and every data item is an object, with
the exception of the primitive data types, (i.e. integers, floating-point numbers, boolean values,
and characters), which are not objects for performance reasons. Java reuses some popular aspects
of C++ (such as printf() method).
Unlike C++, Java does not support operator overloading or multiple inheritance for classes,
[49]
though multiple inheritance is supported for interfaces. This simplifies the language and aids
in preventing potential errors and anti-pattern design.
Java uses comments similar to those of C++. There are three different styles of comments: a
single line style marked with two slashes (//), a multiple line style opened with /* and closed with
*/, and the Javadoc commenting style opened with /** and closed with */. The Javadoc style of
commenting allows the user to run the Javadoc executable to create documentation for the
program, and can be read by some integrated development environments (IDEs) such as Eclipse
to allow developers to access documentation within the IDE.
14
Concepts of Android
The basic building block for user interface is a View object which is created from the View
class and occupies a rectangular area on the screen and is responsible for drawing and event
handling. View is the base class for widgets, which are used to create interactive UI components
like buttons, text fields, etc.
The ViewGroup is a subclass of View and provides invisible container that hold other Views or
other ViewGroups and define their layout properties.
At third level we have different layouts which are subclasses of ViewGroup class and a typical
layout defines the visual structure for an Android user interface and can be created either at run
time using View/ViewGroupobjects or you can declare your layout using simple XML
file main_layout.xml which is located in the res/layout folder of your project.
LAYOUT PARAMS
Android Layout Types
There are number of Layouts provided by Android which you will use in almost all the Android
applications to provide different view, look and feel.
1 Linear Layout
LinearLayout is a view group that aligns all children in a single direction, vertically or
horizontally.
2 Relative Layout
RelativeLayout is a view group that displays child views in relative positions.
3 Table Layout
TableLayout is a view that groups views into rows and columns.
4 Absolute Layout
AbsoluteLayout enables you to specify the exact location of its children.
5 Frame Layout
The FrameLayout is a placeholder on screen that you can use to display a single view.
6 List View
ListView is a view group that displays a list of scrollable items.
7 Grid View
GridView is a ViewGroup that displays items in a two-dimensional, scrollable grid.
Layout Attributes
Each layout has a set of attributes which define the visual properties of that layout. There are
few common attributes among all the layouts and their are other attributes which are specific to
that layout. Following are common attributes and will be applied to all the layouts:
1
android:id
2
android:layout_width
3
android:layout_height
4
android:layout_marginTop
5
android:layout_marginBottom
6
android:layout_marginLeft
7
android:layout_marginRight
8
android:layout_gravity
This specifies how much of the extra space in the layout should be allocated to the View.
10
android:layout_x
11
android:layout_y
12
android:layout_width
13
android:layout_width
14
android:paddingLeft
15
android:paddingRight
16
android:paddingTop
17
android:paddingBottom
Here width and height are the dimension of the layout/view which can be specified in terms of
dp (Density-independent Pixels), sp ( Scale-independent Pixels), pt ( Points which is 1/72 of an
inch), px( Pixels), mm ( Millimeters) and finally in (inches).
You can specify width and height with exact measurements but more often, you will use one of
these constants to set the width or height −
Gravity attribute plays important role in positioning the view object and it can take one or more
(separated by '|') of the following constant values.
Top 0x30 Push object to the top of its container, not changing its size.
Bottom 0x50 Push object to the bottom of its container, not changing its size.
Left 0x03 Push object to the left of its container, not changing its size.
Right 0x05 Push object to the right of its container, not changing its size.
center_vertical 0x10 Place object in the vertical center of its container, not changing its size.
fill_vertical 0x70 Grow the vertical size of the object if needed so it completely fills its
container.
center_horizonta 0x01 Place object in the horizontal center of its container, not changing its size.
l
fill_horizontal 0x07 Grow the horizontal size of the object if needed so it completely fills its
container.
Center 0x11 Place the object in the center of its container in both the vertical and
horizontal axis, not changing its size.
Fill 0x77 Grow the horizontal and vertical size of the object if needed so it fill
EVENTS
Events are a useful way to collect data about a user's interaction with interactive
components of Applications.Like button presses or screen touch etc. The Android
framework maintains an event queue as first-in, first-out (FIFO) basis. You can capture
these events in your program and take appropriate action as per requirements.
Event Listeners − An event listener is an interface in the View class that contains a single
callback method. These methods will be called by the Android framework when the View to
which the listener has been registered is triggered by user interaction with the item in the UI.
Event Handlers − When an event happens and we have registered an event listener for the
event, the event listener calls the Event Handlers, which is the method that actually handles
the event.
OnClickListener()
onClick() This is called when the user either clicks or touches or focuses upon any
widget like button, text, image etc. You will use onClick() event handler to
handle such event.
OnLongClickListener()
This is called when the user either clicks or touches or focuses upon any
onLongClick()
widget like button, text, image etc. for one or more seconds. You will use
onLongClick() event handler to handle such event.
onFocusChange()
OnFocusChangeListener()
This is called when the widget looses its focus ie. user goes away from the
view item. You will use onFocusChange() event handler to handle such event.
OnFocusChangeListener()
This is called when the user is focused on the item and presses or releases a
onKey()
hardware key on the device. You will use onKey() event handler to handle
such event.
OnTouchListener()
This is called when the user presses the key, releases the key, or any
onTouch()
movement gesture on the screen. You will use onTouch() event handler to
handle such event.
OnMenuItemClickListener()
onMenuItemClick() This is called when the user selects a menu item. You will use
onMenuItemClick() event handler to handle such event.
onCreateContextMenuItemListener()
onCreateContextMenu() This is called when the context menu is being built(as the result of a sustained
"long click)
Apart from the above, there are other available Intents provided by MediaStore. They are listed
as follows
It returns the image captured from the camera , when the device is secured
ACTION_VIDEO_CAPTURE
2
It calls the existing video application in android to capture video
EXTRA_SCREEN_ORIENTATION
3
It is used to set the orientation of the screen to vertical or landscape
EXTRA_FULL_SCREEN
4
It is used to control the user interface of the ViewImage
INTENT_ACTION_VIDEO_CAMERA
5
This intent is used to launch the camera in the video mode
EXTRA_SIZE_LIMIT
6
It is used to specify the size limit of video or image capture size
Now you will use the function startActivityForResult() to launch this activity and wait for its
result. Its syntax is given below
startActivityForResult(intent,0)
This method has been defined in the activity class. We are calling it from main activity. There
are methods defined in the activity class that does the same job , but used when you are not
calling from the activity but from somewhere else. They are listed below
1
startActivityForResult(Intent intent, int requestCode, Bundle options)
It starts an activity , but can take extra bundle of options with it
In Android, you can use SmsManager API or devices Built-in SMS application to send SMS's.
In this tutorial, we shows you two basic examples to send SMS message −
SmsManager API
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);
Apart from the above method, there are few other important functions available in SmsManager
class. These methods are listed below −
This method divides a message text into several fragments, none bigger than the maximum
SMS message size.
2
static SmsManager getDefault()
3
void sendDataMessage(String destinationAddress, String scAddress, short
destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent)
This method is used to send a data based SMS to a specific application port.
4
void sendMultipartTextMessage(String destinationAddress, String scAddress,
ArrayList<String> parts, ArrayList<PendingIntent> sentIntents,
ArrayList<PendingIntent> deliveryIntents)
5
void sendTextMessage(String destinationAddress, String scAddress, String text,
PendingIntent sentIntent, PendingIntent deliveryIntent)
Android provides Built-in applications for phone calls, in some occasions we may need to make
a phone call through our application. This could easily be done by using implicit Intent with
appropriate actions. Also, we can use PhoneStateListener and TelephonyManager classes, in
order to monitor the changes in some telephony states on the device.
This chapter lists down all the simple steps to create an application which can be used to make a
Phone Call. You can use Android Intent to make phone call by calling built-in Phone Call
functionality of the Android. Following section explains different parts of our Intent object
required to make a call.
CONTROL FLOW DIAGRAM OF LOGIN PAGE
Login Page
Click generate
OTP is also stored in string . OTP Button
Enter Phone
. . Number
Enter OTP in
Edit . Text
Complaint Camera
Safety Form
centre
Control flow diagram of first tab
Complaint
. Centre
FIR
Button
Complain
Online FIR
webpage Online
NGO
Complaint
Safety Form
Enter Phone
Number and other .
. details
Click
Emergency . .
Button
Camera Opens up
About My Project
As soon as we open the app we see the login page . It appears as shown below in
the image. It contains a phone number field where you have to enter your phone
number.
When you will enter the phone number and click on generate otp button you will
receive a text message of otp and a toast will be displayed showing the otp sent
message. Now after pressing the generate otp button you will see the below shown
message. The otp is being generated with help of random variable and that value is
alsobeing stored in string for further checking.
Now fill the text you get as otp in the edit text provided and than click on submit
Button . Now the value from edit text will be picked up and will be compared with
the otp that had been generated and had been stored as a string . If otp does not
matches than following text will be displayed.
If OTP matches than you will enter the tab activity. It contains 3 tabs named
1. Complain
2. Safety Form
3. Camera
COMPLAIN TAB
Complain Tab contains 2 buttons.
On clicking on file fir to police the online fir portal of police will open and you can
register fir there. In this we are redirecting you to the online web page of FIR
maintained by police
Second tab
Second Tab is Safety Form which deals with safety message sending . It contains
various fields like receivers phone no meaning to which phone no you will like to
send message. And then you have to fill other details which you have to send to
receivers number
The person must have balance in his phone sim in order to Call and also to send
messages. In case balance is not present in person sim card he will not be able to
take advantage of any facility related to emergency.
Installation of Project
1. Firstly install android studio to your System as explained in the introductory part
of android studio.
2. Click on import project.
3. And import my project in it.
4. You will see that there are no error in my application so you could easily run it
5. Take your android phone and Go to settings
6. In settings go to about device options.
7. There is a built number present there click on it 5 times.
8. The device will show you message that developer options has been enabled.
9. Now connect USB to android device and connect other end of USB cable to
your system and in android studio click on run button
10. Your app will be automatically Launched.
REFERENCES
[1]. Deital and Deital, Java How to Program, Prentice Hall (2007).
[2].Herbert Schildt, Java: The Complete Reference, McGraw-Hill.
[3].https://www.w3schools.com/sql/default.asp
[4].https://www.tutorialspoint.com/sql/
[5].https://www.javatpoint.com/java-tutorial
[6].Korth, Silberschatz, Database System Concepts , 4th Ed., TMH, 2000.