Keep Alive 💓
A simple app to keep specific apps alive by checking if they are running. If not, they will be started for you.
🛑 STOP 🛑 - Know before you use ✋
This app is designed with a very specific use case in mind. It is important to understand what this app does and how.
- App is designed to be always running in the foreground to watch and restart other applications.
- App is NOT optimized for battery and will cause high battery 🪫 drain. Ideally, this should not be used on your primary phone that you use daily.
- ℹ️ I use this on a secondary phone plugged into a power cable 24/7.
- App contains some additional features like Remote Logging and Heartbeat due to my personal needs. However, the app can be used without using those features.
- See the permission section below to better understand the app.
📚 How to use the app
- Launch the app and accept all the required permissions.
- Once all permission are active, you will see 2 options
- Configure apps that should be running
- Configure app settings like interval of checking for app
- Add app that you want to be checked periodically
- Done ✔️
- This app will always run in the foreground, continuously checking if your selected apps are active. If any are not, it will automatically restart them for you.
🔐 Questionable permissions required ⚠️
Here is the list of permissions needed for the service class (WatchdogService
). [Source: AndroidManifest.xml
]
Here are the permissions needed for the app along with a summary of why they are needed:
-
android.permission.INTERNET
:
- Reason: Required to send logs to an API endpoint and send heartbeat check. Both are optional and configurable in the app.
-
android.permission.FOREGROUND_SERVICE
:
- Reason: Allows the app to run a foreground service, which is necessary for the
WatchdogService
to monitor other apps and keep them alive by restarting them.
-
android.permission.FOREGROUND_SERVICE_SPECIAL_USE
:
- Reason: Required for special use cases of foreground services, as indicated by the
WatchdogService
.
-
android.permission.RECEIVE_BOOT_COMPLETED
:
- Reason: Allows the app to receive the
BOOT_COMPLETED
broadcast, enabling it to start itself and monitor the apps that are configured to keep alive.
-
android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
:
- Reason: Needed to request the user to exclude the app from battery optimizations, ensuring the app and it's
WatchdogService
can run continuously without being restricted by the system.
-
android.permission.POST_NOTIFICATIONS
:
- Reason: Allows the app to post notifications, which is essential for notifying users about ongoing watchdog activity.
-
android.permission.QUERY_ALL_PACKAGES
:
- Reason: Required to query and interact with all installed packages, which is necessary for the app's functionality to monitor and select apps in the app settings.
-
android.permission.PACKAGE_USAGE_STATS
:
- Reason: Allows the app to access usage statistics, which is necessary for knowing if specific apps have been recently used.
-
android.permission.SYSTEM_ALERT_WINDOW
:
- Reason: Required to draw overlays on top of other apps, which is necessary for certain UI elements or notifications that need to be displayed over other apps. And also start other apps from the background service.
Most of the permissions listed above are discouraged and or restricted. Please be sure to use the app with caution.