Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actionable notifications #119

Open
webworxshop opened this issue Jan 23, 2019 · 2 comments

Comments

2 participants
@webworxshop
Copy link

commented Jan 23, 2019

This looks like a really cool project and something I've been looking for for a while.

Please correct me if I'm wrong on this but from the documentation it doesn't look like you support actionable notifications i.e. notifications containing one or two buttons underneath which perform the respective action when clicked.

An example use case of this is that my home automation system may send a notification telling me that I left my garage door open and provide a button to close the door.

I think the simplest/most flexible way to implement the action part would be via a webhook, so the sending application would need to specify both the label text and a callback URL for when the action is clicked.

Thanks again for the great project.

@jmattheis

This comment has been minimized.

Copy link
Member

commented Jan 24, 2019

Hey @webworxshop,

you're right, something like this doesn't exist. Currently links should already be clickable in the android app, so you could just add plain links to the message.

This could partly be fixed with adding markdown support to messages (#65 (comment)) then it would be possible to add links with labels to the message.

Do you think this is enough for your usecase?

@jmattheis jmattheis added the question label Jan 24, 2019

@webworxshop

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

Hi @jmattheis,

Thanks for your reply. Yes, having markdown support in messages, plus clickable links would give a mostly workable solution, but I foresee a couple of problems:

  1. Links in the text are likely to be less user friendly to users already familiar with the action buttons used in Android notifications
  2. Clicking the link would presumably open the URL in the default web browser. If the URL is a webhook to an existing system then either the user will see a blank page or (worse) a JSON response from the server. In either case they need to close the page to go back to what they were doing. Also, clicking the link would not dismiss the notification, which an action button would typically do.

For reference, I'm basically looking for something to replace the HTML5 Push Notifications in Home Assistant (https://www.home-assistant.io/components/notify.html5/), but without the dependency on Google Cloud Messaging.

Thanks again for getting back to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.