Progress of KDE on Android Infrastructure

We have 2015 and Android is a very important platform for (mobile) applications and developers. — This somehow could also have been written a year ago, and actually it was stated then by several people. Those people also started porting some first applications from the KDE/Linux world to the Android platform. Yet, when looking at what happened the last year, as of now, we only have KAlgebra, GCompris and (since recent) Marble Maps that are available on Android.

The interesting question is, what holds back the many KDE applications that would also fit on an Android platform? During this year’s Randa sprint we took the opportunity and sat together to exchange what we learned during the last year. Looking at the different approaches of porting applications to Android,  we learned that already setting up a build system is a by far non-trivial job and probably one of the main points that holds people back from playing around with Android. Still, also the availability of KDE Framework libraries was not really tested in details yet, and without having availability guarantees it raises an uncertainty about how easy a port to Android might be.

To overcome these problems, we start with some simple approaches:

  1. Provide a simple and easy to use build environment.
    From the several existing toolchains for building Android applications, we started to reduce the number of different ones within the KDE projects to one. The new general toolchain (provided since some time via extra-cmake-modules) gained a new tutorial for how to use it. Further, by providing a build script for frameworks libraries, we make it easy to setup a whoel build environment that can directly be used for porting KDE applications that use KF5.
  2. Make development easy for new people.
    Initial work was started to create a docker image as a simple to use SDK. The goal is: run one command and get a fully setup build environment. With this approach we follow the way as it was started for Plasma Mobile.
  3. Availability of KDE Frameworks 5.
    We started to look into which frameworks currently can be built for Android. The list is already notably: kconfig, kcompletion, kitemmodelsm kitemviews, kcodecs, karchive, kguiaddons, kwidgetsaddons, attica, kdnssd, kapidox, kimageformats, and kplotting. For getting more frameworks build, the current two major blockers are building ki18n and kcoreaddons, which both need actual changes to the code to support the Android platform with its stripped down libc.

Looking at what was already achieved, the sprint itself was essential to get all people together to really work on this topic. As always, you can support this wok by donating for KDE’s sprints.
Though the work is not yet done, the basement is set to post some interesting news in the next weeks.

6 thoughts on “Progress of KDE on Android Infrastructure”

    1. Yes and no. Necessitas was the Qt4 port of Qt to Android. Since Qt5, Qt directly supports Android as a platform, whereas this platform support is based on Necessitas.
      All we do is to use Qt5 for Android and make KDE Frameworks 5 and KDE applications available there.

  1. Is there a “Hello World” KF5-based (Not just Qt5 based) sample app that can run on Android now? Existing KDE app must be ported to QML for this to work? Or the Android app is a fork of the primary app? i.e. one-code base for desktop/mobile or two? What tiers are available now on Android?

    I’m really interested in this, and the application I’m interested in porting (KStars) relies heavily on QWidget/QPainter/..etc so I’m not sure where to even begin. I would be happy if I can get it ported to tablets, not necessarily phones.

    1. There is not much difference between a Qt application with or without using KF5 libraries from the building and deploying point of view (except that the respective KF5 libraries must be build on Android). You could e.g. have a look at KAlgebra, which already uses some KF5 libraries for its Android version AFAIK.
      Regarding KStars, that will probably become a heavy ride 🙂 The KF5 dependency list therin is quite long and some of these frameworks probably won’t see any Android porting (e.g. KWindowSystems; which is quite interesting why you even need it at all…) The way to go is probably to create a smaller touch-enabled UI (easiest way is to use QtQuick for that) which then also has (initially) fewer features but also less dependencies.
      Currently, I am working on two things that will be helpful for you: (1) getting KI18n built for Android, which then will also unlock KDeclarative, (2) setting up a Docker image for an Android SDK, which makes it very simply to setup an initial build environment.

      1. That’s a lot for the update! Looking forward to the docker image as this will make testing the waters much easier. I’ll look into KWindowSystems, it might be carried over from prior versions. Your work is highly appreciated!! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s