Giter Club home page Giter Club logo

Comments (8)

eternal-flame-AD avatar eternal-flame-AD commented on August 16, 2024

Sorry but I can't access the video you have sent, but I think this might be a duplicate of gotify/server#65.

from android.

vaisest avatar vaisest commented on August 16, 2024

I don't think it is a duplicate. I only mean supporting launching a browser when tapping on the notification, and I don't think it requires a separate URL parameter as the URL can be parsed from the message content.

I made a wonky patch for myself: Turtvaiz/android@6d55729

Also, a rehosted video

from android.

eternal-flame-AD avatar eternal-flame-AD commented on August 16, 2024

Okay, I got what you meant, but considering we have decided to implement actionable notifications through the newly added "extra" property in the message model in the future, the new mechanism would be able to resolve this problem, so I don't see the particular need for this. I also don't really like searching through the message content and take whatever looks like a URL and use that link as the default behavior for viewing the notification, as makes software behavior rather unpredictable.

@jmattheis what do you think?

from android.

eternal-flame-AD avatar eternal-flame-AD commented on August 16, 2024

Also, as gotify aims to be both easy to use and understand, please excuse that we usually do not accept feature requests that might in some way confuse other users. However, it is really happy to see that you have came up with your own solution, and we really recommend power users to make modifications to accomodate their own needs.

from android.

jmattheis avatar jmattheis commented on August 16, 2024

I also think that this should be done via an extra property. IMO things should be done explicit.

from android.

mzoeller avatar mzoeller commented on August 16, 2024

Would you accept a pull request where an extra called "client::click" would be interpreted by the android client?

"extras": {
        "client::click": {
            "url": "somescheme://some/link#4"
        }
    }

Or is there a better way/more general way to define actionable things?

from android.

jmattheis avatar jmattheis commented on August 16, 2024

Hey @mzoeller,

sure thing, pull requests are welcome :D.

But let's define the scheme for the extras, so that is extensible and future proof. In gotify/server#151 (comment) we already have web::notification and android::notification, so I'd say we use client::notification for things that can be supported on both android and web ui.

IMO click should be an object, because in the future there may be something like javascriptEval that should be executed on click.

{
  "extras": {
    "client::notification": {
      "click": { 
        "url": "https://gotify.net"
      }
    }
  }
}

from android.

mzoeller avatar mzoeller commented on August 16, 2024

I've submitted a pull request: #91

from android.

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.