Friday, August 26, 2011

Distribution channel - Stockona launching into Nokia Store

I have been watching for a while what channels are available for Meego Harmattan app distribution. For Maemo5, it's pretty simple. For free app, there is the extras repository which works pretty well except that the app manager is slow. For paid app, there is Ovi Store, but the implementation is pretty lame. In case you haven't heard of, the frontend is a webpage that just downloads non-encrypted deb file for paid apps....

Gladly, the store is much improved in Harmattan. Harmattan has a dedicated Store client and so the integration is much better. The version available for N950 probably will not be the release version so I won't comment on the small details, but generally it provides a seamless experience for browsing/purchasing/installing apps. It's not hard to see that Nokia Store will be the default destination for N9 users to search for apps.

I was expecting there would be a channel similar to extras available very soon for Harmattan when I received N950. Unfortunately due to various issues, there is still nothing similar to Maemo5's extras repository for community app. This leaves Nokia Store as the one and only official channel for app distribution. As a result,  Stockona is currently undergoing Nokia QA. Let's see how long it takes before Stockona gets published...

Porting to Harmattan (3)

Some time ago, I decided that the only feasible way for Stockona to run well on Meego Harmattan was to re-work the UI using Qt components. The main reason was window focus issue that's very annoying to me. For whatever reason, the VKB in Harmattan doesn't work well with pure QML TextInput element. The focus becomes sticky once VKB is shown. I have tried to fill the un-used area on screen with MouseArea element to make de-focusing works like how it should be, but then sometimes when I switched in/out of task manager, the VKB popped up for no reason. I gave up debugging this and step-by-step changed the UI to Qt component. I was unsure if it would be worthwhile doing so, but in the end I think it was a correct decision. Qt component works great, and takes care of the UI design work so I have more time fixing some of the logic bugs instead of trying to put together graphic elements like what I did on Fremantle. I found the Sheet and Dialog (QueryDialog to be specific) elements to be especially handy for taking user inputs and displaying information to users.

The only disadvantage using Qt component is of course the portability becomes an issue for other platforms. Now I have been focusing on the Harmattan version and made several releases, the code base has become quite different to Fremantle's version in several areas. I am kind of lazy to merge the changes back and seriously hope the community project to make Qt component available on Fremantle will be working soon.



Wednesday, August 3, 2011

N950: What impress me most

* Disclaimer: User experience is based on pre-beta firmware on not-for-sale device.

What do I like the most about N950, specifically Meego Harmattan? It's definitely the swipe interface. At first, it takes some getting used to. Besides, N950 is not really designed with this interface in mind so there are things that could be done better (e.g. the gap between screen and frame is noticeable and the swipe is not as smooth as N9). But I quickly fall in love with the interface. Yes, there are times when I want to scroll but find I swipe into task manager. This is much easier to happen in landscape mode due to the limited vertical scrolling space, but in general, it's not frequent and in the case it happens, I can still easily go back to the app by a tap.

This is really a killer interface, and IMO the biggest selling point for N9. It is fluid and intuitive, and the interaction makes me feel the device is "alive." This is kind of like how iPhone was/is about - simple and beautiful interface that reacts to user command naturally. Android (3.0 is better than 2.0 but still a mess) feels pathetic in this regard, let alone the poor core interface of Windows Phone. I am pretty sure, most people will love this interface once they start using it.

Of course, there are still quirks and glitches since the software is pre-beta and Nokia is not Apple. And of course there is the dark cloud hanging over Meego Harmattan that the N9 is likely to be the only and last device running this OS. But hey, it's not like Nokia will never release software update. You see, people still buy new cars that are close to end-of-their-life-cycle. Not every Android receive sw update after two years. Even Apple drops sw update for earlier device after some time, so I wouldn't worry too much about all this "Nokia abandon Meego" drama. There is more important things to worry about, right?

Besides the swipe interface, the camera on N950 is really really good for its size. I am impressed by its quality and the UI again feels good. But I wish there were a dedicate camera button. Nokia tried too hard mimic Apple in this regard. Maybe Nokia or 3rd party developer can learn from Apple and make the volume key to become camera key at some point in the future.

Monday, July 25, 2011

Porting to Harmattan (2)

To recap, the issues I had earlier were:
1) VKB stays visible once launched.
2) App stays in landscape mode.
3) After a few launches, an empty toolbar showed up along the bottom of the screen and stayed there afterwards.

For (3), I found out it was due to setting the QDeclarativeView to showMaximized() instead of showFullScreen().

