📜 ⬆️ ⬇️

Ubuntu ui toolkit on Ubuntu Touch and Android



I would like to talk about the experience of launching an application written using the Ubuntu ui toolkit on the Ubuntu Touch and Android platforms. For the test, I used the application from the previous article . Tulkit is under development, for those interested in the current state of information under the cat.

Ubuntu touch


Installing Ubuntu Touch on the device is described on the site . Official builds exist for Nexus series devices, but there are plenty of options on the network for other devices.
Compiling and building is much easier with Qt Creator, which comes with the Ubuntu SDK suite.
  1. After connecting the device in the tab Devices will be available to enable developer mode. This action will install the necessary packages (gcc, ssh). Do not forget about permissions in udev and the availability of the Internet
  2. Depending on the type of project in the Build >> Ubuntu Touch menu, options will be available to launch the application (.qmlproject), or to compile, build and install the package on the device (.pro)

A few screenshots from the Galaxy Nexus:



')


As always there are some problems, for example, the application runs in the background and some actions are needed to see it. But in general, everything works well and Ubuntu Touch pleases with its application development capabilities.

Android


Here the path is much longer and more thorny.

Qt5

First we need to build Qt5 source code using the Android NDK. The assembly process is described in detail in the article .
On Ubuntu 13.10, I had to install the openjdk-6-jdk and zlib1g-dev packages before the build, make export ANDROID_API_VERSION = android-14 . Parameters for the configuration script:
./configure -opensource -confirm-license -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-ndk /opt/android-ndk-r8e -android-sdk -android-sdk /opt/adt-bundle-linux-x86_64-20130219/sdk -skip qttools -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples-and-demos
After that, the build was successful. When building, the qtwebkit and qttranslations modules were disabled, their performance promises release of Qt version 5.1.

Bad start

By opening the project of our application and adding the Kit for Android (in Tools >> Options >> Build & Run , then in the Projects >> Add kit tab), you can try running the program on the device. If everything went well, you will be prompted to install Ministro . This service installs and provides qt libraries for applications. After downloading the libraries, we will see a gray background and messages from the absence of the Ubuntu module in the log.

Process screenshots









Ubuntu ui toolkit

You can get the code from the repository , immediately archive or through bazaar. The code is built by Qt Creator, using Qt5 for Android. Also during the build it will be necessary to comment out the code using the functions of disabled modules, mainly qttranslations.

“Successful launch”

Copy the Ubuntu ui toolkit to the device. Ministro uses the / data / local / tmp / qt / folder, where I copied the themes and modules from the Ubuntu ui toolkit. It also requires two environment variables UITK_THEME_PATH (path to the themes folder) and GRID_UNIT_PX (coefficient for converting gp to screen pixels).
qputenv("UITK_THEME_PATH", "/data/local/tmp/qt/themes");
qputenv("GRID_UNIT_PX", "25");

The disappointment was the inoperability of the qtwebkit module, because of this, it is impossible to authorize the user. Screenshot of the result.


CurrencyConverter to smooth the impression







Blackberry 10


There is an article about running applications using the Ubuntu ui toolkit on BB10. Everything looks workable, although some adaptation is required.

Source: https://habr.com/ru/post/179595/


All Articles