Skip to content

7rdamian/safe-alert-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SafeAlert - Android Personal Safety App

SafeAlert is a native Android application designed to enhance personal security. Built with modern Android development standards (Kotlin & Jetpack Compose), it utilizes device hardware sensors and background services to automatically detect emergencies and notify trusted contacts with live location data.

Key Features

  • Hardware SOS Detection: Integrates with the device's Accelerometer to trigger an automatic SOS protocol if the user violently shakes the phone.
  • Inactivity & Battery Monitoring: Automatically alerts trusted contacts if the device remains completely stationary for a user-defined period, or if the battery drops below 10%.
  • Live Location Sharing: Fetches accurate GPS coordinates using FusedLocationProvider and sends a Google Maps link via SMS to a preset list of emergency contacts.
  • Automated Audio Recording: Covertly records background audio using the device microphone when an emergency is triggered, saving it locally for later retrieval.
  • Severe Weather Warnings: Connects to the OpenWeather API to monitor local meteorological data, automatically warning the user (and their contacts) of extreme conditions like thunderstorms.
  • Modern UI: Built entirely with Jetpack Compose for a reactive, smooth, and modern user interface.

Tech Stack

  • Language: Kotlin
  • UI Framework: Jetpack Compose, Material Design 3
  • Hardware & APIs: Android SensorManager (Accelerometer), BatteryManager, MediaRecorder, SmsManager
  • Location & Network: Google Play Services Location API, OpenWeather REST API

How to Run

  1. Clone the repository:

    git clone https://github.com/yourusername/safealert-android.git
  2. Open the project in Android Studio.

  3. API Key Setup: Create a local.properties file in the root directory and add your OpenWeather API key:

OPEN_WEATHER_API_KEY="your_api_key_here"
  1. Build and run the app on a physical Android device (emulators may not support hardware shaking or SMS dispatching).

What I Learned

Building SafeAlert pushed me to learn hardware-level Android development. I learned how to manage complex user permissions (Location, SMS, Contacts, Microphone), handle asynchronous API calls using Kotlin Coroutines, and read raw data from hardware sensors (like calculating G-force from accelerometer axes) to trigger background events.

About

A native Android personal safety application built with Kotlin and Jetpack Compose, featuring automated SOS SMS alerts, background hardware sensor monitoring, and live severe weather warnings.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages