KDE Connect – New stuff 0x3

Today we released version 1.10 of the KDE Connect Android app. Therefore it’s time again to share what we’ve been working on.

Targeting Android Oreo

As of this month app updates uploaded to Google Play need to target Android 8. This has several implications. Targeting Oreo comes with an updated Support Library, which forces us to drop support for Android 4.0 and below. According to our Google Play data this will affect approximately 400 users. We are very sorry about that, but these users won’t receive further updates. Furthermore, Android Oreo introduced some restrictions in regard to apps running in the background. In the future in order to be able to run in the background KDE Connect needs to show a persistent notification. The good news is that you can hide the notification. The (slightly) bad news is that we cannot do it by default. To hide the notification you need to long-press it and switch it off. Other notifications from KDE Connect are unaffected by this.

1.10 Changes

These are the main changes of version 1.10. Not mentioned are countless small improvements and under-the-hood changes.

Mouse input now works with the same speed independent from the phones pixel density.

The media controller now allows stopping playback.

Run command supports triggering commands using kdeconnect:// URLs. Useful for integration with NFC tags and 3rd-party apps.

The notification filter allows quickly (de-)selecting all apps.

Several settings scatterd across the UI have been bundled into a single settings screen.

A lot of work has gone into how we handle SMS on the Android side in preparation for something huge. Stay tuned 😉

Other changes

The desktop side has improved as well since my last post.

The windows build of KDE Connect gained support for keyboard input.

The plasmoid gained a couple of additions. In my last update I mentioned that it is possible to run commands from there. It is now also possible to lauch the command setup from there. Furthermore it is now possible to select files to share them from there.

The Linux Mobile App gained many visual improvements and features. It now supports sharing files and controlling the system volume.

If you are using Itinerary you can send booking information from the PC directly to the phone via KDE Connect.

It is now possible to send files directly from Pantheon Files (and other Elementary apps) and Thunar via KDE Connect.

Again, there are countless other improvements that I did not explicitly mention.

A big thanks to all people who contributed to this!

 

Advertisements

KDE Connect on IRC and Matrix.org

Since a few months KDE Connect has a Telegram group to discuss development. Since the over 100 people joined. I did not expect such an interest in it. Few people asked to have this group bridged to an IRC channel since they prefer IRC over Telegram. I’m happy to announce that we finally made this happen. Let’s celebrate the birth of #kdeconnect on Freenode. You can also access it from matrix.org (#freenode_#kdeconnect:matrix.org).

The rest is up to you! If you are interested in contributing to KDE Connect go and share your ideas with us and ask any question you have!

KDE Connect – New Stuff II

It’s time for another feature update for KDE Connect!

You can now run commands on connected devices from the Plasmoid.

The Dolphin context menu entry for sending files to a connected device has been dropped in favour of a Purpose plugin, which groups nicely with other Share features and supports more apps such as Okular and Spectacle.

Albert Vaka added a presentation mode to Android which allows you to control slideshows from your phone. Aleix Pol added the same to the Kirigami app.

 

As I’ve mentioned before it is quite hard to find the settings where you can define your commands for the Run Command feature.  The command list on Android now has a button that opens the appropriate settings on the desktop. Ivan Čukić added a few useful command suggestions to the menu.

Friedrich Kossebau added support for a “Find my PC” plugin. You might wonder now how often he loses his PC, but it also helps finding other devices that run the C++ version of KDE Connect, such as Plasma Mobile and SailfishOS devices. I added support for triggering it on the Android side.

Following a request on Reddit I added a dedicated Stop button to the media controller.

Chansol Yang made sure that the pointer speed when controlling the mouse from the phone is the same across Android devices with various DPIs.

Philip Cohn-Cort added the much requested dark theme option to Android.

Screenshot_20180731-154621

You can now use special URLs to trigger commands on connected devices. The urls have the form kdeconnect://runcommand/<deviceid>/<commandid>. As those are quite complex I added a helper for it. You can copy an URL to the clipboard by long-pressing a command in the command list. You can write those URLs into a NFC tag to trigger the command when your phone reads the tag or use it to integrate with services such as Tasker.

The system volume patches have been merged. To make use of it you will need the latest KDE Connect from master for Desktop and Android and pulseaudio-qt installed. You can get pulseaudio-qt from git. We will to an initial 0.1 release soon and hope that distros will ship it soon.

Besides these features we also fixed some bugs and polished the UI a little.

Bluetooth support is progressing slowly. Matthijs Tijnk and Qt 5.11 fixed some issues. However, it is still not ready for the public.

We also improved our device support:

Aleix and I improved the Kirigami app. We improved the basic pairing workflow and  you can now run commands and control media sessions.

Bart Ribbers fixed an issue that was blocking KDE Connect from building it for postmarketOS. I hope to see KDE Connect there as well!

Adam Pigg made a huge step towards bringing KDE Connect to Sailfish OS.

We like to see KDE Connect on as many platforms as possible, and we need your help for it! Our workboard contains lots of ideas for new people to get started. You can ask for any assistance in our Telegram group.

Thanks to all contributors!

The Purpose of things

Hi,

For once this is not a post about KDE Connect (at least not directly). Besides KDE Connect I also work on several other KDE projects, one of them being the awesome Purpose framework created by Aleix Pol.

After Nate highlighted my latest work on Purpose (the new share menu in Dolphin) in his blog post I received quite some feedback. I’m glad that many people like the idea, but I also received some criticism/suggestions for improvements. This is always welcome as long as it is fair and objective. This was true for most comments, but unfortunately not all of them. I won’t even bother to reply to unfair and personal attacks for a useful feature, but rather like to respond to appropriate criticism and inform you about my future plans for Purpose.

First of all, for those who don’t know what Purpose is, it is an extensible framework to fulfill the developer’s purpose while providing an abstraction. Right now the only use-case is exporting/sharing a file, but more could be added in the future. It is used by Dolphin, Spectacle, Okular and other KDE applications and can export files to Email, Telepathy, KDE Connect, Nextcloud, Telegram (I did that one myself), Twitter, Imgur and many more.

For the share menu in Dolphin’s I received some critisism/suggestions for improvements:

  • Send via Bluetooth and send via KDE Connect are still separate in Dolphin’s context menu and should be in the ‘Share’ sub-menu as well. I 100% agree on that. In fact send via KDE Connect is already in the ‘Share’ sub-menu and I’ve uploaded a patch to remove the old entry. As for Send via Bluetooth: Someone would need to turn Bluedevils FileItemActionPlugin into a Purpose plugin. I’ll probably do it myself as soon as I find the time for it.
  • Dolphin’s context menu will be even more cluttered with this. It actually achieves the opposite. By combining actions like Send via Bluetooth and Send via KDE Connect into a sub-menu the top-level menu will be less cluttered.
  • I’m not going to use it, so I don’t want to have it. You can disable it in Dolphin’s settings.
  • I’m never going to use option XY, but it’s still there. Fair point. Some options are loaded conditionally, so e.g. the Telegram option is only present if Telegram is actually installed. For others this is not the case. I’m planning to make a config module to en-/disable options.
  • I don’t want to share my files by accident. Virtually all of the options require more than one click to do something, so it needs a weird accident to actually do something unwanted.

I’d love to see more applications/services adopting Purpose. So if you are a developer interested in integrating your application with Purpose please get in touch with me and we will figure out a solution. I’m especially looking at you, fellow KDE developers 😉

Happy sharing 🙂

KDE Connect on Plasma Mobile

The digital world has changed over the last 10 years. The usage of mobile devices skyrocketed whereas the desktop market is stagnating. The trend is also going towards smaller and convertible devices. The mobile market is controlled by two major corporations. One of them is religiously cutting down your personal freedom and aiming towards a walled garden proprietary ecosystem, the other one is disrespecting your privacy enormously. With Plasma Mobile the KDE community is envisioning a mobile experience that is giving you maximal freedom while ensuring your privacy. It seems like a bold venture, but we have to at least try, right?

Plasma Mobile would not be a true KDE project without the same degree of integration with the desktop as we already have with Android devices. Therefore we aim to make Plasma Mobile a first-class citizen of KDE Connect.

How far are we?

Thanks to Aleix Pol there is a suitable UI for KDE Connect on Plasma Mobile already in our git tree. I was able to run it on Plasma Mobile. It has some rough edges, but is basically functional.

IMG_20180607_192146

Some features that work so far:

  • Control media players
  • Remote mouse input
  • Lock the remote device
  • Find the remote device
  • Receive files
  • Receive remote commands

IMG_20180607_192849

Why do I care about Plasma Mobile at all?

Chances are high that you won’t be dropping your Android phone for Plasma Mobile anytime soon. But even then you will be profiting from our efforts. To achieve feature parity with Android we will need to port some of the Android features to C++/Qt. This will benefit all your connected devices that run the C++ version of KDE Connect, e.g. other desktop devices, Sailfish OS phones or phones/tablets running another version of Linux (e.g. Ubuntu Touch). The new UI also provides room to integrate some controls that are only available on Plasma right now. This will improve the KDE Connect experience for non-Plasma desktop users.

Sounds great, what can I do?

You want to help? Awesome! I created a meta-task on Phabricator to track the current progress. It contains all the things that should be done as sub-tasks. Some of them are ideal beginner tasks. Just pick one you like and don’t be shy to ask for help. You don’t even need to have a phone running Plasma mobile to do it, you can develop it on your desktop machine and thanks to the awesome Kirigami Framework it will run on Plasma Mobile automagically. What are you waiting for?

