Showing posts with label Symbian. Show all posts
Showing posts with label Symbian. Show all posts

That Rabbit Game 1.2 is now available for Maemo 5

I've blogged about it already, and even showed some code during an Interview at Nokia World, but there have not been any releases of That Rabbit Game so far, mostly due to Ovi Store QA not understanding what Optification means and requesting that the version number of the application appears somewhere in the app UI (after 15 days in QA). I've made the requested changes, added scoring and pushed new releases (of version 1.2) for both Symbian and Maemo 5 to Ovi QA.

Until the game gets published on Ovi, I decided to release packages on the website so you can download and enjoy the game right away - and maybe even provide some feedback. Please don't mirror/redistribute the packages, but link directly to the website. Download That Rabbit Game for Maemo 5!

Controls are via accelerometer (to tilt the rabbit head left/right) and via touchscreen (tap to flap your wings - the longer you tap, the harder the wings flap). The goal is to lose 10 coins in 90 seconds by getting shot 10 times. After that, the next goal is to lose the 10 coins in as little time as possible. Yes, you control the rabbit head, and not the crosshairs.

Updates and changes will be announced via @thatrabbitgame on Twitter, so follow it and tell your friends. Enjoy!

The Qt promise and what Maemo 5 needs

(tl;dr: Nokia should provide updated Qt packages as official SSU for Maemo 5.) Before I start, here are some facts (correct me if I'm wrong):

  • The N900 runs the Maemo 5 operating system
  • Maemo 5 received some updates (the latest one being PR1.3)
  • We don't really expect PR1.4 to come out any time soon, if at all
  • The MeeGo Handset images from meego.com are inferior to Maemo 5 and not a replacement (and never will be)
  • The MeeGo operating system on the first Nokia MeeGo handset will have a proprietary UX and proprietary apps, and won't be available for the N900

In summary, it means: We are stuck with Maemo 5 on the N900. And that is a good thing! Lots of useful apps, a helpful community (if you subtract the trolls) and a polished OS. Sure, there's room for improvement, and lots of open bugs that should be fixed, but that's another issue (which will ideally be solved by open sourcing closed components with bugs that Nokia isn't interested in fixing anymore and by the Community SSU). This one is about Qt.

Two days ago, an e-mail was sent to maemo-community, proposing a "community service pack", which basically is a big pile of workarounds. Read my response for some initial thoughts.

When Qt arrived on Maemo 5, the promise was two-fold:

  • Write your apps in Qt and you're ready for MeeGo (apps written now will run on the platform released in the future)
  • Maemo 5 gets Qt support, so MeeGo apps will run on the N900 (apps written in the future will run on the platform released now)

It turns out that the first one will probably hold true (surely with QML, maybe even with QWidget), while the second one is doubtful, as Maemo 5 has only got Qt 4.7.0 through the official channels (PR1.3), with no real official update in sight. If you use QML, use QtQuickCompat as workaround ("Qt Qml plugin that reregisters all “Qt 4.7” types in the “QtQuick 1.0” namespace … useful if you’re forced to stay with 4.7.0 (e.g. on N900), but still want to use the new namespace.").

There is also a real bug (yes, a bug!) in Qt 4.7.0 on the N900, and the fix isn't released as update - it's a new package: libqt4-bearer-hotfix ("This is a hotfix for the broken ICD package in Qt 4.7.0. It can be removed once Qt mobility 1.1 is released."). Now, the proposed "Community service pack" would combine all these fixes into a single dependendable metapackage (yes, a new one). It becomes the "Unbreak my Qt" feature that every app developer has to depend on and specify in the packaging.

This is wrong! No developer targetting MeeGo who has not heard about Maemo 5 will go through all those ugly workarounds and spend a week fixing things up for Maemo 5 just so that the app works. Now imagine what would happen if the first MeeGo device also introduces such kludges once it falls out of its support life cycle. Or what if the problems on Symbian are similar, and developers have to special-case things there. Not only for Symbian^3, but also for S60v5? Fragmentation.

How to avoid fragmentation? Simple: Provide Qt as a "feature" with a quicker release cycle that can be updated every month if need be. Provide Qt updates also for operating systems that don't get updates for the OS anymore. Here's my proposal:

  • Provide SSU updates for Maemo 5 for Qt (and Qt Mobility) through official channels (that's the important part here!)
  • A new Qt (and Qt Mobility) release should be available on all platforms (Maemo 5, S60v5, Symbian^3, MeeGo) at the same time through official (end-user approved) channels
  • Apps targetting stores and repositories (Maemo Extras, Ovi Store, MeeGo Apps/Downloads) should be able to depend on the latest Qt (and Qt Mobility) version

Without that, you'll get fragmentation similar to Android: The 1.5, 1.6, 2.1 versions are similar to Qt 4.6, Qt 4.7.0 and Qt 4.7.1 (for example). Again, you don't need to update the OS, just update the framework - through official channels!

Nokia C5-03 announced, brings full connectivity on the cheap

There are two strange things about this upcoming launch of Nokia. We are talking about Nokia C5-03, a phone all set to be launched by Nokia by the end of November. First and foremost is that this one runs on Symbian 1 operating system. When Nokia itself ha launched devices based on Symbian 3, this Nokia C6-01 alike being launched with older version Symbian S60 5the edition is quite a disappointing proposition. Other strange thing is the complicated Nokia model numbering scheme that gets this phone a name that this one holds. Whatever, but Nokia C5-03 is all set to hit the Indian market most probably by end of November 2010 and is a Symbian^1 touch phone.

Nokia C5-03The phone is endowed with many more impressive features as the 5MP camera, Wi-Fi and GPS. The other features working in its favour are it's lightweight (it just weighs 93 grams), sleek dimensions (it measures 105.8 x 51.0 x 13.8 mm) and 3.2" nHD (360x640) resistive touchscreen. The 5MP camera (fixed-focus) of new Nokia C5-03 is awesome and clicks photos with real colours and sharp quality. It also comes pre-loaded with a 2GB microSD card in the box. There is Wi-Fi and GPS on-board along with Ovi Maps. The voice-guided navigation features comes free with the handset and makes it quite easy and enjoyable.

Nokia C5-03Nokia C5-03 is supported on quad-band GSM/GPRS/EDGE network besides support of a tri-band 3G network that gives good downloading speed 10.2Mbps on HSDPA and 2Mbps on HSUPA. There is a 1000mAh battery laid out in the handset that promises enough battery life of up to 25 days of standby and 11.5 hours of talk time. With use of Bluetooth headset, 19.5 hours and otherwise 35 hours of music playback can be supported by the battery of Nokia C5-03. The Nokia C5-03 is quite similar to Nokia C6-01 specifications-wise and hopefully will be as much sought after also.The Nokia C5-03 can be fetched at a price of Rs. 12,000 in India.

Qt: Write once, #ifdef everywhere?

Despite what the title of this post might suggest, I really like Qt. But as a developer, I also know that "write once, run everywhere" isn't realistic without writing some special-cased platform-specific code. Qt does take care of many platform-specific things, and I think it's the closest you can get to "write once, run everywhere" right now.

This post should serve two purposes: To provide a real-world example of what needs to be done in the code for the app to work on both Maemo 5 and Symbian^3 (with example code), and to get suggestions on what parts I could rewrite in a more platform-agnostic manner with existing APIs (so please comment if you are in the know!).

Here's the story: In early September, I've rewritten my game "That Rabbit Game" to use QGraphicsView on the N900, and in the last weeks, I've ported it to Symbian^3. I use the macro Q_OS_SYMBIAN to check for Symbian and Q_WS_MAEMO_5 to check for Fremantle. Here's the current main menu on a N900 and N8 (different screen resolutions and aspect ratios):

Qt modules: In the qmake project file, I can use linux-g++-maemo5 to add Maemo-specific configuration, and symbian for Symbian-specific settings. I use D-Bus module on Maemo, but obviously not on Symbian, so my project file contains something like this:

linux-g++-maemo5 {
QT += dbus
}

This is nice, because I only have to maintain one project file, and the block structure is very readable (and I can even use different Qt submodules for each platform).

Screen orientation: Symbian has auto-rotation for Qt apps by default, and Maemo 5 has landscape-only mode by default. For my game, portrait mode does not make sense, so I have to request landscape-only on Symbian (similarly, if I want auto-rotation everywhere, I have to request it on Maemo 5 and do nothing in Symbian). For this specific case, I need some libs in Symbian, so I add this to the project file:

symbian {
LIBS += -lcone -leikcore -lavkon
}

I also need to add this to the top of my main source file:

#ifdef Q_OS_SYMBIAN
#include <AknAppUi.h>
#endif

And finally, I have to copy'n'paste a code block into my main() function before I create the first window:

#ifdef Q_OS_SYMBIAN
CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
TRAPD(error,
if (appUi) {
// Lock application orientation into landscape
appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
}
);
#endif

It would be nice if Qt (or Qt Mobility?) has some generic API for this, where I just need to do something along the lines of QRotation::setMode(QRotation::LandscapeOnly); and let it take care of the platform-specific stuff.

Accelerated QGraphicsView: On Symbian^3, QGraphicsView is automatically accelerated via OpenVG (I think), but on Maemo 5, it can use OpenGL for this (but does not by default), so in the code where I create my QGraphicsView, I have to have this at the top:

#ifdef Q_WS_MAEMO_5
# include <QGLWidget>
#endif

And then somewhere down that file where I create the QGraphicsView, this code goes there:

#ifdef Q_WS_MAEMO_5
QGLWidget *glw = new QGLWidget(QGLFormat(QGL::DoubleBuffer));
view->setViewport(glw);
#endif

It's not that difficult, and is already cross-platform (on platforms where OpenGL is available), but maybe QGraphicsView can be OpenGL-accelerated on Maemo 5 by default. Maybe there is some non-obvious side effect that using an OpenGL viewport has that I'm not aware of, and that's why one has to do it manually.

Accelerometer readings: This might actually be a bug in Qt Mobility. For my game, I have to read the accelerometer's Y axis on Symbian, and its X axis on Maemo to determine the rotation for the same holding position of the device, so there's another platform-specific #ifdef there. Again, this will hopefully be fixed in a future release of Qt Mobility, and will most likely be fixed for MeeGo as well.

Task switcher: It's customary on Maemo to have a task switcher button in the upper left corner. There's no platform-agnostic way of going to the task switcher, so I needed to special-case it for Maemo 5, and have not bothered implementing it on Symbian^3 (suggestions welcome!). First, I need to include D-Bus headers for this (I've already mentioned how to request the D-Bus module in the qmake project file above) :

#if defined(Q_WS_MAEMO_5)
# include <QDBusConnection>
# include <QDBusMessage>
#endif

When I'm in the handler code where I need to do the actual task switching, I can utilize it to activate Maemo 5's task switcher:

#if defined(Q_WS_MAEMO_5)
QDBusConnection c = QDBusConnection::sessionBus();
QDBusMessage m = QDBusMessage::createSignal("/", "com.nokia.hildon_desktop", "exit_app_view");
c.send(m);
#endif

This is very much Maemo 5-specific, and will very likely not work on MeeGo Harmattan. Again, here it would be nice to have a cross-platform way of doing window management (in Qt or Qt Mobility?). I can imagine this being useful not only on handsets, but also on netbooks and tablets (from a MeeGo PoV). Again, trying to come up with pseudo-APIs here, QWindowManager::showTaskSwitcher(); could be a nice way to handle this in a cross-platform way, hiding platform-specific implementations. From what I've seen of MeeGo Touch, activating the task switcher there simply iconifies the window on the Desktop, so maybe if I would iconify my main window, it should activate the task switcher on Maemo 5 and Symbian. It does not work on Maemo 5 right now, though, and I haven't tested it on Symbian.

Screen resolution: This was (thanks to QGraphicsView) less of a problem than I thought it would be. Symbian^3 (or at least the N8) uses 640x360 as its resolution, and Maemo 5 uses 800x480. Maybe the MeeGo Harmattan device will use yet another resolution. I still configure my QGraphicsScene object manually via #ifdefs to get a good resolution, but the code could just measure the resolution and configure the scene as well. Here's what I use:

#if defined(Q_WS_MAEMO_5)
setSceneRect(0, 0, 800, 480);
#elif defined(Q_OS_SYMBIAN)
setSceneRect(0, 0, 640, 360);
#endif

I then use the sceneRect() of my scene to calculate a scale factor for all contents and call setScale() on all root items of the scene to scale the contents to the current screen size. You might have to take care of different aspect ratios on different devices, too - but it was unproblematic for my use case (the game) this time.

Previsões para os Sistemas Operacionais Mobile.

1) Pouca coisa vai mudar no mercado em 2010, vários fatores apontam para isso, sendo o principal é que os sistemas para celulares ainda está em duas infância e esse ano será o passo para adolescência, com a expectativa da recuperação econômica no mundo o mercado estará em expansão o que significa que poderá haver espaço para lucro de todos que estão no mercado.

2) Investimentos em jogos aumentará significativamente, assim como o desenvolvimento de hardware para isso, podem esperar isso da Nokia, Sony, Motorola, Apple.

3) Google manterá a parceria com a Motorola ou irá comprar a divisão de Celulares Toda? Provável que a parceria se mantenha até o lançamento do “Google Phone” e o sucesso irá determinar os rumos para 2011 da parceria e do sucesso do sistema Android.

4) Sony e LG, cedo ou tarde terão que sair de cima do muro e abraçar um sistema operacional para seus telefones e a possível compra da Motorola pelo Google pode ser o incentivo necessário para isso ocorrer no final de 2010.

