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 last article . The toolkit is under development, for those interested in the current state of information under the cut.

    Ubuntu touch


    Installing Ubuntu Touch on the device is described on the site . Official builds exist for the Nexus series devices, but the network has many options for other devices.
    Compiling and building is much easier to do through the Qt Creator that comes with the Ubuntu SDK.
    1. After connecting the device in the Devices tab , the inclusion of the developer mode will be available. 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 starts in the background and some actions are required 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

    To get started, we need to build from the Qt5 source code using the Android NDK. The assembly process is described in detail in the article .
    On Ubuntu 13.10 it took me before the assembly to install packages openjdk-6-jdk and zlib1g-dev , 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 assembly was successful. During the assembly, the qtwebkit and qttranslations modules were disabled and promise to be operational by the release of Qt 5.1.

    Failed 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 to run the program on the device. If everything went well, a screen will prompt you 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 with the archive or through bazaar. The code is compiled by Qt Creator, using Qt5 for Android. Also during the assembly 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 folder / data / local / tmp / qt / , there I copied themes and modules from the Ubuntu ui toolkit. Two environment variables UITK_THEME_PATH (path to the themes folder) and GRID_UNIT_PX (coefficient for translating gp into screen pixels) are also needed. The inoperability of the qtwebkit module became a disappointment, because of this it is impossible to authorize the user. Screenshot of the result.
    qputenv("UITK_THEME_PATH", "/data/local/tmp/qt/themes");
    qputenv("GRID_UNIT_PX", "25");




    CurrencyConverter for smoothing impressions







    Blackberry 10


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

    Also popular now: