Wednesday, October 31, 2012

Auto-refresh and mosquitto

In general, auto-refresh was something I didn't want to include - ever! It would mean that even without user intervention qgvdial burns up the CPU. I've hated that about any phone app.

The "mosquitto" method pushes all the polling to a server away from the phone. The server then notifies the phone when there is anything to update. The phone doesn't do anything more than listen on a socket, thus increasing battery life considerably.

I've got the mosquitto method up and running on my phone for the last year or so and the server and the entire flow works out pretty well.
The battery life hasn't suffered at all and I still get updates within 30 seconds of a phone call or text.

However, I've not gotten around to making my mosquitto server publicly available - mostly because it would involve pulling the users credentials into the server - and to do that I need to take reasonable precautions to secure the server.
This takes time and money, both of which I don't have.

I'm not ready to make qgvdial a paid service as yet so the mosquitto method is right now something the end-user will have to setup on their own.

Friday, December 9, 2011

Hold it, breathe, reflect and plan

I'm not happy with qvdial. It doesn't "just work". Its UI is barely usable. The phone integration is horrible.
The debugging is barely functional, the artwork is non-existent, there is no branding, the icons are worse than amateurish, users need to do so much to submit an error report...
It's patchwork on patchwork and it does not scale at all.

Time for a rework.
But first some links to help with the new design:
Extended panic codes on Symbian.
Offline storage API for QML.

Friday, September 2, 2011

Harmattan build

qgvdial is slowly being made into a full fledged Harmattan application. However, porting to Harmattan wasn't as simple as setting up the build environment and recompiling (even though it's almost all Qt).
Just compile and run *did* work on the n950, but it wasn't a great experience:
1. The main window refused to rotate and was stuck in landscape mode.
2. Any edit box used to pop up the Software Input Panel and that never disappeared.
3. The phone's Dbus services for phone control could not be accessed.
4. qgvdial could not publish it's own Dbus service

Besides all this, compiling qgvdial in Qt SDK consistently fails with a gcc segfault!!

The Nokia help files are here

To summarize, here's all that I had to do to set up a working build system:
1. Create an Ubuntu 32 bit server virtual machine.
2. Download the python install script from the Nokia Harmattan developer website into the server vm. I did this with

3. chmod +x the script, then sudo run it.
4. Log out of the server, then log in again. This step is necessary for scratchbox changes to be made available to your login.
5. /scratchbox/login and you're off!

Now to the changes needed to make it work fairly well on the n950:
1. Rotation: All Harmattan apps must be housed within a Page in a PageStack. I eventually figured this out after reading this thread. Since I want to keep qgvdial as cross platform as possible, I had to make the Main.qml an Item in a Page that was pushed into the pageStack.
Note that "pageStack" is the name of the variant that holds all the Pages in a PageStack. It is not the id of the PageStack.
2. Software input panel: I've not gotten through this completely, but it's possible to trap keys and for keys like "Enter", call TextInput::closeSoftwareInputPanel()
3. Read up on "Aegis": the security framework used by Harmattan.

Thursday, March 31, 2011

QtQuick 1.1 on n900

Fought a lot with making QtQuick work everywhere today.
I am too tired to explain, so I'm just going to post links and hope it makes sense.

Thread that has the announcement for the port of QtMobility 1.1 to n900.
This link explain in greater detail how to install to your development systems.

Wednesday, March 16, 2011

Symbian s^3 and Qt rock

I've finally got qgvdial working on Symbian to the point where it might actually be a candidate to send out on to Ovi.
I've tested qgvdial only on the Nokia C7, but from what I understand, that should mean that it works on all Symbian s^3 phones.

If you're the sort who likes to live on the bleeding edge, then head on over to the downloads list and look for the one that says "Symbian s^3. Testing only".

This sis file may not last out there for as long as you'd hope. I keep updating it as I add bug fixes. It comes and goes as I do this. It will break stuff.
You have been warned.

Thursday, March 10, 2011

Symbian^3 and the Ovi store.

I've fought long and hard at figuring out how to make my app work on Symbian. Any Symbian.
It was just recently that I found out about the entire signing side of creating Symbian apps - thanks in part to the new Nokia SDK that has inbuilt Symbian build, sign, deploy and debug.

As I started reading more and more of this entire process, I got to learn about Symbian "target capabilities". These keys influence what your Symbian app can or cannot do.
For example, NetworkServices is necessary to be able to do *any* network communication - either you doing sockets or QtWebkit doing any sockets.

But that's not all. What the documentation does not state and what I found out after loooooong long hours of wasting my time searching Google, was that the following combination "Self sign + capability=NetworkServices + QtWebkit classes" can provide me with only http browsing.
If I want to do *any* https / secure sockets / ssl communication, then the sis file MUST have a valid signature. It cannot be self-signed.

So now what? How do I go about getting it signed?
The price for a signing certificate is about $250 / year. That may be affordable, however, Verisign (or any other trusted authority) will not provide a certificate unless they are able to validate the existence and the legitimacy of *your company*.
Which mean I need to have a company (?!?) Yikes.

..... or I can go the easy route and sign up with the Ovi store, which signs sis files that are published to the Ovi store for free.

Guess how I'll be signing qgvdial and where they will be? :D

Friday, March 4, 2011

C Linking is so much simpler

To make mosquitto support work in Windows, I rebuilt the mosquitto source to get mosquittopp.dll
All fine thus far, but then actually using it became a massive pain. The name mangling just didn't match up even though I was using the same compiler.
I gave up and started using the base C api and created my cpp wrapper around it based on the mosquittopp source.

Now it works for Linux, Windows, Maemo.
Time to start hacking at it on Symbian.