About

mFabrik Blog is about mobile and web software development, open source and Linux. We tell exciting tales where business, technology, web and mobile convergence.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

QuasselDroid: Quassel for Android – cross-platform mobile IRC client

IRC (Internet Relay Chat, the description of IRC) is a chat protocol used by many open source and hacktivism projects for real-time discussion and support chat. I myself participate to Python and Plone discussion and now recently to Android chat on Freenode and IRCNet networks.

Quassel is a distributed IRC client. Distributed in the sense that it keeps your chat sessions on the server side: even if you get disconnected you won’t lose any chat messages. This is a nice feature for people who need to be constantly in touch with the communities.  For IRC veterans, Quassel is like the good ol’ screen + irssi combo, but with an user interface which does not require a degree in Perl scripting. This is a short tutorial for getting or building  the mobile version of Quassel, Quasseldroid for Android.

Everyone how has tried it knows that irssi or any terminal software suits very badly for mobile screens. QuasselDroid fixes this: it provides an user interface which is suitable even for touch screens. Also, with Quassel core on the server side, you do not need to worry about disconnections which often happen with mobile networks, With desktop Quassel and mobile QuasselDroid you should be able to seamlessly leave your desktop, go traveling whilst continuing the on-going dispute of the next most important internet thing with your on-line friends and foes.

This tutorial show how to get binary or source from Github and compile the project for your phone. Note that QuasselDroid is still in very early developing phase and the main purpose of this is to drive more development into QuasselDroid. Do not expect it to be ready for your specific use cases yet! Also, these instructions are tested only on Samsung Galaxy S with Android 2.2.

Quassel is originally based on Qt C++ libraries and uses Qt based serialization protocol to communicate between the server (your IRC session) and client (your phone). QuasselDroid implements Qt protocol from scratch in Java and does not use any Qt libraries on Android. There also existed a prior version which required a proxy server, but this has been fixed for now.

Getting and building QuasselDroid

Before proceeding you need

  • A server which allows you to run a background process with more than hundred megabytes of memory usage
  • Quassel core installed on the server side (this maintains your IRC session). Core itself comes with decent command-line help. If you get stuck ask help on #quassel channel @ freenode IRC network.
  • Preferable Quassal desktop client (Windows, OSX, Linux) for ircing from the desktop

Downloading pre-built binary

Note: there exists a pre-built Android binaries for non-Android hackers. Download QuasselDroid Android binary from here. You still need to set-up the server side core yourself.

Prerequisites for building and running QuasselDroid

This is the recommend method of installing QuasselDroid if you are looking for helping in QuasselDroid development. It is not that difficult, as Android tools are quite friendly for newcomers.

Compiling and running

Install Android SDK, Eclipse  Android plug-ins for Eclipse. Note this is several hundreds of megabytes worth of software, so be patient and entertain yourself with some cool music whilst downloading.

Install Quassel client, Quassel core and get yourself familiar with the noveau IRC experience.

Get code from Github:

git clone https://github.com/sandsmark/QuasselDroid

Open project in Eclipse. Start Eclipse, choose or create any empty directory as workspace of just choose the default one. Then choose File -> Import -> General -> Existing projects into Workspace. In Select Root Directory you need to choose a directory above Github checkout directory. Select QuasselDroid in Projects list (which is now refreshed after selecting root directory).

In this point I had to select the project, choose Project -> Clean from Eclipse menu (there were some errors popping up in Eclipse internal console).

Right click Project -> choose Run as -> Android application.

  • If your phone is connected via USB Eclipse will automatically build and install APK directly to your phone
  • If you do not have phone connected QuasselDroid will start in the emulator

Installing QuasselDroid

Creating a core entry

When QuasselDroid is run for the first time. press Android Menu key on the start-up screen(this was little hard to discover) and choose Manage cores. Now you need to configure quassel core for the server – for this process you should already have experience with Quassel desktop client.

SSL

Also, you might need to disable SSL support if you are running a core without SSL compiled in. Again, press Android Menu key, choose Preferences and uncheck SSL.

