Git Product home page Git Product logo

ntfy-android's Issues

Android Auto (not an issue)

I will be perfect if that app can display notifications on Android Auto head unit. It is planned?
Thanks!

[Feature Request] Support multi-user awareness

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.

  1. https://source.android.com/docs/devices/admin/multiuser-apps

Question (not bug)

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.

crash ohf ntfy under grapheneos

<@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.obtainium

java.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

Ukol1

Comment Of úkols

Phone Numbers Not Clickable for Direct Calling in NTFY App in message

Description:

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.

Expected Behavior:

Phone numbers within messages should be formatted as clickable links. Tapping on these links should initiate phone calls directly from the NTFY app.

Timeout on topic subscription (self hosted behind Traefik)

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.

What works

  1. From my phone, open the web app on my domain name, which though Traefik redirects to the Ntfy server. Things work.
  2. From my phone, and from the Android app, connect directly to the Ntfy server (bypassing Traefik, using a different port opened by Docker). Things work.

What does not work

From my phone, and from the Android app, connect to the Ntfy server through Traefik. I get a timeout error.

My configuration

      - 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

The Android app's logs

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.

"Default" Notification Channel uses wrong name when overridden

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.

Publish 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.

Allow notifications to bypass Do Not Disturb Mode

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.

Support emojis as channel icons

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 🙂

  • 🏡 smarthome
  • 🧯 security
  • 🥼 lab
  • ....

[Feature request] receive notification in intranet

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.

Add webp support

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.

Markdown does not display correctly

In the browser, I can see that markdown displays correctly. In the app (version 1.16.0), it displays the raw, unformatted text.

Browser example:
image

App example:
Screenshot_20240411-112213
Screenshot_20240411-112246

Android App - CertPathValidatorException

'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.

Feature request: Alert when a topic is silent

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.