Multi-platform app that allows your devices to communicate
Find a file
Philip Cohn-Cort c315170be5 Finally, we have support for sending out Battery information.
## Summary

The core idea is as follows:

1. When a Link loads the BatteryPlugin, we query Solid for a list of batteries.
    1. If the list is empty, we print a warning message and return quickly
    2. Otherwise, we connect *two signals* to every object in that list
2. We send out a single new NetworkPacket as soon as we've processed that list
3. When either of those two signals emits, we send another new NetworkPacket

### Multi-battery Support

BUG: 357193

To handle devices with multiple batteries (requested in that bug), we average
together the battery percentages. This also includes a new field in the packet for
'number of batteries' called `batteryQuantity`. For backwards compatibility, we can
assume it has a default value of one.

This should ensure we support
- devices with no batteries at all (like many desktop machines)
- devices with hot-pluggable batteries (like those laptops with detachable screens)

### Concerns

Note that the implementation isn't perfect.
We'll need some new localizable text to make it clear that we now support sending
battery status information.

Then there's a rather significant question: maybe we should have two battery plugins
on each client, like we do for the `findmyphone`/`findthisdevice` plugins?

## Test Plan

We need to ensure that other clients (including those using the Android codebase)
will respond correctly. The main things to look at are
1. are these new packets sent when the plugin is enabled, and not sent when it's disabled?
2. is the charge percentage accurate?
3. is the charge state (charging, discharging, or full) accurate?
and
4. do we see the correct number of warnings for low-battery?
2020-04-13 05:54:11 +00:00
.gitlab Update Issue.md 2019-09-19 07:48:59 +00:00
app SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-08 06:32:15 +02:00
cli CLI improvements for Qt 5.14+ 2020-01-07 20:49:03 +00:00
cmake More https 2019-03-24 10:42:34 +01:00
core Fix coding style 2020-04-10 23:43:06 +02:00
daemon update icon address for windowIcon 2020-04-10 22:42:04 +05:30
data SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-09 06:26:57 +02:00
declarativeplugin Register interface factories as Singletons instead of context properties 2020-03-14 17:35:58 +01:00
doc Reverted docs version as we didn't change them. 2016-07-22 13:13:30 +02:00
fileitemactionplugin SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-09 06:26:57 +02:00
icon Undo changes to sc-apps-kdeconnectindicator* icons 2020-04-03 17:57:56 -04:00
indicator SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-07 06:11:40 +02:00
interfaces Receive SMS subscription ID and reply using it 2020-04-07 20:01:18 +00:00
kcm SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-08 06:32:15 +02:00
kcmplugin Remove non-toplevel project() definitions 2019-06-12 22:47:17 +02:00
kio use Qt in place of Unix-only symbols in kio/kdeconnect 2019-08-17 22:12:29 +00:00
nautilus-extension Exception doesn't have strerr 2020-04-02 12:38:09 +02:00
plasmoid SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-08 06:32:15 +02:00
plugins Finally, we have support for sending out Battery information. 2020-04-13 05:54:11 +00:00
runners SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-09 06:26:57 +02:00
settings SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-07 06:11:40 +02:00
smsapp SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-09 06:26:57 +02:00
tests Fix build 2020-03-21 15:44:13 -07:00
urlhandler SVN_SILENT made messages (.desktop file) - always resolve ours 2020-04-09 06:26:57 +02:00
.arcconfig Add arcconfig file, for phabricator integration 2017-05-25 00:28:11 +02:00
.arclint Add .arclint 2018-07-27 13:32:03 +02:00
.DS_Store Update README.txt in Plugins to include the current method to build a skeleton for a Plugin 2020-03-27 21:02:16 +05:30
.editorconfig add trim_trailing_whitespace to editorconf 2019-06-11 01:08:31 +02:00
.gitignore Add CMakeLists.txt.user to gitignore 2019-08-20 16:03:48 +02:00
.gitlab-ci.yml ci: Add Gitlab CI configuration 2019-01-24 11:36:29 +05:30
CMakeLists.txt Finally, we have support for sending out Battery information. 2020-04-13 05:54:11 +00:00
CONTRIBUTING.md Remove Phabricator link from CONTRIBUTING.md 2019-07-30 16:24:04 +02:00
COPYING add missing licence file 2013-09-10 15:18:32 +01:00
KDEConnectMacros.cmake Make plugins work in SailfishConnect 2020-03-01 20:00:40 +00:00
README.md Fix minor typos 2019-12-22 10:15:58 +02:00

