LastMessage is an offline, privacy-first "Dead Man's Switch" mobile application built for Android with full bilingual support (Deutsch π©πͺ / English π¬π§). It periodically monitors user check-in confirmations ("I am alive"). If the user fails to check in within the configured countdown timer interval (12h, 24h, 48h, 72h, 7 days), the application autonomously triggers emergency dispatch via native SMS and/or TLS encrypted SMTP Email with image attachments, GPS Google Maps links, and voice audio notes β completely without relying on proprietary cloud services or external backends.
-
π Bilingual Language Switcher (Deutsch π©πͺ / English π¬π§):
Easily switch the entire application UI (labels, status badges, diagnostic advice, toast messages) between German and English in the settings screen. -
ποΈ Biometric & Hardware Fingerprint Lock (Android BiometricPrompt):
Optionally secure the application startup, settings, and check-in with native hardware biometric authentication (Fingerprint, FaceID) or regular PIN code. Easily toggleable on or off in settings. -
π¨ Duress / Panic PIN (NΓΆtigungs-PIN):
If forced by an attacker to unlock the app or cancel the timer, enter your secret Panic PIN. The application visually feigns a successful unlock and check-in, but secretly triggers an immediate emergency SMS & Email dispatch in the background! Features built-in debouncing protection. -
β³ Configurable Safety Grace Period (Gnadenfrist):
When the main countdown timer expires, emergency alerts are not sent immediately. You get an additional grace buffer period (0h, 1h, 3h, 6h, 12h, 24h) with hourly push warning notifications to check in or cancel. -
π Automatic GPS Location & Google Maps Link:
When enabled, the app automatically retrieves live GPS coordinates in the background during check-in or emergency dispatch, appending a direct Google Maps link (https://maps.google.com/?q=lat,lng) to emergency SMS & Email text. Includes offline location history fallback. -
ποΈ Voice Audio Note Attachments:
Record or select a voice audio message (.m4a/.mp3), which is automatically attached as an audio file in emergency emails. -
π· Emergency Photo Attachments with Thumbnail Previews:
Attach photos from your device gallery (ID cards, medical notes, emergency documents, location maps). Photos are stored securely in private app storage with preview thumbnails in settings. -
π₯ Auto-Delete Sensitive Data After Dispatch:
When enabled, the app automatically purges all photo attachment files, voice notes, and sensitive message body text from local device storage immediately after successful emergency dispatch. -
π Configurable Burst Repeats & Pause Delays:
Customize how many times emergency messages are dispatched (1x, 2x, 3x, 5x) and specify delay pauses between messages (0s, 5s, 10s, 30s, 60s). -
π© Multi-Channel Autonomous Emergency Dispatch:
- Primary SMS Dispatch: Native
SmsManagermultipart SMS dispatch (SEND_SMSpermission). - Secondary TLS SMTP Email: Jakarta Mail TLS client supporting custom SMTP servers (Gmail, GMX, WEB.DE, Outlook presets).
- Interactive Live Testing: Test SMS and Email connections directly in settings with human-friendly diagnostic error guides.
- Primary SMS Dispatch: Native
-
π‘οΈ Dual Redundancy & Self-Hosted Companion Server:
- Boot Recovery & Low Battery Guardian: Listens for
ACTION_BOOT_COMPLETED/ACTION_POWER_CONNECTEDand dispatches immediately upon boot if the timer expired while off. Alerts when battery drops below 15%. - Raspberry Pi / Docker Watchdog Server: Open-source Python/Docker server (
server/watchdog_server.py) that dispatches emergency emails if your phone stays destroyed or offline.
- Boot Recovery & Low Battery Guardian: Listens for
The following features and enhancements are planned for upcoming releases (Version 0.2+):
- π² Android Home-Screen Widget (2x2 / 4x1):
Interactive home-screen widget displaying real-time live countdown progress and a large 1-tap "ICH BIN NOCH DA / I AM ALIVE" check-in button so users don't even need to open the main app. - β Wear OS / Smartwatch Companion App:
Perform 1-click check-ins directly from your wrist via a Wear OS companion app and tile notification. - π Lock Screen & Quick Settings Tile:
Android Quick Settings tile button in the status bar shade for instantaneous timer resets with zero friction.
- π Do-Not-Disturb (DND) Volume Bypass Siren:
When the grace period enters critical time (<1 hour remaining), the app can trigger an audible warning alarm siren that overrides silent / Do Not Disturb mode. - π Interactive Push Notifications with Direct Action Buttons:
Check in directly from the system notification shade by tapping[ β I AM ALIVE ]without launching the app UI.
- π¬ Telegram / WhatsApp / Signal Messenger Bots:
Integrate bot webhooks to dispatch emergency alerts directly to private messaging channels or family groups alongside SMS & Email. - π Multi-Server Watchdog Redundancy:
Support multiple fallback watchdog server URLs (e.g. Home Raspberry Pi AND an off-site cloud VPS fallback) in case of home power outages.
- β‘ Automatic Check-in Triggers (Optional):
- Home Wi-Fi: Auto check-in when connecting to your home Wi-Fi network.
- Charging Cable: Auto check-in when plugging the phone in to charge at night.
- Step Counter / Motion: Auto timer reset when daily step count exceeds 1,000 steps.
- π₯ Multi-Profile Emergency Recipients:
Create distinct emergency profiles (e.g. "Family", "Workplace", "Missing Person") with custom recipient lists and tailored message body templates.
- π¨ Glassmorphic UI Animations & Themes:
Enhanced micro-animations, customizable dark/light themes, custom typography, and dynamic visual countdown meters.
- π§ͺ Automated Testing & Edge-Case Coverage:
Continuous integration testing, battery consumption optimization, memory leak prevention, and automated unit test suite expansions.
LastMessage/
βββ app/ # Android Mobile Application (Kotlin 2.0 + Jetpack Compose)
β βββ src/main/java/com/dms/app/
β β βββ data/local/ # SQLCipher SQLite Helper & KeyStoreManager (AES-256 GCM)
β β βββ domain/ # Data Models, Interfaces & Core Use Cases
β β βββ services/
β β β βββ dispatch/ # Native SmsManager & Jakarta Mail TLS SmtpMailer
β β β βββ location/ # Automatic GPS Location Provider
β β β βββ notifications/ # AlarmManager & NotificationCompat Scheduler
β β β βββ receivers/ # BootReceiver (Startup Recovery) & BatteryReceiver
β β β βββ security/ # BiometricAuthHelper (Hardware BiometricPrompt)
β β β βββ storage/ # Encrypted Storage Service Implementation
β β β βββ timer/ # Pure Countdown Calculation Engine
β β β βββ watchdog/ # HTTP Web-Ping Watchdog Service
β β βββ ui/ # Jetpack Compose UI Screens & ViewModels
β βββ build.gradle.kts # Android Application Build Configuration
βββ server/ # Self-Hosted Companion Watchdog Server
β βββ watchdog_server.py # Zero-dependency Python 3 Watchdog Server
β βββ docker-compose.yml # 1-Click Docker Deployment Specification
β βββ README.md # Server Deployment Setup Guide
βββ build.gradle.kts # Root Gradle Project Specification
- Language & Framework: Kotlin 2.0.0, Jetpack Compose, Kotlin Coroutines, StateFlow
- Biometrics & Security:
androidx.biometric:biometric:1.1.0, Android KeyStore AES-256 GCM, SQLite - Mail & Telephony: Jakarta Mail 2.0 (TLS 1.2/1.3), Native Android
SmsManager - Location & Media: Android
LocationManagerGPS Provider,MediaRecorderAudio Notes - Build System: Gradle 8.10.2, Android Gradle Plugin 8.7.2
- Android Studio Ladybug (2024.2+) or JDK 17+
- Android SDK API Level 34 (Android 14)
Clone the repository and run Gradle from PowerShell or Terminal:
git clone https://github.com/StrikerLUL/LastMessage.git
cd LastMessage
# Build the Debug APK
./gradlew assembleDebugThe compiled APK will be generated at:
app/build/outputs/apk/debug/app-debug.apk
Ensure USB Debugging is enabled on your phone, then run:
./gradlew installDebugStandard Gmail account passwords do not work for third-party SMTP clients due to Google 2FA security policies.
To use Gmail:
- Visit myaccount.google.com/apppasswords in your browser.
- Select App: Mail and click Generate.
- Copy the 16-character code (e.g.
abcd efgh ijkl mnop). - In LastMessage Settings:
- SMTP Server:
smtp.gmail.com - Port:
587 - Username: Your full Gmail address
- Password: Paste the 16-character App Password (without spaces)
- SMTP Server:
- Tap
π§ E-MAIL VERBINDUNG JETZT TESTEN / TEST EMAIL CONNECTION NOWto verify connection.
- Log in to GMX or WEB.DE via desktop web browser.
- Go to Settings -> POP3 / SMTP Access.
- Enable "Allow POP3 and SMTP access for external programs".
- In LastMessage Settings, select the GMX or WEB.DE preset button.
If you want absolute guarantee that emergency emails are dispatched even if your phone is completely destroyed, lost, or dead without battery forever, you can host the companion watchdog server on a Raspberry Pi, VPS, or home server.
Navigate to the server/ directory:
cd serverEdit docker-compose.yml to specify your SMTP credentials and emergency contact:
version: '3.8'
services:
lastmessage-watchdog:
image: python:3.11-slim
container_name: lastmessage_watchdog
restart: always
ports:
- "8080:8080"
volumes:
- ./:/app
working_dir: /app
command: python3 watchdog_server.py
environment:
- WATCHDOG_PORT=8080
- TIMEOUT_MINUTES=1440
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- SMTP_USER=your_email@gmail.com
- SMTP_PASS=your_app_password
- EMERGENCY_RECIPIENT=emergency_contact@example.comStart the container:
docker-compose up -d- No Remote Telemetry: LastMessage contains zero analytics, tracking scripts, or ad networks.
- Local Storage Encryption: All credentials and recipient details are stored using Android KeyStore master keys.
- Open Source: Full source code for both the Android app and the self-hosted companion server is completely open for audit and inspection.
Distributed under the MIT License. See LICENSE for details.