Skip to content

Repository files navigation

SHEild

SHEild is a robust Android personal safety application designed to protect users through offline AI, hardware sensors, and automated emergency dispatch. By utilizing on-device scream detection, hardware fall triggers, and realistic fake call de-escalation tactics, SHEild acts as a hands-free guardian that reacts instantly when you are unable to reach your phone.

Features

  • Interactive Fake Call (De-escalation): Simulates a highly realistic incoming call (with interchangeable Android/iOS skins). Features a functional keypad and an interactive AI voice agent that asks "Are you safe?" to provide plausible deniability in uncomfortable social situations.
  • Scream & Threat Detection (Edge AI): Uses TensorFlow Lite and the YAMNet audio classification model running locally on the device to continuously monitor for distress sounds (like screams) and auto-trigger SOS alerts.
  • Hardware SOS Triggers:
    • Shake Detection: Violently shaking the device instantly launches the Fake Call screen.
    • Fall/Impact Detection: Analyzes accelerometer data to detect a sudden drop or impact, automatically dispatching an SOS if the user is incapacitated.
  • Dead Man's Switch: If a scheduled Fake Call rings and is not answered or declined within 30 seconds, the app assumes the user has been prevented from answering and silently dispatches an SOS.
  • Offline Location Dispatch: Bypasses the need for cellular data by formatting high-accuracy FusedLocationProvider coordinates into a Google Maps link and dispatching it via raw SMS to trusted contacts.
  • Voice Safe-Word Authentication: Cancels accidental alarms by recognizing a user-defined secret word via partial-match speech recognition.
  • Auto-Arming Night Mode: Automatically activates the Shake and Scream background sensors between 10 PM and 6 AM.
  • Live Journey Tracking: Logs GPS coordinates locally to a timeline, ensuring the last known location is saved even if the device loses connection.

Tech Stack

  • Language: Kotlin
  • Architecture: MVVM / Repository Pattern
  • Machine Learning: TensorFlow Lite (YAMNet)
  • Location: Google Play Services Location API
  • Local Storage: SharedPreferences / EncryptedSharedPreferences
  • Background Execution: Android Foreground Services & BroadcastReceivers

Getting Started

Prerequisites

  • Android Studio (Jellyfish or newer recommended)
  • Android SDK API Level 34
  • A physical Android device (Sensors and Telephony features are difficult to test thoroughly on an emulator)

Installation

  1. Clone the repository:
    git clone https://github.com/sohampatil01-svg/SHEild.git
  2. Open the project in Android Studio.
  3. Sync the project with Gradle files.
  4. Build and run on your device.

Note on Permissions: On first launch, the app will request several critical permissions (Location, SMS, Microphone, Phone). These are strictly necessary for the core hardware triggers and SOS dispatch to function.

Architecture

SHEild is built with a focus on separating the UI from the background safety logic to ensure the app remains responsive while performing heavy sensor/audio analysis.

  • UI Layer: Manages the dashboard, settings, and the dynamic skinning of the Fake Call screens.
  • Logic Layer: Houses the SosManager, AudioTrigger (TFLite bridge), and kinematic calculations for the ShakeDetector and FallDetector.
  • Services: Utilizes Foreground Services to keep the microphone and location polling alive in the background without being killed by Android Doze mode.

Privacy Note

This app is built with privacy in mind.

  • All audio classification for scream detection happens entirely on-device via TensorFlow Lite. No audio is ever uploaded to a server.
  • SOS messages are sent via standard SMS.
  • The Journey Tracking logs are stored locally on the device's SharedPreferences.

About

SHEild is an offline-first Android safety companion app that empowers women with quick-response tools like SOS alerts, fake call simulation, journey tracking, and shake-trigger activation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages