Sunday, July 17, 2011

Developing for Android: HTML5 and Qt

Recently read a post by my friend and ex-collegue Sai Geetha on her very famous Android blog. I am now reading her blog to start learning a bit about Android development. In her most recent post, she has listed 4 ways for developing in Android.

1. Using the Software Development Kit (SDK) with Java
2. Native Development Kit using C / C ++.
3. RenderScript using C99 - used to write faster graphics code like the Google Books page turn animation etc.
4. Android Scripting Layer using Python etc.

Just thought I'll extend the above further and add a couple of thoughts to this list...

The trend now and what is gaining a lot of traction is developing cross platform apps. So you develop once and can deploy it on multiple platforms. Java showed this promise earlier, but is slowly making way for the newer and greater things out there. One should see how the recently released Java7 will perform. And Java is still the greatest thing for Android development today. Java is also the recommended way of development for S40, the most popular set of Nokia devices. But is the spectrum changing?

Extending point 2 listed by Sai Geetha above, I would also like to draw the reader's attention to the Qt framework developed by Nokia (which acquired Trolltech). Qt is a very easy to use cross platform development framework on C++. You basically write your apps once and can compile it to multiple platforms. Already well supported on desktops (Windows, Linux, Mac), mobiles (Symbian, MeeGo) and embedded Linux platforms.

Now the Qt community has also come up with Necessitas, the Android port of Qt. One just needs to Google on this topic and you'll see quite a bit already out there, and many great demos too. So imagine, you develop your apps with Qt and can target both Android and Symbian/MeeGo devices at the same time. Thats a huge number!

But Qt is not being supported on Nokia's new primary platform, the Windows phone. Would the community take this up too? Who can stop the community?

Extending her point 4 above, Nokia has has introduced Qt Quick (QML), a scripting layer on top of the Qt framework. Quick brings in very fluid and eye catching UX to Qt apps. Most of the logic would be written using JavaScript. Very rarely would developers have to tweak the underlying C++ components. At least that is the goal. So how well QML does on top of Android is something to look forward too.

In addition to the 4 ways listed above, there is a 5th way, which I think will supercede all the other ways eventually (at least for most of the use cases), and that is developing apps using HTML5, CSS and JS. So you write code once and thats it, it will work everywhere and no recompilation required too. HTML5 widgets are catching on very fast, and its no longer just restricted for web development! So with HTML5, its no plugins, no additional layers, but just pure JavaScript. One would revert to native code rarely, where absolutely no support is available with HTML5. This "not supported" list is shrinking by the day. Today people are writing very fast web servers like Node.js using JS, and one can only wait for how the whole thing will play out. I for one, am betting big time on this 5th horse.

It was Steve Jobs who set the ball rolling with his no Flash support in his famous open letter. Soon everyone was on board. Now with the recently announced Windows 8 platform, Microsoft too has jumped on the HTML5 bandwagon. HTML5 would be their primary development platform (with of course "backward compatibility" with Silverlight, .Net etc etc frameworks) :D I just love Adobe, they are totally into authoring tools and not married to anything, including flash. I'm seeing a lot of HTML5 authoring capabilities in their upcoming tools.

HTML5 still has a long way to go, many quirks to be sorted out. But to conclude, you would need to write code once with HTML5 technologies and you can target all desktop and all mobile platforms out there. Great! Just great!

So what do you think? Do you know of more ways doing Android development? Most importantly, have you started looking at HTML5 technologies?


  1. I have seen lots of comment on HTML 5 so how new developer can start.. which is the best ide to develop and test?..

  2. Hi Anonymous,
    I know some who do it with plain textpad and browser. For tools you can check out the last section of (the site is still in initial stages)

  3. hey please help me i lost my keystore file but i know all the details like password,alias etc

    how can i generate same keystore from this so that i can update my application with newer version on android market

    currently its not accepting my apk file on market

    please help me

  4. Hi Bhushan,
    To my knowledge its just not possible to recover the keystore once you have lost it. You cannot regenerate the same file too. You might have to get a new keystore and republish ur apps if any. So always back up that key, mail it to yourself, so that way it'll always be on ur gmail a/c
    good luck!

  5. What a very informative article, thank you very much for sharing these information.

  6. Well I don't know if anybody knows it or not but Nokia has announced that they have partnered with Vodafone India and Airtel and Reliance to offer integrated billing solutions on the Nokia Store in India. This would let users download apps from the Nokia Store and pay for their downloads as part of their monthly mobile phone bills or have the amount deducted from the pre-paid balance.
    This would surely increase the earning potential of the paid apps that developers submit.
    Go To: and start submiting more & more apps to earn more!!