For (1), I couldn't figure out why TextInput element is not working probably. I tried changing to manually handling the focus, but still saw the same issue happening. In the end, I decided to apply a dirty trick. I simply set closeSoftwareInputPanel () method of TextInput elements when user clicks outside the TextInput fields, and further calling the method again when exiting the setting menu. Even with this ugly patch, flicking action on Stockona still sometimes invokes the VKB for no reasons.... again, the root cause is a mystery to me for now.

For (2), I have tried wrapping the QML into Qt components. At first, I tried wrapping my main QML page into a Page element, then push it into PageStackWindow. For whatever reasons, it didn't work. I then found out about the Window element. The documentation says it can wrap any QtObject and although the doc suggests not to use it directly, I found it worked for me.

The last thing I did today was changing the control button height so it's easier to click on them instead of clicking to the symbol list below.

At the end of the day, I made some progress but I am unhappy that I have little idea about the root causes of the various issues. Hopefully the community will figure out some commonly-good practices when using Qt components, and also the Qt documentation for Nokia's Qt components will improve with time.


PS - One thing worth noting is I found out it was super easy to set up N950 to connect to QtSDK by WLAN. Just fire the "SDK connection tool," then enter all the information in QtSDK and the deployment to device just works afterall. It greatly sped up the development time! (N900 probably supports this as well, but I remember you need to install some MADDE-related packages... I'm glad those packages are built into N950 by default.)

Friday, July 22, 2011

Porting to Harmattan (1)

Building the deb using QtSDK was pretty straightforward. All I did was install the experimental Harmattan components and removed stockona.pro.user so I could re-select targets.

However, the deployment was a little cumbersome. First, I need to change to root by:
devel-su, then type in password "rootme"

At first the system wouldn't install, later after some googling and try-n-err I found out it was due to me leaving the package manager running in the background. After installing the app, I could launch the app in terminal by the app name, without needing to pre-pend "run-standalone.sh" as in Maemo 5.

Then I found three blockers:
1) VKB stays visible once launched.
2) App stays in landscape mode.
3) After a few launches, an empty toolbar showed up along the bottom of the screen and stayed there afterwards.

I got the feeling that the software on N950 is a bit unstable because there are inconsistencies in the behaviors of Stockona. And since the camera app is not working on my unit, I decide to do a reflash and call it a day, or a night to be precise.

The good thing is, I found a bug in the app during the process.

Saturday, July 16, 2011

Introduction - How it started

Stockona is a stock quote app for Maemo5/Meego Harmarttan/Meego.

I had always wanted to develop something when I got my Nokia N900 (running Maemo 5) in early 2010. Unfortunately, the combination of GTK/Hildon/C and scratchbox development environment were too complicated for me to pick up so I never started. Time passed by and a lot of (bad) things happened in Nokia, but an important milestone came, and it was the release of QtSDK as the unifying dev tool for Nokia smartphones. Especially QML was touted as great tool to ease the pain of UI creation. It looked like Nokia finally started putting the pieces together, and then came the infamous Elopcypse on Feb 11, 2011.

I am no Nokia fan, in fact I don't like the brand. It was the openess and the deep linux root of Maemo 5 that attracted me to N900 instead of Google's Nexus. As a result, I wasn't bother by the news, just thinking I would never have a chance to touch this seemly wonderful toolset. But a few months passed, I read rumors about iPhone5 and started feeling it wouldn't be the phone that I had been hoping for. Meanwhile, I witnessed the wonderful things the Maemo community did to Maemo 5, and I started thinking maybe there's still a chance that I would buy a N9. I looked at the apps I used on Maemo 5, and thought what was lacking.... a really good stock quote app was one of them. Since I was a beginner to QT/QML, I spent several weeks to evaluate how hard it would be to develop such app. Thanks to referencing Tommi Laukkanen's wonderful apps, Twimgo and Newsflow, I was able to figure out the difficult network processing part and so the project started looking like it was feasible.

So my journey with QT/QML started in May.

Thanks to the power of QML+Javascript, the prototype was done rather fast. With the feedback from the Maemo community and the progress of two-month time, Stockona has grown a lot. Most of the improvements/features were done in QML, but I also started to use QT C++ more and more. As a result, my understanding to QT/QML also grows with experience. In the meantime, I was fortunate enough to get a  N950 (running Meego Harmarttan) from the Meego community. So I started this blog thinking I would like to share the QT/QML experience I learned (probably not so much from a professional developer's mind but from a end-user/amateur's mind), document the development of Stockona on Meego Harmattan, and talk about anything related to Qt/Meego/Open source model that are relevant to the my experience.

By the way, I haven't received my N950 yet.....