-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android app that reads from a file and has a persistent notification #4
Comments
could probably just do this with from what Im reading online doesnt seem to use that much battery, but will test and see how it fairs |
In fact, can probably optimize this quite a bit to only run when it needs to. By syncing the resulting reminder file using file sync (syncthing or something else), can check when I open my terminal if its been modified in the last 15 minutes (can set the interval to cache it on my computer to 5 minutes) If it hasnt been modified, that means my phone isnt able to sync with my laptop, so Im probably out/not on wifi, so should launch can probably also just ignore sync-conflicts, deleting the files since this is just a cachefile thats generated |
seems like Id probably want to use https://developer.android.com/reference/android/app/Notification.Builder.html#setOngoing(boolean) https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_LOW and then use a service which gets triggered by alarm manager: |
reminder that Id need to run
900000 is the min allowed time (15m), job-id is to make sure we only have one ever running, just pick some arbitrary number |
reads from a cache file that a job writes to on computer/phone
could use tasker/termux to write every so often on my phone, incase computer is offline
displays all the items that have expired as a persistent notification on android
https://developer.android.com/develop/ui/views/notifications/channels
The text was updated successfully, but these errors were encountered: