SparkleServer Hub

Mobile App Project

ShakeLight

A Flutter + native Android app that keeps a foreground sensor service alive, detects shakes while the phone is locked, and toggles the flashlight.

Build / Run

flutter pub get
flutter run

Repository includes Android platform code under android/.

Lock-Screen Setup

  1. Request camera and notification permissions.
  2. Enable ShakeLight to start foreground service.
  3. Ignore battery optimizations for reliability.
  4. Lock phone and shake to toggle torch.

Core Controls

  • Sensitivity: higher values require harder shakes.
  • Cooldown: minimum milliseconds between toggles.
  • Start on boot: restarts service on BOOT_COMPLETED.

Battery and OEM Notes

Some OEM Android variants can stop background services aggressively. README guidance recommends disabling battery optimization, adding the app to auto-start/background whitelist, and keeping notification visibility enabled on Android 13+.