rootkiwi / an2linuxserver

Sync Android notifications encrypted to a Linux desktop
Other
402 stars 43 forks source link

Clear notifications from phone #10

Open afonso360 opened 7 years ago

afonso360 commented 7 years ago

Hey, It would be nice if when I closed a notification on the phone or on the desktop, it would close on the other.

I'm not sure this is possible on the android side (never done anything for android), but with libnotify if we keep track of our current notifications we can cancel them

rootkiwi commented 7 years ago

As far as I know this is possible with android.

The one way I'm personally most interested in is automatically dismissing on phone if I close on the computer, the other direction is no use for me since it gets closed after the timeout anyway. But that may be desirable for others, I don't know.

With current network implementation there's no way for the computer to let phone know that a notification should be dismissed. One solution would be to during a notification connection keep the connection open for 10~ seconds, and then if the user closes a notification the computer could let phone know that.

Will not start implementing this for now, but will think about it. I'm open for suggestions.

nioncode commented 7 years ago

I'd like to have an option to toggle this for both sides: a) Dismiss from phone -> desktop. Use case: I see the notification on the desktop, and act on it on the phone (e.g. open the messaging app and reply). The notification is not displayed on the phone anymore, but is still displayed on the desktop (because I disabled the notification timeout in the settings).

b) Dismiss from desktop -> phone. Use case: notification is a reminder, which I acknowlede by dismissing it on the desktop. Then, I also have to dismiss it manually on the phone. However, I don't know about the capabilities of the notification access framework. Can we decide if we want to 'acknowledge' or 'dismiss' the notification? Some notifications provide actions, can these be triggered? This would lead to manual work for each app though.