Android Project – Emergency App with Source Code

FREE Online Courses: Knowledge Awaits – Click for Free Access!

In this tutorial, you will understand how to build a basic emergency app using Android Studio.

What is an Emergency App?

This is an emergency application or SOS app. This app will help the users to call for instant help with one click. In this app, users can save contacts previously. When users feel any danger, then with just one click, the app will automatically call the police and they can send a help message to all the saved contacts.

Flow of Android Emergency Application

There is a home screen. The home screen has a button to add new contacts. Clicking on that button will take you to the ‘add contact’ screen. There you will have three buttons – add, delete and view.

1. Add

Enter the new contact you want to add in the edit-text field. Click on the Add button to add the contact.

2. Delete

Enter the contact you want to delete in the edit-text field. Click on the delete button to delete the contact.

3. View

Click on this button to view all the saved contacts.

In-home screen, there are some emergency buttons. Each button, when clicked sends a help message with the current location of the user to all the contacts saved in the app and dialed 100 in case of danger or theft and 101 in case of an accident.

Features of Emergency app

  1. The home screen has 4 buttons
  2. You can add new contacts
  3. You can delete old contacts
  4. You can view saved contacts
  5. In a single click, the app will send a help message to all the contacts saved in the app\
  6. The app will also dial the cops or ambulance depending on the button clicked.

Prerequisites for Android Emergency app

You will need to be familiar with the Android Studio to create the apps. You should also have a good grasp of the following technologies and tools to complete the project.

  • Java: The functionality of the app is coded in Java.
  • XML: In the frontend, XML will be used.
  • Android Studio: Android Studio will be used to develop apps.
  • SQL: The contact information will be stored using SQL.
  • Google Location Service: Using google-location-service, we will find out the user’s current location.

Developing Android Emergency app

We created the following files for this emergency app. Before we implement it, let’s review them.

  1. We’ll begin by creating activity_main.xml. On this screen, we will display the dashboard for our application
  2. The following file is followed by a java file, MainActivity.java. This file handles the above file
  3. We now need to create the XML files for our user interfaces and the Java files for the code in our modules
  4. One screen will allow the user to select the emergency and another will allow them to add new contacts
  5. Below you will see some of the files we are going to use:
    1. Themes.xml: This will be the basis for our theme.
    2. colors.xml: Using this parameter, we will determine the application’s colors.

Download Android Emergency app Project Source Code

In order to actually implement the application, please download the project code from the following link: Android Emergency App Project

Once you have downloaded the Emergency app project code, you need to open the zip file and extract the following components to extract the source code:

Steps to implement the Android Emergency app Project:

1.  Install the ProjectGurukul emergency app source code on your desktop, unzip it anywhere. Now, launch and run Android Studio, select Open from the File menu, and navigate to the directory that contains the source code.

2.  You’ll see the app running on your Virtual Device as soon as you click the green Run button at the top of the page.

Android Emergency App Output

The application will look like this.

Dashboard screen

android emergency app output

Entering contact

enter emergency contact

Emergency call dialed

emergency call

Help message with latitudes and longitudes of your location send

message with latitudes longitudes

Summary

We have successfully developed Android Emergency app (SOS App) You can even add more features such as calling and sending messages with a triple-click of the volume button in Android Studio. Our goal was to help you understand what an emergency application is, its flow, and how it can be implemented on Android Studio.

If you are Happy with ProjectGurukul, do not forget to make us happy with your positive feedback on Google | Facebook

2 Responses

  1. Ndabi Emmanuel MUKISA says:

    am also developing an emergency application and i wish to build from your development in a way that my development will just require the user to shake the phone three times and the app sends the messages to the contacts. thanks a Mukisa Emmanuel a Ugandan student doing computer science and am doing my final year project.
    patiently waiting for your reply.

  2. Ndabi Emmanuel MUKISA says:

    can i have a display of the database

Leave a Reply

Your email address will not be published. Required fields are marked *