Uptime Alarm serves as a reminder for system uptime. You may power off your phone weekly, and yet often forget about it. This app can aid you.
The app is published on Google Play. It works on Android Marshmallow and newer.
https://play.google.com/store/apps/details?id=com.gmail.leewkb1307.uptimealarm
The source code, an Android Studio project, is uploaded to a GitHub repo.
The launched app will land in the main screen, which contains the entities as shown in the figure.
Current uptime in hours
Alarm time
Time edit button
Alarm enable switch
Click the edit button for alarm time input dialog.
Set the target uptime in hours and click the OK button.
Click the enable switch to enable the alarm.
For Android 13 and newer, the app requires user permission to post notifications.
When the alarm is enabled, the setup is done.
When the uptime reached the alarm time, the app posts a notification.
The app does not use an exact alarm in Android API. The system resource overhead is minimized at the expense of alarm time accuracy. The alarm will set off later. In some occasions, the alarm was delayed 45 minutes.
Click the notification to bring up the main screen. The app will show a dialog.
The app saves the main screen input in user preference. When Android is powered on, the app will start an alarm using the user preference. The user does not need to configure the alarm again.
The app allows setting an alarm time less than the current uptime. Android should show a notification soon after the alarm is started. Though the alarm delay is inevitable, and patience is required.
Once the alarm is setup, the user may not run the app for months. Android 11 and newer may remove the app permissions. This mechanism unfortunately breaks the app functionality. To prevent the problem, disable the 'Manage app if unused' option in the app info page.
For Android Oreo and newer, the app creates a notification channel called 'Alarm'. Please do not disable the channel because the app does not check the setting option. You will not get alarm notification.
When the user repeatedly denies granting runtime permission, Android may inform the app that the permission will never be granted. The app will not start the alarm under this condition.
Instead of uninstalling the app, the user may clear the user data. It should reset the app to a fresh install state.