English Version | 🇪🇸 Versión en Español
KitKat Camera RTSP is an application and Watchdog service designed to repurpose legacy tablets and devices running Android 4.4 KitKat (API 19) (with or without Root privileges) as dedicated RTSP security video monitors using VLC (org.videolan.vlc).
💡 VLC Compatibility & Clean Relaunch: Tested and optimized specifically for VLC version 2.0.6 on Android 4.4 KitKat. Whenever the Watchdog detects a network drop, video freeze, or player closure, it terminates stale background processes and launches VLC in a 100% fresh session, ensuring live video playback resumes automatically and seamlessly without requiring manual play interaction.
-
Control Panel with Dynamic Parameters:
- Target RTSP URL configuration.
- Network caching (ms) adjustment.
- Toggle to Force RTSP over TCP.
- Target player package and activity settings (
org.videolan.vlc). - Persistent storage in local database (
SharedPreferences).
-
Watchdog Service:
- Asynchronous background monitoring loop on a worker thread (
ScheduledExecutorService) to prevent UI freezes / ANRs. - Checks real-time foreground screen activity (
VideoPlayerActivity). - If a stream stall or exit is detected, it terminates stale processes and automatically resumes live playback.
- Asynchronous background monitoring loop on a worker thread (
-
Configurable Check Interval:
- Customizable watchdog scan frequency setting in seconds (default 7s).
-
Persistent & Interactive Notification:
- Runs a
Foreground Serviceon Android 4.4. - Features direct action buttons backed by a
BroadcastReceiver:- ⏯ Pause/Resume Watchdog: Toggles monitoring without stopping the service or mutating your preference checkboxes.
- ✖ Stop Service: Immediately stops the service and frees system memory.
- Runs a
-
Autostart on Boot (Boot Receiver):
- Listens to
android.intent.action.BOOT_COMPLETED. - On device boot, the app starts automatically in the background and opens the camera stream if Autostart is enabled.
- Listens to
-
Root Privileges Support (
su 0):- Queries Linux kernel process table (
su 0 ps) and forces process termination (am force-stop) for hardware fallback.
- Queries Linux kernel process table (
-
1x1 Desktop Widget (AppWidget):
- 1-tap quick launcher icon for the Android 4.4 home screen.
Built in pure native Java for API 19 (Android 4.4):
MainActivity.java: Interactive panel with multi-language localization (Spanish / English) and real-time status updates.CameraWatchdogService.java: Main asynchronous background service (ScheduledExecutorService).NotificationActionReceiver.java: BroadcastReceiver for status bar notification action buttons.IntentHelper.java: Dynamic RTSP Intent builder featuring task clearing (CLEAR_TASK), live playback parameters (from_start), and process cleanup (killBackgroundProcesses).RootShell.java: Root console execution module (su 0).BootReceiver.java: System boot event receiver.CameraWidgetProvider.java: 1x1 Home Screen widget provider.
./gradlew assembleDebug --no-daemonThe resulting APK installer will be located at: app/build/outputs/apk/debug/app-debug.apk.
This project is licensed under the MIT License.
Creator & Author: Luis Alvarez (@luisfalvarez-sh).