mirror of
https://github.com/binwiederhier/ntfy-android.git
synced 2024-06-13 16:14:34 +12:00
e74565a6d6
When an intent is sent off after a notification event is received, the receiver may not obtain their own wakelock. In that event, despite the near-instant delivery of a push notification, the event receiver may yet still need to wait for the phone to wake again in order to actually act on the notification. In this patch, we employ the existing NOTIFICATION_RECEIVED_WAKELOCK_TIMEOUT_MILLIS value that controls the length of time the wakelock is held before expiring. Normally, this would never occur, instead the lock is released at the end of our processing of the event. However, when we release it, the receiving applications lose their ability to act before the device is accidentally woken for some other reason. Instead, we set this timeout to a more reasonable value of 3 seconds, and do NOT release it ourselves. This means that the receiving applications have around 3 seconds to act before the wakelock expires. This is less than ideal: the receiving applications should know whether or not their response deserves a wakelock, and they should themselves get and hold it until they are satisfied. However, this works around buggy AOSP versions and applications that do not implement this more ideal behavior. Signed-off-by: Antonio Russo <aerusso@aerusso.net> |
||
---|---|---|
app | ||
assets | ||
fastlane/metadata/android | ||
gradle/wrapper | ||
.gitignore | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
README.md | ||
settings.gradle | ||
TESTING.md |
ntfy Android App
This is the Android app for ntfy (ntfy.sh). You can find the app in F-Droid or the Play Store, or as .apk files on the releases page.
Build
For up-to-date building instructions, please see the official docs.
Translations
We're using Weblate to translate the ntfy Android app. We'd love your participation.
License
Made with ❤️ by Philipp C. Heckel, distributed under the Apache License 2.0.
Thank you to these fantastic resources:
- RecyclerViewKotlin (Apache 2.0)
- Just another Hacker News Android client (MIT)
- Android Room with a View (Apache 2.0)
- Firebase Messaging Example (Apache 2.0)
- Designing a logo with Inkscape
- Foreground service
- github/gemoji (MIT) for as data source for an up-to-date emoji.json file
- emoji-java (MIT) has been stripped and inlined to use the emoji.json file