KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   

- News . 
click to vote up

Jani Monoses: My first Ubuntu phone app

Published Nov 5 2013 via RSS

I have been meaning to try QML for a while, and a couple of weeks ago I managed to finally do it, the result being a simple memory game for small children, a clone of the GCompris railway activity. In this post I'll summarize my short experience with Ubuntu click app development.


QML + Javascript is the easiest way I have seen so far to program a small interactive app. The extra tooling I did not test, I used vim and click from the command line. Documentation is so and so. App deployment and installation on Ubuntu for Phones is working well enough, even if is has rough edges.

The game itself

The game is about watching cartoon trains composed of a locomotive and a small number of different wagons scroll on the screen and then trying to reconstruct them from memory. There are no written or spoken instructions given. Let figuring out the rules be part of the game :)

Unlike GCompris, this clone works with touch input, the lack of availability of a touch-based railway game being the secondary motivation behind the exercise :) All sounds and most images, much like the game idea are lifted from GCompris and credited accordingly.

If you're impatient and happen to have Ubuntu running on a phone but preferably on a tablet you can install it by searching for 'railroad' in the application screen. If not, apt-get install gcompris :)

The source code with full non-rebased git history is here, GPLv3 licensed

File issues there if you find a bug or want a feature.

QML and QtQuick

I finally found out that QML stands for only the Javascriptish language and runtime, while QtQuick is the core of the 'stdlib' that comes with Qt/QML, itself mostly written in QML.

This combo is surprisingly pleasant to work with, yielding quick results from a comparatively small effort and few lines of code. The built in support for animations and multimedia in QtQuick and the reactive programming feature of property binding in QML were all very welcome. As things evolved though, I often found myself having to and even wanting to move most of the logic into a separate JavaScript file and give up on some the nice declarative features given by QML. For example it turned out that while a Grid that would automatically lay out train images given the number of rows and columns to use was very convenient and concise, I eventually used a dumb Rectangle as the container and calculated x and y explicitly for each train as they did in the 70's in order to have more control over where they end up to match the SVG background image.

This is not unusual, I understand that the idea of using QML only for the graphics and doing the rest in C++ is a popular view among developers with experience. IMHO that is very bad idea to hold onto though if you want to encourage quick prototyping and having a chance to compete with Android or FirefoxOS for developer's attention. There will always be a need for code that cannot or should not be done in QML, but that should be the exception, and even then I'd rather see Go-QML be the glue between QML and the OS. That too relies on C++ but mostly hides it along with the build system from the developer.


In order not to learn too many new things at once, and to avoid pitfalls unrelated to actual programming I decided to just use vim to edit and qmlscene to test and run the app.
The only change in vim's configuration was adding syntax highlighting for QML via this snippet in ~/.vimrc

Bundle 'peterhoeg/vim-qml'

and then running the BundleInstall vim command.

It's that easy since I started using  Vundle :)

I find the Click packaging format refreshingly simple and to the point.


I used the official Qt documentation site mostly. It is comprehensive but not easy to navigate, it is a collection of rather disconnected islands covering QML, QtQuick, etc, but with quite some overlapping content. I used the in-site search functionality often, and even global googling to find me something on the site I was already on :) Regarding the Ubuntu documentation I agree with all that Stuart had already said

App building and deployment

I used the click command line tool on the development computer to build the click package.
I may have missed out on important packaging scaffolding and validation tools since I did not use the SDK. I wished I could do click newpackage and later click check (or using equivalent tools if not click itself) to get a basic skeleton working and to catch errors such as malformed developer email address, before uploading.  I found out about reviewer-tools only recently.

The link I followed on the Ubuntu app developer site to publish the already built click package turned out to be the wrong one and non-working, but only after going through the 5 page wizard. I _think_ this is fixed now.
The app was let into the appstore no more than 30 minutes after it being uploaded the first time. There was a need for a second time and for the obligatory version bump in order to correct the email address typo mentioned above.

So while these steps seemed confusing it can be partly ascribed to me being new to it all.

App install and update

Since I still find the Ubuntu phone interface and navigation confusing and since there are still bugs in the implementation I spent too much time trying to get the app installed by it not showing up in search, or a stubborn on screen keyboard hiding the Install button from view when I found it.
I made a minor bugfix release of the game yesterday (0.1.2) but I am not sure how to upgrade to it on the device. Still lots of things to learn about and fix on Ubuntu for phones :)

BackRead original postSend to a friend

Add comment

Add comment
Show all posts

 Who we are
More about us
Frequently Asked Questions
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Add App
Public API
About GTK-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Sponsor us
Report Abuse

Copyright 2007-2014 GTK-Apps.org Team  
All rights reserved. GTK-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.