Open on remote device Android->Desktop
Open, Needs TriagePublic


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

Desktop-side this can be achieved with the xdg-open command
To implement one needs to:
In the Share plugin when receiving a file check if the network packet has "open" set to true
After the file is transferred if open is true call xdg-open (via QProcess) with the file URL

You can trigger the file opening from another desktop device using "kdeconnect-handler --open file:///home/foo/file.txt"

For this it is useful to connect the desktop to itself via the loopback link provider. You can enable it by applying this patch to core/daemon.cpp

iff --git a/core/daemon.cpp b/core/daemon.cpp
index 51acc923..133055d7 100644
--- a/core/daemon.cpp
+++ b/core/daemon.cpp
@@ -71,9 +71,9 @@ Daemon::Daemon(QObject* parent, bool testMode)
     qCDebug(KDECONNECT_CORE) << "KdeConnect daemon starting";
     //Load backends
-    if (testMode)
-        d->m_linkProviders.insert(new LoopbackLinkProvider());
+    if (testMode) {}
     else {
+        d->m_linkProviders.insert(new LoopbackLinkProvider());
         d->m_linkProviders.insert(new LanLinkProvider());
             d->m_linkProviders.insert(new BluetoothLinkProvider());
xyphan added a subscriber: xyphan.Mar 5 2019, 12:25 PM
apol added a subscriber: apol.Mar 5 2019, 1:28 PM

How is that different to just clicking the notification?

Also we can call QDesktopServices::openUrl() from the plugin, which should do the same as xdg-open.

So for android work, is it , Send the file to Desktop from Android -> File Recieved -> Open Immediately ?

It seems to me Work = Send files option(in Android) + open immediately (On desktop)

If so could I work on Android part ?

What we'd need to figure out is how we best expose this in the UI

piyushp moved this task from App/Plasma Mobile to Junior Jobs on the KDE Connect board.