MAD Final Micro Project Final PM
MAD Final Micro Project Final PM
MAD Final Micro Project Final PM
Certificate
This is to certify that Miss.Abhang Pooja Gorakh with Roll No- 26 has successfully completed Micro-
project in course Mobile App Development (22617) for the academic year 2023-24 as prescribed in the
'Assessment Manual' during his/her tenure of completing Sixth Semester of Diploma Programme in
Computer Engineering from institute, GES Sir Dr M. S Gosavi polytechnic institute Nashik
The proposed system will be implemented with the help of android application. Which will
alert the nearby people who having this application by sending alert messages to them and
alert sound in the guardian mobile on shaking of victim mobile. Also sends messages and
alert sound to the saved contacts in the application and police station. Which also show the
location of the victim with the help of GPS tracker system. Which also make sound in
guardian mobile when his/her mobile in silent mode.
Guardian app which is installed in the guardian mobile. and initiated by giving there
mobile number
. Girl app which is installed in the girls mobile. and initiated by giving girls name, id,
mobile number.
Server login module which consists data of guardian location information
5.0 Resources required:
Sr Name of
Specification Qty. Remarks
No Resource/Material
Desktop with Intel Core 2 Duo -
1 Hardware Resource 2.93 GHz, RAM 2GB, HDD 1
160 GB
Software Resource Android Studio -
2 1
3 Any Other Resource Internet - -
Micro Project Report
1.0 Rationale:
In today’s fast moving world, Women Security is an issue of growing concern. We have read
about many unfortunate incidents happening with women and the rate is increasing. Women
these days are working women and the globalization has made us aware of gender equality.
Earlier the women were restricted only to the household chores. With the changing scenario,
women are competing with men in all fields .We can see women going to great success levels in
all fields, may it be corporate, scientific, education, business or any other field. Safety of
women matters a lot whether at home, outside the home or working place. Last few crimes
against women especially the case in Delhi was very dread and fearful. Because of such crimes,
women safety has become a major topic. According to the statistics, it is found that every two
out of three women have suffered trauma in the last year. According to the survey of women, it
is found that women are losing their confidence because of such incidents. By the survey of
Delhi government’s Women and Child Development Department, around 80% of the women in
national capital have fear regarding their safety. Women are harassed not only in the night or
evening but also in the day time at their home, working places, or other places like street, club,
etc. It is found through the survey that the reason of safety concern is the lack of gender-
friendly environment and improper functional infrastructure such as consumption of alcohol and
drugs in open area, lack of adequate lighting, safe public toilets, sidewalks, lack of effective
police service, lack of properly working helpline numbers, etc. A huge percentage of women
have no faith that police can curb such harassment cases. There is an urgent need to understand
and solve this problem of women safety so that they can also grow equally like men in their
own country.
Server module
1. After installation of guardian app and victim app two tables are created in server model.
2. Two tables are victim table and guardian table.
3. Victim table contain five columns VID, VNAME, PHONE -NUMBER, LATITUDE,
LONGITUDE.
4. Guardian table contains three columns PHONE NUMBER, LATITUDE, LONGITUDE.
Figure shows the spiral model of software development. This model is combination of well-
known waterfall model and iterative prototyping. It yields rapid development of more complete
version of software. Using spiral model software is developed as series of
Evolutionary releases. During the initial releases, it may just paperwork or prototype. But during
later releases the version goes towards more completed stage.
The spiral model can be adopted to apply throughout entire lifecycle of the application from
concept development to maintenance. The spiral model is divided into set of framework activities
defined by software engineer team. The initial activity is shown from center of circle and
developed in clockwise direction. Each spiral of the model includes following four stages:
Planning Phase: This stage includes requirement gathering, cost estimation, resource allocation.
Risk Analysis Phase: This stage involves strengths and weaknesses of the project. Design Phase:
This stage includes coding, internal testing and deployment.
Evaluation Phase: Last stage involves client evaluation (client side testing) to get the feedback.
Various activities which are performed according to the spiral model phases are shownTab.
5.0 Actual Resources Used:
Sr
Name of Resource/Material Specification Qty. Remarks
No
Processor i3/HDD-
1 Hardware Resource 1
1TB/RAM-8GB
Android Studio,
2 Software Resource 1
jdk1.8.0
3 Any Other Resource Printer 1
Code:
//XML CODE
1. Home Page
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/button2"
android:layout_alignLeft="@+id/button2"
android:onClick="register"
android:layout_marginBottom="71dp"
android:text="Register" />
<Button
android:id="@+id/button3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button2"
android:layout_below="@+id/button2"
android:onClick="display_no"
android:layout_marginTop="74dp"
android:text="View Registered" />
<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:onClick="instruct"
android:layout_centerVertical="true"
android:text="Instructions" />
<Button
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:onClick="verify"
android:text="Register Your Mobile Number" />
</RelativeLayout>
2. Register:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Register" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="64dp"
android:text="Name:" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:layout_marginTop="71dp"
android:text="Number:" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="68dp"
android:onClick="storeInDB"
android:text="Save" />
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView2"
android:layout_alignBottom="@+id/textView2"
android:layout_alignRight="@+id/button1"
android:ems="10"
android:hint="Mobile Number"
android:inputType="phone" />
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_alignLeft="@+id/editText2"
android:ems="10"
android:hint="Person Name"
android:inputType="textPersonName" >
<requestFocus />
</EditText>
<Button
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button1"
android:layout_alignParentBottom="true"
android:layout_marginBottom="21dp"
android:onClick="instructions"
android:text="Instructions" />
<Button
android:id="@+id/button3"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/button1"
android:layout_alignTop="@+id/button2"
android:onClick="display"
android:text="View Registered" />
</RelativeLayout>
3. Verify:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Verify" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="176dp"
android:onClick="verify_no"
android:text="Submit" />
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/button1"
android:layout_centerHorizontal="true"
android:layout_marginBottom="76dp"
android:ems="10"
android:hint="Your Phone Number"
android:inputType="phone" >
<requestFocus />
</EditText>
<Button
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="94dp"
android:onClick="back"
android:text="Back" />
</RelativeLayout>
4. Instructions:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Instructions" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:text="INSTRUCTIONS"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/help"
android:layout_centerHorizontal="true"
android:layout_marginTop="34dp"
android:onClick="back"
android:text="Main Menu" />
<TextView
android:id="@+id/help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/button1"
android:layout_below="@+id/textView1"
android:layout_marginTop="15dp"
android:text="@string/help" />
</RelativeLayout>
5. Display:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Display" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:onClick="back"
android:text="Main Menu" />
</RelativeLayout>
//JAVA CODE
1. AccelerometerManager.java
package com.sid.womensafetyapp;
import java.util.List;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.widget.Toast;
/**
* Returns true if the manager is listening to orientation changes
*/
public static boolean isListening() {
return running;
}
/**
* Unregisters listeners
*/
public static void stopListening() {
running = false;
try {
if (sensorManager != null && sensorEventListener != null) {
sensorManager.unregisterListener(sensorEventListener);
}
} catch (Exception e) {}
}
/**
* Returns true if at least one Accelerometer sensor is available
*/
public static boolean isSupported(Context context) {
aContext = context;
if (supported == null) {
if (aContext != null) {
} else {
supported = Boolean.FALSE;
}
}
return supported;
}
2. BgService.java
package com.sid.womensafetyapp;
import android.annotation.SuppressLint;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.telephony.SmsManager;
import android.util.Log;
import android.widget.Toast;
@SuppressLint("HandlerLeak")
String str_address;
super(looper);
}
@Override
public void handleMessage(Message msg) {
@Override
public IBinder onBind(Intent arg0) {
return null;
}
@Override
public void onCreate() {
super.onCreate();
if (AccelerometerManager.isSupported(this)) {
AccelerometerManager.startListening(this);
}
HandlerThread thread = new
HandlerThread("ServiceStartArguments",android.os.Process.THREAD_PRIORITY_BACKGROUND);
thread.start();
mServiceLooper = thread.getLooper();
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// Start a sticky.
return START_STICKY;
}
switch (message.what) {
case 1:
Bundle bundle = message.getData();
str_address = bundle.getString("address");
// TelephonyManager
tmgr=(TelephonyManager)BgService.this.getSystemService(Context.TELEPHONY_SERVICE);
// String ph_number=tmgr.getLine1Number();
SQLiteDatabase db;
db=openOrCreateDatabase("NumDB", Context.MODE_PRIVATE, null);
Cursor c=db.rawQuery("SELECT * FROM details", null);
Cursor c1=db.rawQuery("SELECT * FROM SOURCE", null);
String source_ph_number=c1.getString(0);
while(c.moveToNext())
{
String target_ph_number=c.getString(1);
// SmsManager smsManager=SmsManager.getDefault();
// smsManager.sendTextMessage("+918121668944", "+918121668944", "Please help me. I
need help immediately. This is where i am now:"+str_address, null, null);
Toast.makeText(getApplicationContext(),
"Source:"+source_ph_number+"Target:"+target_ph_number, Toast.LENGTH_SHORT).show();
}
db.close();
break;
default:
str_address = null;
}
Toast.makeText(getApplicationContext(), str_address, Toast.LENGTH_SHORT).show();
}
}
@Override
public void onAccelerationChanged(float x, float y, float z) {
// TODO Auto-generated method stub
}
@Override
public void onShake(float force) {
GPSTracker gps;
gps = new GPSTracker(BgService.this);
if(gps.canGetLocation()){
}
else{
gps.showSettingsAlert();
}
}
// onDestroy method. Display toast that service has stopped.
@Override
public void onDestroy() {
super.onDestroy();
if (AccelerometerManager.isListening()) {
AccelerometerManager.stopListening();
}
3. Verify.java
package com.sid.womensafetyapp;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import android.support.v4.app.NavUtils;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Build;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_verify);
// Show the Up button in the action bar.
setupActionBar();
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.verify, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of this
// activity, the Up button is shown. Use NavUtils to allow users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
}
4. Display.java
package com.sid.womensafetyapp;
import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
Cursor c;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_display);
SQLiteDatabase db;
db=openOrCreateDatabase("NumDB", Context.MODE_PRIVATE, null);
c=db.rawQuery("SELECT * FROM details", null);
if(c.getCount()==0)
{
showMessage("Error", "No records found.");
return;
}
StringBuffer buffer=new StringBuffer();
while(c.moveToNext())
{
buffer.append("Name: "+c.getString(0)+"\n");
buffer.append("Number: "+c.getString(1)+"\n");
}
showMessage("Details", buffer.toString());
Intent i_startservice=new Intent(Display.this,BgService.class);
startService(i_startservice);
}
}
5. RGeocoder.java
package com.sid.womensafetyapp;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
import android.content.Context;
import android.location.Address;
import android.location.Geocoder;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
}
}
catch (IOException e) {
Log.e(TAG, "Unable connect to Geocoder", e);
}
finally {
Message message = Message.obtain();
message.setTarget(handler);
if (result != null) {
message.what = 1;
Bundle bundle = new Bundle();
result = "Latitude: " + latitude + " Longitude: " + longitude +
"\n\nAddress:\n" + result;
bundle.putString("address", result);
message.setData(bundle);
} else {
message.what = 1;
Bundle bundle = new Bundle();
result = "Latitude: " + latitude + " Longitude: " + longitude +
"\n Unable to get address for this lat-long.";
bundle.putString("address", result);
message.setData(bundle);
}
message.sendToTarget();
}
}
};
thread.start();
}
}
OUTPUT
Home Page
Fig. Home
Register Page
Fig. Register
Verify Page
Fig.Verify
Instructions Page
Fig. Instruction
Display Page
Fig. Display