Quanto a outros temas como Anatel, Impressa de TI e Redes Sociais, podemos esperar um ano rico já que é ano eleitoral, muita bobagem será dita ou feita e elas serão publicadas. Podemos esperar um ano de muitas risadas (ou lagrimas dependendo do ponto de vista). Assunto é que não vai faltar. Obrigado a todos aqueles que nos acompanharam em 2009.

Luiz Paulo Andrade

Imprensa Dormindo no Ponto



Imprensa está dormindo, assim como o Garfield está na foto. Ele pode, a imprensa não. Vejam as noticias abaixo.

Nokia planeja celular Linux e não venderá fábricas

Tanto no Terra quanto no G1, nem o título muda.

Ao limitar a um os aparelhos com Linux em 2010, Nokia reforça apoio ao Symbian

No Idg Now

O Fato é que essa informação já estava disponível nesse POST, de dezembro de 2008, algo que foi amplamente reiterada no Nokia Camp 09.

Estratégia de longo prazo da Nokia não mudou, o que prova que ela tem uma estratégia de longo prazo, ao contrario de outras companhias que mudam de S.O como se muda de roupa.

O Fenômeno não é novo, é simplesmente a busca insana do novo, que impede as pessoas de buscarem nos arquivos aquilo que elas falaram anteriormente.