Store PendingIntents from notification actions. Send list of notifications to desktop and trigger Intent when matching packet arrives.
CCBUG: 366475
Details
- Reviewers
sredman - Group Reviewers
KDE Connect - Commits
- R225:c2cd60773b57: Send notification actions
Create test notification, trigger package is received correctly. Whether intent.send() is actually successful is NOT yet tested.
Diff Detail
- Repository
- R225 KDE Connect - Android application
- Branch
- notificationaction
- Lint
No Linters Available - Unit
No Unit Test Coverage
I think we should also send the action icon. That might be hard at the moment though, because we can only send one payload.
src/org/kde/kdeconnect/Plugins/NotificationsPlugin/NotificationsPlugin.java | ||
---|---|---|
77 | Maybe it's good to refactor this into Map<String, RemotelyAccessedNotification> or similar. RemotelyAccessedNotification can then contain the id, the available actions and reply intent. | |
264 | I think renaming to actionsJson is clearer. | |
267 | Maybe if a single title is missing, don't send any actions? Otherwise, this can be confusing. | |
273 | Double Log (with line 268), I'd remove at least one of them. | |
508 | Something like Log.e(TAG, "Firing action for notification failed", e) is better in general (colors the stacktrace etc., actually labels it as an error). |
It works for me. Finally I am able to use my university's 2FA without actually touching my phone! :D
Since the previous reviewers seemed satisfied and since this has been sitting for awhile, I say go for it