reply to notifications
ClosedPublic

Authored by progwolff on May 27 2017, 7:01 PM.

Details

Summary

These changes allow replying to any notifications that offer quick reply text fields (like WhatsApp). Does work for WhatsApp. Does not work for Telegram.

Diff Detail

Repository
R225 KDE Connect - Android application
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
progwolff created this revision.May 27 2017, 7:01 PM
progwolff updated this revision to Diff 14894.May 27 2017, 7:24 PM

do not pass requestAnswer for repliable notifications

albertvaka accepted this revision.May 30 2017, 10:38 PM
albertvaka added a subscriber: albertvaka.

This is awesome! :D It works great for whatsapp, but it's a pity that doesn't work for Telegram or the default SMS app. Do you know what's the reason?

If we could make this work for SMS, we could remove the code to do that from the telephony plugin and leave just this.

I think we can merge this now, even it doesn't work for every app it's already a great improvement. Do you have commit rights or should I push this on your behalf?

src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java
322

This contains all the actions from the notification? In a future we could send all the actions with their respective texts, and have everything on the desktop :D

This revision is now accepted and ready to land.May 30 2017, 10:38 PM

I didn't have time to investigate further in the issue with telegram. I guess they just don't have a RemoteInput in their action but instead use custom widgets to receive user input. For me it's not such a big issue, as I use telepathy-morse on the desktop.

Before this could fully replace the telephony plugin, there will be much more work to do. For now, this additions only allow to reply with exactly one message to each notification received. The telephony plugin is much better here, as it allows to send an arbitrary number of messages and integrates perfectly with telepathy.

I'd be grateful if you could land this. I requested a developer account, but have no response yet.

src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java
322

This should be all actions from the notification, yes. I'm not sure if it's a good idea to forward all actions to the desktop though. For example my e-mail app has a "reply" action wich does nothing more than to open the app. Triggering this action from the desktop would be quite useless (and the name would be misleading for the user).

albertvaka added inline comments.May 31 2017, 1:34 PM
src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java
322

Yup, that's true.

Closed by commit R225:6d216b2766bb: reply to notifications (authored by progwolff, committed by Albert Vaca <albertvaca@joinverse.com>). · Explain WhyMay 31 2017, 1:38 PM
This revision was automatically updated to reflect the committed changes.