KDE Connect Junior Jobs

One of KDE’s Community goals for the next years is streamlined onboarding of new contributors. It’s very important that new people regularly join the community for various reasons. First of all, there will always be something to do and the more contributors the merrier! But there are also people becoming very inactive or leaving the community and these people need to be replaced. Furthermore new people bring in new and fresh ideas. It’s important to have people from diverse backgrounds in the community. Lack of community diversity manifests in several issues:

  • Lack of language diversity results in poor translations for non-widespoken languages and other internationalization issues
  • Having only English/German/Spanish/French speaking contributors leads to incomplete support for things like right-to-left layouts and CJK characters/input methods
  • Contributors with powerful hardware and good internet connection tend to ignore the need for performance- and bandwidth-efficient solutions
  • An example from KDE Connect: Most of us are from Europe where its common to use messengers like Whatsapp whereas in the USA it’s far more common to write SMS. Therefore we didn’t really had in mind that it’s important to have good SMS integration in KDE Connect until we actually had some people from the US at our sprint
  • People tend to not be aware of different setups other people might have, e.g. having an Android phone without Google Play Services is rare in Europe but common in China

To address these issues I am aiming to ease contribution for everyone. I believe that KDE Connect is a great project to get started in KDE development. After all, it’s the project I got started with myself. The codebase is small and IMHO quite sane. The modular architecture allows you to quickly get cool results without risking to break stuff.

To help you pick a task for your first contribution I started marking tasks as junior jobs on the KDE Connect workboard. I want to provide structured information for each task that helps you diving into it. I hope that other KDE projects will follow our lead.

Now I need your help!

Which information would you like to see in the task description?

What can we, the established developers do to make your first contribution easier?

What were the problems you encountered in your first contribution?

What are the lessons you learned during your first contributions that you want to share with others?

If you already have a KDE Identity account please leave your feedback on the Streamlined onboarding of new contributors or the Junior Jobs task.

If you don’t please leave your feedback here in the comments and I will forward it to the appropriate places.

Your help will improve the overall community and thus the quality of our software in the long term!

 

Volume Control in KDE Connect

Definitely one of the best use cases of KDE Connect is this: Watching a movie while laying in bed or on the couch and controlling your unreachable computer from your phone without needing to stand up. Thanks to our new media control notification you can pause and skip without even unlocking your phone. But what if the movie is too silent? If your media player is implementing the MPRIS2 specifications you are already lucky and can control your players volume from KDE Connect. Plasma Browser Integration even adds that for Browsers. But what if your player doesn’t support it (looking at you, Spotify)? Or you want to control your system volume? Then you are out of luck. Until soon. We are adding a plugin to KDE Connect that enables you to control your system volume from the phone. How cool is that? Another neat little trick is tapping on the volume icon to (un)mute the system.

Screenshot_20180424-000806

Implementation

The idea for this has been around for a while, but it was not until fall 2017 that I actually started implementing it. The implementation relies on PulseAudio. We are aware that not everyone is using it, so we don’t require it and hope that packagers do not make KDE Connect depend on PulseAudio. The first implementation was using the command line tool pactl to set the volume. Assuming you only have one sink it was working pretty well, except there was no easy way to ask for the current volume, so our volume slider would be wrong pretty often. I got around this by parsing the output of pactl in a horrible, horrible line of bash, but it was clear that this was not stable enough to actually go into prod. Also it was still not working with multiple sinks. The logical step was to make use of the libpulse. For some reasons there are a great deal of people that like the C programming language, but I don’t. Especially not the library style that comes with it. What I really didn’t like was the idea of mixing low-level libpulse C code with high-level Qt code. Luckily, the Plasma guys thought the same. The Plasma Volume Applet contains code that was acting as a bridge between the two worlds. So I “borrowed’ that code (isn’t free software amazing?) and after some intense head-against-the-table banging (turns
out both KDE Connect and Plasma PA both have a class ‘Device’ with the same include guard) it was working like a breeze, now even with multiple sinks.

Birth of a Framework

It was working really good, but the thought of having 20 files of duplicate code in two KDE projects wasn’t particularly appealing. We decided it would be best to extract the common code into a library that both projects can use. To make this possible the code needed quite some polish. The original author probably didn’t have in mind that it might become a library someday. After some work we now believe that the API can be declared stable and it can be released on KDE Extragear. We aim to make it an official KDE Framework once the code has matured enough. Extracting and releasing it as a library makes it easier for us to maintain it, but it also means that you can use it in your project! Furthermore, since it covers more use cases than just volume control it’s also possible to integrate more PulseAudio related features into KDE Connect easily. We are looking forward to your suggestions!