Giter Site home page Giter Site logo

Comments (13)

binwiederhier avatar binwiederhier commented on May 4, 2024 1

I wrote a whole long paragraph about why that's difficult and then I read your comment again. You just want a Share button that prints two links, one of which will open the app?

I don't know if Android will highlight and let you click ntfy:// links, probably not, but it's worth a try definitely.

And we'd still need a solution for the web UI.

from ntfy.

12nick12 avatar 12nick12 commented on May 4, 2024 1

I'm not a dev, but going from what has been spoken in the issue and my limited knowledge of stuff, you could just add a ntfy: link in the web page if you can get ntfy app to open ntfy: links. Kind of link how tel: opens the dialer and mailto: opens email.

from ntfy.

12nick12 avatar 12nick12 commented on May 4, 2024 1

You could word something like "if you have the app installed hit THIS link"

from ntfy.

binwiederhier avatar binwiederhier commented on May 4, 2024 1

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

from ntfy.

binwiederhier avatar binwiederhier commented on May 4, 2024

I like this idea. And it should not be hard to implement.

from ntfy.

binwiederhier avatar binwiederhier commented on May 4, 2024

Re-opening this, since I removed the feature in the latest commit. Android is not allowing me to register reg-ex patterns of URLs and the wildcard stuff seems incredibly buggy. I spent two+ hours with it yesterday and it's not worth it for now.

from ntfy.

gc-ss avatar gc-ss commented on May 4, 2024

Let's simplify it first?

  1. Instead of handling http(s) links, let the app respond to ntfy links and the app registers to handle ntfy links
  2. Have a little text template that spits out the http(s) links and the ntfy link to send to people (instead of just http(s) link)

Is this a possibility?

from ntfy.

gc-ss avatar gc-ss commented on May 4, 2024

I wrote a whole long paragraph about why that's difficult and then I read your comment again

Philipp, then I did a poor job of conveying my intention. In case you happen to have that paragraph, I would really appreciate reading it. If it's gone, can you just type in the highlights so I can figure out what disconnect existed (before you read my comment again)?

You just want a Share button that prints two links, one of which will open the app?

Right. My thought is that the app can register itself with ntfy:// links and have greater control

And we'd still need a solution for the web UI.

I believe we can still use ntfy:// links or something similar (the client app can register itself with ntfy:// links)

from ntfy.

binwiederhier avatar binwiederhier commented on May 4, 2024

That would be easy to do, but then it looks horribly broken for people that don't have the app installed.

from ntfy.

jhotmann avatar jhotmann commented on May 4, 2024

For me, having the app able to handle ntfy:// links would be enough as I mainly just want to be able to open the app to a specific topic via Tasker. But having a ntfy:// link show up if you open a topic in a mobile browser could also be handy.

I wrote a custom Owntracks server implementation and part of it includes device configuration generation. It creates an owntracks:// links with the configuration data base64 encoded and is clickable from the Android and iOS browsers. The links aren't highlighted/clickable in messaging and other apps, though.

from ntfy.

binwiederhier avatar binwiederhier commented on May 4, 2024

Sorry I never responded to this. This sounds easy enough. I should be able to whip that up at some point. There are just so many tickets :-D

from ntfy.

binwiederhier avatar binwiederhier commented on May 4, 2024

(I'm starting work on this)

So if I implement ntfy://ntfy.sh/mytopic that opens the topic in the Android app and subscribes to it, that would be enough?

I wonder if I should structure the link differently, so that other actions are supported in the future, like ntfy://ntfy.sh/mytopic?action=subscribe, or ntfy://subscribe/ntfy.sh/mytopic, ...

I suppose I could iterate on it, so I think I'll just start with ntfy://ntfy.sh/mytopic.

from ntfy.

binwiederhier avatar binwiederhier commented on May 4, 2024

Done. Will be in the next Android release. Added docs too, which will be in the next server release:

220412 20-09-42 Selection 001

from ntfy.

Related Issues (20)

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.