KDE Connect - desktop app

KDE Connect is a multi-platform app that allows your devices to communicate (eg: your phone and your computer).

(Some) Features

  • Shared clipboard: copy and paste between your phone and your computer (or any other device).
  • Notification sync: Read and reply to your Android notifications from the desktop.
  • Share files and URLs instantly from one device to another including some filesystem integration.
  • Multimedia remote control: Use your phone as a remote for Linux media players.
  • Virtual touchpad: Use your phone screen as your computer's touchpad and keyboard.
  • Presentation remote: Advance your presentation slides straight from your phone.

All this is done completely wirelessly, utilising TLS encryption.

Supported platforms

  • Computers running Linux with Plasma 5, Gnome 3, Elementary OS... any distro with Qt5 support given a little work :)
  • Android, by installing the KDE Connect app from the Play Store or F-Droid.

How to install

These instructions explain how to install KDE Connect on your computer. You will also need to install it on your Android device and pair them together in the app before using this application. The Android app repository can be found here

On Linux

Look in your distribution repo for a package called kdeconnect-kde, kdeconnect-plasma, or just kdeconnect. If it's not there and you know how to build software from sources, you just found the repo :), instructions are here

On Mac or Windows

Platforms other than Linux are not officially supported, as there has yet to be an official release of KDE Connect for MacOS or Windows. However, most of the features have already been ported to windows so you can compile KDE Connect for Windows using Craft. It hasn't yet been completely tested on MacOS, contributions and feedback are welcome!

On BSD

It should work, but no promises :)

How does it work?

KDE Connect consists of a UI-agnostic "core" library that exposes a series of DBus interfaces, and several UI components that consume these DBus interfaces. This way, new UI components can be added to integrate better with specific platforms or desktops, without having to reimplement the protocol or any of the internals. The core KDE Connect library is also divided into 4 big blocks:

  • LinkProviders: Are in charge of discovering other KDE Connect-enabled devices in the network and establishing a Link to them.
  • Devices: Represent a remote device, abstracting the specific Link that is being used to reach it.
  • NetworkPackets: JSON-serializable and self-contained pieces of information to be sent by the plugins between devices.
  • Plugins: Independent pieces of code that implement a specific feature. Plugins will use NetworkPackets to exchange information through the network with other Plugins on a remote Device.

The basic structure of a NetworkPacket is the following:

{
  "id": 123456789,
  "type": "com.example.myplugin",
  "body": {  },
  "version": 5
}

The content of the "body" section is defined by each Plugin. Hence, only the emitter and receiver plugins of a given packet type need agree on the contents of the body.

NetworkPackets can also have binary data attached that can't be serialized to JSON. In this case, two new fields will be added:

"payloadSize": The size of the file, or -1 if it is a stream without known size. "payloadTransferInfo": Another JSON object where the specific Link can add information so the Link in the remote end can establish a connection and receive the payload (eg: IP and port in a local network). It's up to the Link implementation to decide how to use this field.

Contributing

To contribute patches, use KDE Connect's GitLab. There you can also find a task list with stuff to do and links to other relevant resources. It is a good idea to also subscribe to the KDE Connect mailing list. We can also be reached on IRC at #kdeconnect on freenode or on telegram, contributions and feedback are warmly welcomed.

License

GNU GPL v2 and GNU GPL v3

If you are reading this from Github, you should know that this is just a mirror of the KDE Project repo.