binwiederhier / ntfy-android Goto Github PK
View Code? Open in Web Editor NEWAndroid app for ntfy.sh
License: Apache License 2.0
Android app for ntfy.sh
License: Apache License 2.0
I will be perfect if that app can display notifications on Android Auto head unit. It is planned?
Thanks!
Android provides a mechanism for marking a service, receiver, or provider to only run on user 0 and for all requests to that service, receiver, or provider to be routed to the one on user 0 rather than within the current user [1].
If ntfy was to take advantage of this, users who segregate their apps between user profiles (as is common with GrapheneOS for example) would be able to still keep one ntfy instance locally and one connection back to the ntfy server rather than requiring one instance per user.
I may be able to eventually try writing up a PR implementing this functionality but it'll likely be a decent while before I do so.
What is the "state of the art" to integrate ntfy in other apps/projects? Copy the mechanism of this app or send somehow a broadcast intent from this app to other apps/project? Is there any example?
By the way: Great work. Exactly what I missed for long time.
<@topcaser:nope.chat> ```
type: crash
osVersion: google/husky/husky:14/UD1A.231105.004/2023112900:user/release-keys
package: io.heckel.ntfy:32
process: io.heckel.ntfy
processUptime: 564 + 308 ms
installer: dev.imranr.obtainiumjava.lang.RuntimeException: Unable to create service io.heckel.ntfy.service.SubscriberService: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service io.heckel.ntfy/.service.SubscriberService
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4681)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2271)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8199)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service io.heckel.ntfy/.service.SubscriberService
at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
at android.os.Parcel.readParcelableInternal(Parcel.java:4890)
at android.os.Parcel.readParcelable(Parcel.java:4872)
at android.os.Parcel.createExceptionOrNull(Parcel.java:3061)
at android.os.Parcel.createException(Parcel.java:3050)
at android.os.Parcel.readException(Parcel.java:3026)
at android.os.Parcel.readException(Parcel.java:2968)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6776)
at android.app.Service.startForeground(Service.java:775)
at io.heckel.ntfy.service.SubscriberService.onCreate(SubscriberService.kt:101)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4668)
... 11 more
this is a clear app bug
Comment Of úkols
Please add therefore a MR here: https://gitlab.com/fdroid/fdroiddata
Phone numbers in messages are not recognized as clickable links in the NTFY app. Users are unable to directly tap on phone numbers to initiate calls. This inconvenience affects the user experience by requiring manual copy-pasting of numbers into the dialer.
Phone numbers within messages should be formatted as clickable links. Tapping on these links should initiate phone calls directly from the NTFY app.
Hi, and thanks for developing Ntfy, it's just great.
I've recently moved my Ntfy instance behind Traefik for automating TLS stuff, adjusted the configuration for Ntfy, and notifications seem to work just as before on the web app. However, when subscribing to the server on the Android app, I get a timeout.
From my phone, and from the Android app, connect to the Ntfy server through Traefik. I get a timeout
error.
- NTFY_AUTH_FILE=/var/lib/auth/auth.db
- NTFY_AUTH_DEFAULT_ACCESS=read-only
- NTFY_CACHE_FILE=/var/cache/ntfy/cache.db
- NTFY_BASE_URL=https://{{ domain }}
- NTFY_BEHIND_PROXY=true
- NTFY_UPSTREAM_BASE_URL=https://ntfy.sh
This is a log of the ntfy Android app. The log shows up to 1,000 entries.
Device info:
--
ntfy: 1.16.0 (fdroid)
OS: 4.9.292-ga72d58f85040
Android: 12 (SDK 32)
Model: sargo
Product: sargo
--
Settings:
{
"autoDeleteSeconds": 2592000,
"autoDownloadMaxSize": 1048576,
"broadcastEnabled": true,
"connectionProtocol": "jsonhttp",
"darkMode": -1,
"defaultBaseUrl": "",
"lastSharedTopics": [],
"minPriority": 1,
"mutedUntil": 0,
"recordLogs": true
}
Logs
--
1716303690986 2024-05-21 17:01:30.986 D NtfyLog Enabled log recording
1716303696744 2024-05-21 17:01:36.744 D NtfyMainActivity Create io.heckel.ntfy.ui.MainActivity@102528
1716303696747 2024-05-21 17:01:36.747 D NtfyMainActivity Poll worker version matches: choosing KEEP as existing work policy
1716303696747 2024-05-21 17:01:36.747 D NtfyMainActivity Poll worker: Scheduling period work every 60 minutes
1716303696747 2024-05-21 17:01:36.747 D NtfyMainActivity ServiceStartWorker version matches: choosing KEEP as existing work policy
1716303696747 2024-05-21 17:01:36.747 D NtfyMainActivity ServiceStartWorker: Scheduling period work every 180 minutes
1716303696748 2024-05-21 17:01:36.748 D NtfyMainActivity Delete worker version matches: choosing KEEP as existing work policy
1716303696748 2024-05-21 17:01:36.748 D NtfyMainActivity Delete worker: Scheduling period work every 480 minutes
1716303696751 2024-05-21 17:01:36.751 D NtfyMainActivity Battery: ignoring optimizations = true (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false
1716303696780 2024-05-21 17:01:36.780 D NtfySubscriberMgr Enqueuing work to refresh subscriber service
1716303696782 2024-05-21 17:01:36.782 D NtfyMainActivity Battery: ignoring optimizations = true (we want this to be true); instant subscriptions = false; remind time reached = true; banner = false
1716303696787 2024-05-21 17:01:36.787 D NtfyMainActivity Checking global and subscription-specific 'muted until' timestamp
1716303707155 2024-05-21 17:01:47.155 D NtfyApiService Checking anonymous read against https://<MYSERVER>/<TOPIC>
1716303722159 2024-05-21 17:02:02.159 W NtfyAddFragment Connection to topic failed: timeout
Exception:
java.io.InterruptedIOException: timeout
at okhttp3.internal.connection.RealCall.timeoutExit(RealCall.kt:398)
at okhttp3.internal.connection.RealCall.callDone(RealCall.kt:360)
at okhttp3.internal.connection.RealCall.noMoreExchanges$okhttp(RealCall.kt:325)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:209)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at io.heckel.ntfy.msg.ApiService.checkAuth(ApiService.kt:156)
at io.heckel.ntfy.ui.AddFragment$checkReadAndMaybeShowLogin$1.invokeSuspend(AddFragment.kt:209)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.io.IOException: Canceled
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:72)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
... 11 more
1716303726092 2024-05-21 17:02:06.092 D NtfyMainActivity Checking global and subscription-specific 'muted until' timestamp
1716303727717 2024-05-21 17:02:07.717 D NtfySettingsActivity Create io.heckel.ntfy.ui.SettingsActivity@a09e9e4
thanks.
Please open issues in the main issue tracker, thank you: https://github.com/binwiederhier/ntfy/issues
I wanted to mute some channels, so i used the "subscription-settings" on the channel. There, enabling "custom notification settings" allows me to navigate to android's notification channels. However, there are two identical channels with the name of the newly configured custom channel. It should not change.
adding future to to wake up exited or non-running in background applications subscribed in unified push to wake up and show the notification
Hi, is it not possible to publish from Android app?
If this is a missing feature I'll probably just use webapp on phone as well.
Are you aware of https://gitlab.com/fdroid/fdroiddata/-/merge_requests/13948?
I always have my phone on do not disturb mode. I would like Max Priority Notifications to bypass this mode, so I can receive sound notifications all the time :).
I know it's possible on android, and I'm wondering whether you have plans to add a support for it.
Hi, I would like to suggest not only to support local stored images to illustrate the channels, but also to support picking an emoji. The emojisets usually contain a lot of icons to underline the channel's intention and are optimized to be easy to recognize across different cultures etc. and support a lot of different aspects to illustrate the channels intent 🙂
Normally when receiving notifications the app listens from ntfy.sh.
This feature however focuses that when the notifier sends a POST/PUT HTTP request to the devices local IP address (with respect to the port) the app process the request.
Requesting support to show webp images in the notifications.
Currently it's not shown embeded in the notification.
I've seen there is a mime type check for jpg/png in a util class. I already added "image/webp" on a local build and all is working fine. I'll prepare a PR asap.
'java.security.cert.CertPathValidatorException: Trust anchor for certification path not found' produced in Android app when attempting to subscribe to self-hosted docker instance using SSL. HTTP subscription using Android app, and browser based HTTP and HTTPS work without issue.
Thanks for all your work on NTFY, I find it really useful to send notifications from my server to my phone.
One feature I'd really like is to be able to set an expected update frequency for a subscribed topic, then have the app give a notification if it hasn't seen any new messages in longer than expected.
For example, I have a topic called "docker-updates". Once a week my server refreshes it's docker containers and posts the result to that topic. I'd like to tell the app to expect a messages in that topic every 7 days, and if it doesn't see any, let me know so I can investigate.
Would such a feature be possible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.