Debugging issues

When you run an issue and you can repeat it reliably with necessary log traces available, file a bug report on Github project page.

Android has a logging tool called LogCat, showing log output from emulator or device. You will see Android log output in Eclipse in LogCat view when

  • Emulator is running
  • A device is connected via USB, debug mode enabled (from system Settings menu)

Use Eclipse Window -> Show -> Debug perspective to see LogCat window if it’s hidden.

If you launch the application in Eclipse using Debug run (the bug icon) Eclipse will stop on the line where an uncaught Java exception is thrown. This is very useful for debugging crashing bugs (Android pops up force close dialog).

On the server side, you can see quasselcore output in stdout and see how the core reacts to client connection attempts.

Get developers  Subscribe mFabrik blog in a reader Follow me on Twitter

CodeSign error: a valid provisioning profile is required problem in XCode

The above error pop-ups when you try to build iPhone application for the device. It means that the provision name in XCode project settings does not match .provision file installed in XCode Organizer (device manager). Usually this happens when you have downloaded XCode project created by someone else.

It should be possible just to go to XCode -> Project -> Project settings and chose a valid code signing profile (Code signing -> Code signing identity drop down should have been populated from the choices available in XCode organizer). However, it seems that there is a bug and always changing this setting does not have effect. Based on reports, it looks XCode project setting updater is confused about something and does not update the setting correctly.

The hardcode workaround is to edit your XCode project .xcodeproj file manually. You do not need to close down XCode for this (it will automatically ask to reload after the file is saved). You may see duplicate entries of  XCBuildConfiguration. You need to hunt down one with old (incorrect) values and manually copy-paste in correct values. You can get the correct values from XCode organizer.

For example, I had to edit in :

	CODE_SIGN_IDENTITY = "iPhone Developer: Mikko Ohtamaa (XXXYYY)";
	"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Mikko Ohtamaa (XXXXYYY)";
...
                PROVISIONING_PROFILE = "7572BAC6-4F0C-46D3-B96F-XXXXXYYY";
	"PROVISIONING_PROFILE[sdk=iphoneos*]" = "7572BAC6-4F0C-46D3-B96F-XXXXXYYYY";

manually to the file, replacing the old values for these settings. Note that values may be in many lines.

Hope this helps someone.

Get developers  Subscribe mFabrik blog in a reader Follow me on Twitter

Developing and distributing QT applications for Nokia… not yet!

This information was posted to Phonegap Google groups also.

Next N900 release (PR1.2) will include QT 4 in the default install. It has been delayed due to various problems observed in the leaked beta.

Also, N8  will be the first device supporting Qt out of the box. It is not shipping yet.

Nokia Qt SDK should allow unified Qt apps for Symbian and Meego:

It is not yet possible to deploy Qt apps through OVI store, so targeting third party apps to Nokia Qt is kind of pointless. If you need to develop to Nokia using a web framework, don’t rely on native QT Webkit, but target to Nokia WRT  instead.

Nokia bought Qt in January 2008. It has taken over two years to ship the first Qt enabled mobile phone. Meanwhile, Apple has released App Store and risen to be the leading smartphone provider with its iPhone…. talk about slow development and the lack of leadership. So the hype around “QT will solve everything” is still just hype… they still don’t have nothing solid out there.

Get developers  Subscribe mFabrik blog in a reader Follow me on Twitter

SDK released – Python in iPhone?

I just read waffle’s blog entry about iPhone SDK release. Looks like Objective C is the only supported language by default (I am just downloading SDK).The comments speculated that embedding Python is not possible due to size constraints. Bollocks I say =) Python for Series 60 phones is 500 kb download without trimming. It’s less than the size of HTML page you are viewing now – RAM footprint is even smaller) If Series 60 phones, which have much more modest hardware specifications, can run Python it shouldn’t be a problem for iPhones either.

Why Apple didn’t add additional language support by default? Well they seem to have their hands full to get SDK out at all (delays) so we shouldn’t expect to have perfect set in 1.0 release.

Now, who wants start a porting project with me? ;)