Author Archives: Kamel Lajili

This is the end…

I am sorry, this blog has ended!

I left BlackBerry since september 2014 and joined Volkswagen, where I am helping out developing cool mobile services for VW cars of the next generation…

If you like to keep in touch, check my profile at:

All the very best to all Mobile Developers I met around the world and thank you for the exceptional times we spent together bringing up BlackBerry 10.

Kamel Lajili

Make your App Social with BBM

Hier ist @leaschnherr, eine Studentin die mit @Klajili im Tech Center Bochum arbeitet. Ich werde euch heute zeigen wie man eine App auf eine sehr einfache Art und Weise bei BBM registriert. Das hilft seine App zu verbreiten und die Downloadzahlen zu erhöhen.

Screen Shot 2013-10-31 at 5.05.45 PMDas erste was getan werden muss, ist die Erlaubnis in der bar-descriptor.xml Datei zu setzten. Wenn du Momentics benutzt, kannst du diese einfach durch einen Doppelklick öffnen und unter dem Application Tab findest du alle Permissions.

Als nächstes muss noch die BBM Library zum Projekt hinzugefügt werden, z. b. indem die Zeile LIBS += -lbbplatformbbm  in die .pro Datei kopiert wird. Alternativ kann man auch auf das Projekt rechtsklicken und Project->Configure->Add Library…  auswählen. Dann auf Standard BlackBerry platform library und als nächstes nach ”libbbplatformbbm” suchen. Wähle diese Library und klicke auf finish. Das ändert automatisch die .pri Datei.

Um BBM zu nutzen braucht man eine UUID. Diese wird benötigt, um deine App bei BBM zu identifizieren. So eine bekommst du z. B. hier: Jede App braucht ihre eigene einzigartige UUID und es sollte die gleiche verwendet werden, wenn eine neue Version der App veröffentlicht wird.

Los gehts es mit main.cpp:

wie du siehst werden nur einige Zeilen benötigt. Neben der UUID kann eine einfache GUI erzeugt werden um den Benutzer zu zeigen was passiert. Nun werden nur noch drei weitere Zeilen benötigt. Das Erstellen der Klasse Registration und der Klasse Profile (Diese Klasse wird später benötigt um das Profil anzuzeigen). Die dritte Zeile verbindet das Signal der Registration Klasse (dieses wird gesendet, wenn die Registrierung erfolgreich war) und das Slot welches die nächste Page anzeigt.

Die Klasse Registration  registriert die App bei BBM. Dieser Schritt wird nur beim ersten Ausführen der App durchgeführt. Somit muss im erste Teil gecheckt werden in welchem Zustand sich die App befindet. Hierfür wir die Klasse Context und ihr Objekt  RegistrationState verwendet.  RegistrationState beinhaltet ein Enum mit 15 möglichen Zuständen (Die möglichen Zustände sind hier dokumentiert). In der App muss der aktuelle Zustand herausgefunden werden und abhängig von diesem die App registriert werden. Hier wurde das über eine switch-case-Anweisung gemacht, allerdings nicht alle möglichen Zustände berücksichtigt. Stattdessen wurde eine qDebug Ausgabe verwendet, um den Registrierungprozess zu verfolgen und, für den Fall, zusehen, was schief gegangen ist.

Da der Zustand sich mehrmals ändern kann muss registrationStatus() als Slot mit dem Signal registerStateUpdated() der Context Klasse verbunden werden.

Um den Prozess zu starten muss registrationStatus() einmal aufgerufen werden. Jetzt wird die App entweder die Registrierung anfordern oder ein Signal aussenden, was anzeigt, dass sie bereits registriert ist. Die Dritte Möglichkeit ist, dass ein Fehler aufgetreten ist. In diesem Fall muss die Konsolenausgabe gelesen werden um den Fehler zu beseitigen. Wenn alles gut läuft zeigt BBM eine Toast Nachricht an.


Make your App Social with BBM

This is @leaschnherr, a student working in the Tech Center Bochum with @Klajili. Happy to show you today how to register your app to BBM in a very simple way. This will help your app getting viral and increase the downloads considerably.

Screen Shot 2013-10-31 at 5.05.45 PM

First thing you need to do is to set the permission for BlackBerry Messenger in your app bar-descriptor.xml file. If you use momentics, you can double click on it and go to the Application tab to see and set the permission.

Second you will need to add the BBM platform libraries to your project by adding the line LIBS += -lbbplatformbbm in the .pro file or rigth click on your Project->Configure->Add Library… . Choose Standard BlackBerry platform library, click next an search for “libbbplatformbbm”. Select this library an click finish. This will modifiy your .pri file.

To use BBM you need an UUID. This is needed to identify your app to BBM. You can for example get one at: Every app needs its own unique UUID and you should use the same UUID when you release a new version of your app.

Let’s modify main.cpp first:

As you can see, just few lines of code are required. Besides the UUID you can show a GUI to indicate the user what is happening. Now only three other lines are needed. The creation of the Registration class and Profile class (This class will be filled later to show the profile). The third line connects the signal of the Registration class (which is emitted when registration is ready) and the slot which shows the next page.

