Skip to content

The share plugin allows sending a file to Android and opens it immediately. The same would be useful Android->Desktop or Desktop->Desktop

Aniket Kumar requested to merge (removed):master into master

Summary

Task T10563

The share plugin allows sending a file to Android and opens it immediately. The same would be useful Android->Desktop or Desktop->Desktop

This patch allows kdeconnect desktop app to receive a file and open it immediately if the value of "open" is set to true for the received network packet. The android part to add the feature that is, to be determined by the sender whether the file should be opened on the received device is in progress.

  1. This patch implements the feature in share Plugin to check the value of "open"(boolean) variable of the received network packet.

  2. Share Plugin first extracts the value of "open" from the received network packet and stores it in m_open member variable.

  3. If the received network packet has the value of "open" set to true then it calls the QDesktopServises::openUrl() function to immediately open the received file using default application for the particular file type.

  4. If the received network packet has the value of "open" set to false then it skips the call to QDesktopServices::openUrl() function.

Test

Desktop->Desktop

For desktop->desktp the file-sharing can be tested by simply triggering the file opening from another desktop device using "kdeconnect-handler --open file:///home/foo/file.txt". This will immediately open the file on the received device. For this it is useful to connect the desktop to itself via the loopback link provider. You can enable it by running "cmake -DLOOPBACK_ENABLED ." in the build directory and running make again.

Android->Desktop

To test the android->desktop feature, just add this patch to the desktop repository and the android patch submitted on android repository and install both versions and the files will immediately get open on desktop sent from android app by pressing the send and open button in android UI. android patch

Android UI

Screenshot_20200216-011830

/label feature

Edited by Aniket Kumar

Merge request reports

Loading