ntfy icon indicating copy to clipboard operation
ntfy copied to clipboard

Andorid app subscribe to a new topic with intent does not work properly

Open csaszko opened this issue 1 year ago • 2 comments

          https://github.com/binwiederhier/ntfy-android/pull/24/files implements this:
  • ntfy://myhost.lan/mytopic --> subscribes to https://myhost.lan/mytopic (if not already subscribed) and shows it
  • ntfy://myhost.lan/mytopic?secure=false --> subscribes to http://myhost.lan/mytopic (if not already subscribed) and shows it

I think this is all there is to it. All that's missing is documentation for it.

To test:

adb shell am start -W -a android.intent.action.VIEW -d "ntfy://10.0.2.2/abc?secure=false" io.heckel.ntfy

Originally posted by @binwiederhier in https://github.com/binwiederhier/ntfy/issues/20#issuecomment-1095836942

Hi!

First of all, thank you for your work! :)

I am checking ntfy-s functionality and found this issue:

In android app if I add/subscribe manualy (plus button) a new topic , I can get new messages and send test message. But if i do it with (subscibe) intent it creates the topic on the app's list and shows toast message "subcribed to xy chanel" and also loading/downloading "old" messages (I guess it is with the default time limit) , but not receiving any new messages, and do not show subcribed tray icon, if it is the only topic in the list. (Needs to be one with manual adding from app) Restart the app does not change this.

I only tried this with adb shell, but would like to use with intent from my app, so I thing will be the same.

Best regards Gabor

csaszko avatar Apr 04 '23 16:04 csaszko

+one (maybe just question) how can I use in intent different port to 80. For me does not work this way: adb shell am start -W -a android.intent.action.VIEW -d "ntfy://192.168.1.121:99/Test?secure=false" io.heckel.ntfy

":99" part it seems is ignored (still not works the subscribe but shows in the app list without specific port)

csaszko avatar Apr 05 '23 06:04 csaszko

Also would be nice +1

use case is i want to be able to send users topics from a webui and text or email them a subscribe link that goes right to their ntfy app

syonfox avatar Dec 18 '23 14:12 syonfox