The class Registration registers the app to BBM. This step is only required when you start the app for the first time. So the first part of the code is to check in which state the app is. For this the class Context and its property RegistrationState is used. RegistrationState concludes an enum with 15 possible states of your app (The possible states are documented here). In your code you have to check the current state of your app and possibly, according to your state, request to register your app. Here it is done by a method with a switch case instruction, but does not considering all possible states. Instead a qDebug output is used, to follow the registration process and see, in case, what went wrong.

Because the state could switch several times you have to connect registrationStatus() as slot  with the signal registerStateUpdated() from the Context class.

To kick off registration registrationStatus() has to be called at least one time. Either the app is now request to register or a signal emits to indicate, that the app is already registered. The third option is that an error is occurred. In this case read the state in your console to fix the error. When everything went right, BBM shows a Toast .


This Toast appears automatically after registration

Welcome BlackBerry Developer Group Ruhr in Bochum/Germany

bbdevgrp_bochum1Congratulations to Andreas (@Andi_Gabel) and Kai ( ) who really did an awesome and professional job preparing the first meet up of the BlackBerry Developer Group Ruhr in Bochum/Germany.  They kicked off the event by welcoming the around 15 guys and introducing themselves to the crowd. Then gave me the stage to talk about BlackBerry 10. I gave an overview on our whole eco-system and did some demo to show the BlackBerry 10 user experience because surprisingly some of the attendees didn’t yet get a chance to play a round with one of our awesome BlackBerry 10 devices but very keen to learn how to build apps for our platform.

bbdevgrp_bochum2I really was impressed by some of the attendees like Jörg, Marcel and Michael who took a long journey of 60+ KM to attend our meet-up. Champion was Georg (@gpheheise) who came along the way down from Hamburg to attend. He is by the way the lead of the BlackBerry Developer Group in north Germany and didn’t want to miss that special event of launching a new developer group in Germany.

I really enjoyed the evening with those BlackBerry Fans and I am looking forward to be present at the upcoming meetings of the group, at least when I am around in my home city Bochum.


Thanks Andreas, Thanks Kai and good luck leading the group.


If you wish to get in touch here you go:  | @BBDevRuhr  |




Cascades Workshop in Muscat/Oman

It was a gently recommendation by my colleague Nafeesa from the BlackBerry® Academic Program to drive this one day Cascades workshop organized by the IT-Authority in Muscat/Oman for University stuff and others. So I used the opportunity to be in the region for the KSA Jam and continued the journey to Oman.

Mrs Azhaar from the ITA did a great job to set up everything for the workshop: The location, the invitations, the setup at the Venue, etc… We started quite early in the morning with around 15 attendees, all of them equipped  with laptops and 2 of them even with a BlackBerry 10 device. After an introduction to BlackBerry 10 including a demo on the most important features, we started by installing the SDK, the Simulator, etc… It took quite long time until everyone was setup. Unfortunately the Network connection was not so good and thus I zipped my Momentics folder and distributed it to them. Which was a bit challenging for the laptops to get it unzipped. But all went well. The setup is an important step of getting started and I wanted to make sure they all run out with a working simple app and that was reached. I introduced them to topics like localization, active covers, List management etc… I planned to talk about the invocation framework and integrate the camera in the sample we built but that had to be a homework for attendees as they all received my presentation and the demo projects.

I met a small team from the private Technology university and we talked about building the first BlackBerry dev group in Oman. They wanted to check with their Students and come back to me. I will be very happy to get that setup as by then we will have 6 Communities around the Middle East.

muscat_omanThank you very much Mrs Azhaar and your ITA organization for this opportunity. Thanks to all the participants for a nice Day in Muscat. I am looking forward to connect with you all soon and plan our next engagement in your lovely country.


A big thanks to an amazing BlackBerry Developer Group at the King Saud University in Riyadh/KSA

I met Abdullah and Mhammed at the first BB10Jam we did in Riyadh on March 2013 and they showed at that time great interest to build the first BlackBerry Developer Group in KSA inside the Future Technology Club at the King Saud University and they promised me at that time if we do another Jam we will reach out to a lot more young developers looking forward to learn how to develop Apps on our BlackBerry 10 Platform. And so we did. Abdullah and Mhammed with the help of few other guys (see them on the picture below) were so smart to get almost everything organized by their own and kept us always updated.

bb10jam_ksu1On Sep 17th we kicked off the event. The morning sessions were intended for those not familiar with the BlackBerry 10 OS. We demoed the OS and talked about the SW architecture etc… In the afternoon sessions we dived deeper in the SDK details with hands-on cascades demos. A lot of the devs had their Laptops and their BlackBerry 10 devices with them and they tried to follow with the demos. My colleague Lukasz (@DDLUCK) was unfortunately not able to travel with me. He did his HTML5/WebWorks introduction session remotely on WebEx and it went quite well.

My colleague Rami (the KSA Business Development manager) and myself presented facts on the opportunity BlackBerry World offers to developers in this particular region and worldwide. We used a mixture of Arabic and English during the presentations and I believe that was well received. Few of the attendees asked questions in Arabic and English too.

We had few Q5 to seed to the devs and we combined that with a question and answer session. It was great fun. It was a fantastic Jam and I am looking forward to organize a Hackathon with the the BlackBerry developer Group soon, as next step in our engagement plan in the KSA region.

bb10jam_ksu2Again big thanks to Abdalla, Mhammed, Gousai and all the others you see on the picture.

looking forward to seeing you soon Inshalla!



Attending the Mobile Tech Conference in Berlin/Germany

On Sep 3rd & 4th my colleague @DDLUK and me as well as my awesome student @Andi_Gabel attended the Mobile Tech Conference in Berlin/Germany. We offered in total three sessions:

@DDLUC and @KLAJILI at the MTC2013 in Berlin/GermanyOur sessions were fairly visited by 20…30 developers. Also our stand had uninterruptedly developers traffic. A lot of developers in Germany still didn’t get a chance to try out BlackBerry 10 and feel the awesomeness of the devices and the power of the operating system. When we showed it to them they were amazed about the BlackBerry 10 experience as well as how mature and diverse the App Development Eco-System that we offer. Many also expressed uncertainty around BlackBerry because of the recent announcements of BlackBerry seeking for strategic alliances. I understand that of course and tried to make those devs aware of few facts that could convince them coming to our platform sooner than later:

  • BlackBerry 10 follows open industry standards and an open source approach with its big variety of development technologies.
  • The relatively small amount of 120000 apps in our store BlackBerry World compared to the other App stores is for developers a chance because of less competition and eager BlackBerry 10 users to download and buy applications.
  • BlackBerry is a star in a lot of countries and BlackBerry World has almost no geographical limits for developers.

All in all it was a good conference for us and we really enjoyed to meet a lot of known and new developers. Looking forward to attend MTC2014 in Munich in coming spring.



Thank you Amman for a successful BlackBerry10 Jam


The Gaming Lab is a royal institution with the purpose of educating young Jordanian developers on programming and specifically games programming. Maysalward is a company specialized on mobile development. Both are located in the Jordon IT hub in Amman. They reached out to us on several occasions asking for a BlackBerry 10 event and so we agreed on this date few months ago. Originally the management of the Games Lab were so generous and offered us to host the event at their premises but due to the huge number of subscription (200), we shifted it to the Intercontinental hotel. A nice location. I believe some 120 devs showed up. I was surprised about the amount of women developers of the audience (probably 30%). Really great.

bb10jam_ammanMy colleague Mike from Dubai did an awesome talk about the BlackBerry 10 Experience with a lot of demos on his Z10. Then I did a presentation on the BlackBerry 10 Architecture. Then we wantd to tell the local devs  why they should care about apps development for BlackBerry. And for that I didn’t find better stuff then the 5 min opening keynote video from my VP Alec Sounders in Orlando at jam Americas 2 weeks ago… After that my colleague @labukhait from Dubai and our friend Ziad Al Masri a  marketing manager at Maysalward put more deviance on the opportunities BlackBerry offers for Apss devs. Ziad also volunteered to create and manage the first BlackBerry user group in Jordan. Awesome, Thank you and Welcome BlackBerry dev group Amman to the family of all developer groups at BlackBerry.

The afternoon started with a general session on developing for BlackBerry (Signing, Sandbox, UI guidelines, Monetization,  and all of that) Then we video streamed my colleague @ BlackBerryLuca from the UK to do the HTML5 session and luckily all went very well. Although only few developers showed up their hands  when Luca asked “Who is web developer?” almost none left the room during the session. We closed with the NDK session with a bit of cascades live coding as well as presenting the BlackBerry Android runtime.

It was a successful event and we will build on this for  the future to stay connected to the nice devs there. It appears to me Jordan like Egypt and Tunisia is a good region to find talented developers in the Middle East.

Thank you Amman for a great jam day


Devs in Tunisa & Egypt, come and jam with us soon

The BlackBerry 10 Jam Africa Tour has started. The next stops will be in Tunis on June 14th, Cairo on June 18th and then Alexandria on June 19th.

This is a personal invitation in Arabic to all our beloved devs in both countries to come and jam with us soon:


If you didn’t register yet, please do now:


Cairo & Alexandria:

See you soon


15 year old developed a BlackBerry 10 app in our Tech Center Bochum

Kerem Bakacak a 15 year old student developed a BlackBerry 10 application using Cascades within only 2 weeks during his internship at BlackBerry Tech Center Bochum. All german students in the 9th grade have to do a two week internship during the school year and we were happy to welcome Kerem. He attends a computer science class in his school where he learns programming paradigms with Visual Basic, but he has never programmed in QML or C++ before. So after getting used to the syntax we guided him developing his application step by step and it is now published on BlackBerry World. Fantastic!