Skip to content

Supporting quick actions when possible from notifications without opening app.

Anjani Kumar requested to merge anjani/kdeconnect-android:anjani into master

Summary

This patch tries to make the app more easy to use. When there is a single device connected, two quick actions can be supported from notifications which are

  • Send Files
  • Run Commands

The persistent notification when touched opens the MainActivity.

This patch adds two action buttons in the notification Send Files, Run Commands which open the corresponding activities SendFileActivity,RunCommandActivity. These activities are launched with intents carrying the device ID of the only connected device.

Action Buttons are only added when there is one device connected. This is because when multiple devices are connected, there is no clear way know on which device the user wants to perform these actions. To ask for the choice an activity with options or the MainActivity would have to be launched which would be redundant and would not be so quick.

This is very handy to use as these two actions are very frequently used and supporting these quick actions would be great for all users.

Test Plan

Use the app normally. When doing some other task, see the notification and you'll see the action buttons.

Screenshot_20200218-011912_Pixel_Launcher

When clicked it opens the respective Activity of the operation selected. When Send Files clicked, it opens SendFileActivity

Screenshot_20200218-012624_Files

When Run Command clicked, it opens RunCommandActivity

Screenshot_20200218-013221_KDE_Connect

When multiple devices are connected, the action buttons are not added.

Screenshot_20200218-013639_Pixel_Launcher

Merge request reports