Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fall Guard

Fall Guard is a lightweight Wear OS app that tries to detect when a watch slips off the wrist, falls, or is left behind. When a fall is confirmed, it raises a local alarm with a high-pitched siren, vibration, a red alarm screen, and an alarm notification.

The app does not use the vendor SOS flow, does not start the Mobvoi SOS app, and does not call emergency services.

Current Status

Fall Guard is an experimental personal safety and loss-prevention tool. It was developed and tested primarily on a TicWatch Pro 5 Enduro running Wear OS 4.

It should also be able to run on other Wear OS 3.x+ watches if the required Android sensors are available, but reliability depends heavily on the device firmware, sensor behavior, lock screen policy, and background activity restrictions.

How It Works

Fall Guard runs a foreground service. The service avoids keeping the accelerometer active all the time. Instead, it listens for cheaper wake-up signals and opens a short accelerometer detection window only when something suspicious happens.

Candidate sources:

  • off-wrist: the watch reports that it is no longer worn.
  • significant motion: Android reports a notable movement event.
  • motion detect: Android motion sensor source; this may cost more battery on some watches.
  • Mobvoi fall: Mobvoi-specific fall sensor, when available.
  • Mobvoi raw fall: lower-level Mobvoi fall signal, when available.
  • phone disconnect: Bluetooth connection to the phone is lost.

During the detection window, Fall Guard reads accelerometer samples and tracks the peak acceleration in G. A fall is confirmed when the measured impact exceeds the configured G threshold or when selected combined signals indicate a likely fall/loss event.

The alarm effects are started by the foreground service itself, so sound and vibration do not depend entirely on the alarm activity being allowed to open. This matters on Wear OS because background activity starts can be delayed or blocked when the watch is off-wrist, locked, or in AOD.

Main Screen

The main screen is intentionally compact and status-oriented.

Typical fields:

  • service: armed: background detection is running.
  • service: disarmed: detection is stopped.
  • service: candidate: a suspicious event opened a detection window.
  • service: detected: a fall/loss event was confirmed.
  • last: none: no trigger has been recorded yet.
  • wrist: on / wrist: off: latest off-body sensor state.
  • g: ...: current or recent acceleration reading.
  • battery opt: exempt: Android battery optimization exemption is granted.
  • battery opt: needed: exemption should be requested.

Main actions:

  • Arm service: start the foreground detector.
  • Disarm service: stop the detector.
  • Battery exemption: request Android battery optimization exemption.
  • Detection settings: open detection tuning.
  • Test screen: open the alarm screen manually.
  • About: app info and debug/status notification options.

Detection Settings

Detection settings are designed to avoid manual threshold tables and obscure calibration.

Important controls:

  • Impact threshold: minimum G value required to trigger an alarm.
  • Detection window: how long the accelerometer is sampled after a candidate source fires.
  • Cooldown: delay before another alarm can be raised.
  • Low battery threshold: disables vibration below the configured battery level and reduces screen brightness.
  • Source toggles: enable or disable each candidate source independently.
  • Debug mode: disables siren and vibration while keeping the visual alarm path available for testing.

Debug mode also tints the main screen dark red so it is hard to forget before going outside.

Alarm Behavior

On confirmed detection, Fall Guard:

  • starts the siren from the foreground service;
  • starts vibration unless debug mode or low battery policy disables it;
  • attempts to show the red alarm activity over the lock screen;
  • posts an alarm notification with a stop action;
  • uses an alarm-style launch path as a fallback where supported.

Wear OS can still restrict visual surfaces in some locked or off-wrist states. For this reason, the service-side siren and vibration are the most important reliability path.

Battery Model

The intended power model is:

  1. Keep a foreground service alive.
  2. Listen to low-power wake-up sensors and system signals.
  3. Enable the accelerometer only for short detection windows.
  4. Stop accelerometer sampling after the window expires.
  5. Avoid heavy sources unless explicitly enabled.

For best battery life:

  • keep motion detect disabled unless needed;
  • keep Mobvoi raw fall disabled unless it proves useful on your watch;
  • use the shortest detection window that still catches real drops;
  • use a non-zero cooldown during normal use;
  • grant battery optimization exemption.

Compatibility

Minimum Android API: 30.

That corresponds to Wear OS 3.x and newer. The project currently targets SDK 25 intentionally to keep older Wear OS background behavior as permissive as possible during testing.

Required:

  • Wear OS watch;
  • accelerometer;
  • foreground service support.

Optional:

  • off-body sensor;
  • significant motion sensor;
  • motion detect sensor;
  • Mobvoi-specific fall sensors;
  • Bluetooth connection state.

Build

Open the project in Android Studio or build from PowerShell:

$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "C:\android_sdk"
.\gradlew.bat :app:assembleDebug

This repository does not commit local SDK paths, Gradle caches, generated build outputs, or APK artifacts.

Useful ADB Checks

Check the service:

adb shell dumpsys activity services dev.blackfire.fallguard

Check available sensors:

adb shell dumpsys sensorservice

Inspect app logs:

adb logcat | findstr FallGuard

Siren Lab

The fall_guard_siren_lab folder contains a small Python tool for previewing the siren sweep on a PC before integrating values into the Android service.

Safety Notes

Fall Guard is not a certified safety device. It can miss real falls, produce false alarms, or be limited by Wear OS power and lock screen policy. It should be treated as an experimental local alarm for finding a dropped watch, not as an emergency response system.

Author

by BlackFire

About

Lightweight Wear OS fall and watch-loss alarm

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages