Keep Alive Android App

💓 Keep Alive — Your app watchdog!

A simple app to keep specific apps alive by checking if they are running. If not, they will be attempted to start 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.

📚 How to use the app

  1. Launch the app and accept all the required permissions.
  2. Once all permissions are active, you will see 2 options:
    • Configure apps that should be running
    • Configure app settings like interval of checking for app
  3. Add app that you want to be checked periodically
  4. 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.

Limitations 💔

Despite having many needed permissions, this app may still not work due to the strict security of Android.

  • One known issue is related to receiving RECEIVE_BOOT_COMPLETED event that is needed to start the watchdog service of this app. However, the RECEIVE_BOOT_COMPLETED event is not delivered until user unlocks the device after phone is restarted or in case phone got soft-started because of very low memory pressure.
  • In that case, this "Keep Alive" app will fail to start configured apps until the device is unlocked manually.
  • Another known issue is, even though foreground service is running, it does not trigger the periodic checks based on your configured interval. This has been noticed on Samsung Galaxy S23, while on other phones it works. So, there might be some bug or manufacturer or device specific issue. Take a look into "Monitor Activity" to see how checks are doing.

🔐 Sensitive permissions required âš ī¸

Here are the permissions needed for the app along with a summary of why they are needed:

  • 🌐 INTERNET - Required to send logs to an API endpoint and send heartbeat check. Both are optional and configurable in the app.
  • âš™ī¸ FOREGROUND_SERVICE - Allows the app to run a foreground service, which is necessary for the Watchdog Service to monitor other apps and keep them alive by restarting them.
  • 🔄 RECEIVE_BOOT_COMPLETED - Allows the app to receive the BOOT_COMPLETED broadcast, enabling it to start itself and monitor the apps that are configured to keep alive.
  • 🔋 REQUEST_IGNORE_BATTERY_OPTIMIZATIONS - Needed to request the user to exclude the app from battery optimizations, ensuring the app and it's Watchdog Service can run continuously without being restricted by the system.
  • 🔔 POST_NOTIFICATIONS - Allows the app to post notifications, which is essential for notifying users about ongoing watchdog activity.
  • đŸ“Ļ QUERY_ALL_PACKAGES - 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.
  • 📊 PACKAGE_USAGE_STATS - Allows the app to access usage statistics, which is necessary for knowing if specific apps have been recently used.
  • đŸĒŸ SYSTEM_ALERT_WINDOW - 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.

Open Source

This app is open source! You can view the source code, contribute, or learn more about how it works on GitHub.

Banner Image