Programming with the new BB10

The all new Blackberry Z10

On January 30th at events all over the world, RIM introduced Blackberry 10 its brand new mobile operating system that is designed to take the fight to iOS and Android.

Blackberry 10 and its new handset, the Z10 were well received but blogs, websites and twitter comments can only get you so far; luckily I attended Blackberry Jam Europe 2013 in Amsterdam to get a closer look at the platform and its developer community.  Over two days, hundreds of developers met at the sold out RAI convention centre to discover new features, case studies and trends introduced with Blackberrys latest mobile platform..

As I watched the keynotes and attended various break out sessions I was motivated by the potential of this new technology, so I decided to program a simple application for Blackberry 10. This post explains a little bit about the experience, describing the application and some parts of the code. As always, you can find the source code in the GitHub account, released with Apache 2.0.

SmartSeq

The project was a simple game, called SmartSeq. The game challenges the user with a sequence of letters, letting the user to guess the intrinsic pattern. As part of the game, I programmed three different sequences:

  • Natural sequence: abcdefghi…..
  • Even sequence: acegik….
  • Fibonacci sequence: aabceh….

Nonetheless it can be extended very easily with other mathematical sequences. In addition, to be more complete, the game should include offline storage of the scores, and some social integration. However, the initial release is enough to evaluate the development environment for BlackBerry 10.

Programming UI with Cascades

Cascades is a new framework, based on Native SDK and using Qt Libraries. The QNX Momentics IDE allows developers to create great user interfaces, highly integrated with C++ code. User Interfaces are programmed using QML, standing for Qt Modeling Language. Basic UI looks like this:

 import bb.cascades 1.0

// creates one page with a label

Page {

// Binding with c++ code   property alias sequenceText:     sequence.text

// Basic container declaration   Container{

layout: StackLayout {

{     horizontalAlignment: HorizontalAlignment.Fill     verticalAlignment: VerticalAlignment.Fill

}}

You can take a look of the whole code here. Basically, the user interface includes some labels for information output and two input fields: a text field and a button. You have an UI diagram below:

It is worth mentioning the way Cascades binds QML objects with C++ code,  fields are defined in QML by simply adding references in the QML file:

property alias sequenceText: sequence.text property alias scoreText: score.text property alias clueText: clue.text property alias answerText: answer.text property alias answerEnable: answer.enabled

Then, you can read / write values from these fields from C++ simply using the following code:

 _root->setProperty(“clueText”,_clue_format.arg(initialSeq));

_root->setProperty(“sequenceText”,_sequence);

_root->setProperty(“scoreText”,QString(“%1 pts”).arg(_score));

To publish variables/objects in C++ code is also quite simple and to make them accessible from QML you only have to code the following:

// create scene document from main.qml asset

// set parent to created document to ensure it exists for the whole application lifetime QmlDocument *qml = QmlDocument::create(“asset:///main.qml”).parent(this);

// create root object for the UI _root = qml->createRootObject(); qml->setContextProperty(“SmartSeq”,this);

Logic with pure C++

The underlying logic of BlackBerry 10 apps C++, our example game is pretty simple and you can view the declaration on SmarSeq.hpp . The class diagram is below:

Finally, the three methods from SmartSeq.cpp

  • SmartSeq::startGame
  • SmartSeq::updateGame
  • SmartSeq::resetGUI

implement the dynamic behaviour of the game. As you can see, if you would like to extend the game, only have to implement the virtual class Game with another funny sequence.

Conclusions

Honestly, I have found the new Blackberry 10 framework to be very interesting, although I must confess that my mother programming language is C++, so there are many common ideas, which are part of my developer skills. However, for most  mobile developers, coming mainly from existing platforms and web programming, the C++ nature of Blackberry 10 can create a high entry barrier to the platform. Fortunately Blackberry is aware of this and are working with PhoneGap, Appcelarator to enable easy cross plaform porting and have enabled Android developers to use their existing apps on the platform.

In any case, the documentation, code snippets and IDE (an Eclipse customised) are very appealing. In addition, QNX is a real operating system used on a variety of different devices, not just mobile and so does without many of the limitation you can find in other customized mobile platforms. My feelings are that all of this could help Blackberry to engage an even bigger developer community. My only concern is that you will need to pay a VMware Fusion license to use the BB10 simulator. Even though it is cheap, it introduces an unnecessary entry barrier for developers. However, perhaps that is precisely what Blackberry is looking for: developers who are willing to invest in the platform.

So in closing, congratulations to the Blackberry 10 team, you have created a flexible mobile platform that is much easier to develop for, in short you have done a very good job.

Keon & Peak, two developer preview devices for FirefoxOS

As you know 2013 is the year of FirefoxOS, and today marks the next stage in the open web revolution as we’re happy to announce the launch of two FirefoxOS Developer devices by Geekphone, Keon and Peak, to enable developers to get access to a FirefoxOS device to help them create beautiful apps for the open web.

Keon

Keon is a light and powerful device that is a great FirefoxOS device featuring a 3.5 inch screen, a 1 ghz CPU and a fun orange casing.

Peak

Peak is designed to bring cutting edge specifications such as a 4.3 qHD screen, 8MP camera and a dual core CPU to FirefoxOS and give developers a glimpse at the future in a sleek white case.

With these two devices available to developers, we think that FirefoxOS is well on its way to becoming a world changing mobile platform.

If you’re interested in developing for FirefoxOS, why not attend one of the upcoming FirefoxOS App days! At over 20 locations worldwide ranging from London, Berlin and Beijing to Bogota and Seoul web developers are invited to come together and learn how to transfer their existing skills to make an App for FirefoxOS! Firefox OS App days launch on 19 January and continue through 2 February, with the majority of the events taking place on 26 January. This wiki page has a master list of all the events and their registration forms, so find the App Day nearest you and register. (N.B. Venue capacities vary, but most are limited to 100 attendees so do not delay.)

At each of the events you’ll learn all about FirefoxOS, how to develop for it and have Mozilla enthusiasts on hand to help out and answer all of your questions. It’s a great opportunity to bring any HTML5 app you’ve been working on to show fellow enthusiasts, get feedback or recruit co-developers!

But you don’t have to wait to start learning about FirefoxOS, we’ve collated a list of handy links to give you everything you need to know to get started!

Firefox OS Simulator
Hacking Firefox OS
Firefox OS Docs
Firefox Apps Docs
Firefox Marketplace
Developer Hub

Representatives from BlueVia will be attending the London event on the 26th January but events are also held in other Telefonica territories including MadridBarcelonaBerlinBogataBuenos Aires and Sao Paulo. We’re looking forward to seeing you all there!

From creativity to business

We’ll be at Innovation Day at the Autonomous University of Madrid. During our session, Developing Apps: From Creativity to Business, you’ll learn the entire process of creating an app, from idea to market.

The session will be run by of Juan Antonio Cortés, creator of RedTappe, Jorge Izquierdo, the developer behind the Showy app, and Oscar Hormigos, creator of The App Date. Andrés Leonardo Martínez from BlueVia will also be in attendance to give a hands-on demo of Firefox OS and the Mozilla Marketplace, due to be launched in 2013.

Details of the day can be found right here.

This event is part of the BlueVia Mobile Applications Workshop, which starts today 26 and lasts until 30 November in the same university and is now in its third year. This year, all attendees will get the chance to win an iPod Touch.

Today in the opening session we’ll be giving a rundown of all the latest news from BlueVia. Keen to attend? Register here. Spaces are limited!

We hope to see you there.

Winning social game inspired by Highlander & loads of code from App Circus

Frequent readers of this blog will know about BlueVia’s involvement with App Circus 2012 and last week the circus rolled into Madrid where, besides the typical showcase of applications, we had a workshop on how to deploy a Python application using BlueVia APIs on Instant Servers. Who needs Lions and Tigers when you have Pythons at the Circus!

Ten entrepreneurs and development companies pitched their applications in a lecture theatre at the Universidad Rey Juan Carlos, filled to the brim with their peers and industry experts. Among the finalists we were presented with a true cross section of the app store: games, social media, employment, photography, sport, social inclusion and even port management. It’s certainly clear that apps are here to make our life easier.

The winner of this round was ‘The One-Survive the Game’, a social game based on the movie Highlander (of course there can be only one), which alerts you when an immortal is nearby, vibrating, calling you to engage in a sword fight with your rival for the prize. Not only did this app win the jury’s vote, but – judging by the applause – was clearly the favourite with the audience. The app will be a finalist at the Mobile Premier Awards in February 2013 and available in the App Store later this month.

As is normal at AppCircus developers then attended the workshops this time hosted by our very own Borja Guardiola, Head of BlueVia Portal. Borja spoke for an hour on how to deploy a Python application that pulls our APIs and stays in Instant Servers. You can find Borja’s full presentation on Slideshare and the sample code in Gitghub. It’s deployed and working both in Heroku and Instant Servers. The Acens TV guys were also with us and did a video summary of the event, you can find it here.

If you were there and want to find yourself in the pictures we took, visit our Facebook album.

 

App Circus Madrid: time to showcase and code!

The next edition of App Circus Madrid is coming to town on the 8th of November and we don’t want to miss out on this opportunity to find new innovative apps and meet with developers for some good coding time.

How will the event run? Firstly, there will be a showcase of leading applications we already know about, each competing to be chosen as this year’s winner and become a finalist for the Mobile Premier Awards in Barcelona, next February 2013.

But the most interesting part of this year’s App Circus is the workshops. Do you want to programme with Phyton? Would you like to deploy your app in Heroku? You can learn how to do both with BlueVia in just an hour or less! Borja Guardiola, Product Manager in BlueVia, will be demoing live, using our APIs to show you how to monetize your applications.

Better yet, the attendees to our workshop will get one month’s free access to Instant Servers, the recently launched virtual servers of Telefonica and Acens, where you can develop new mobile applications as well as run more traditional applications and processes.

You can sign up for the workshop here and, if you’re interested in trying our cloud based Instant Servers, get in touch by email or in our Spanish twitter account @bluevia_es.

BlueVia runs special workshop with winners of OpenApp 2012

Last Wednesday, in District C, BlueVia ran a special workshop for the winners of OpenApp 2012. BlueVia’s team has been supporting OpenApp since the first edition of the contest and it is always great to meet up with some of the best entrepreneurs from Argentina.

This year OpenApp challenged entrepreneurs, web designers and marketers to develop applications for SMEs, mobile apps and educational or entertainments applications. More than 3000 proposals were evaluated across the country and finally 15 projects have been selected.

The winners of the current edition travelled to Spain, visiting District C in Madrid and Telefonica PDI premises in Barcelona. During this visit, different activities had been planned in order to improve their innovation skills and business contacts. Innovation leaders from Telefonica introduced the latest products and as part of these activities workshops were planned about BlueVia and D2B, and the possibilities of HTML5 for development of mobile application.

Andres L. Martinez, developer program engineer at Telefonica Digital, led the workshop. Beside some insights about the NaaS & cloud strategy, communication & messaging platforms, mobile payment solutions and the new mobile operating system based on HTML5, he gathered feedback and experiences from the entrepreneurs attending the workshop.

Many of the attendees found Telefonica technologies very interesting, and we have now planned speed dating with them to figure out how to integrate the Telefonica’s solutions in their very own projects.

Once again, BlueVia had an amazing experience with OpenApp and we are looking forward the next edition.

Gamehack’s winning mobile game Plasma Party now available in the Apple App Store

As you may know a couple of weeks ago we helped put on the first ever Gamehack, in which developers were given 24 hours to create brand new games from scratch. Alongside being the main sponsor for GameHack we also ran a challenge category called best use of mobile, which was won by Lightwood Games who developed Plasma Party – and the most exciting bit is that they have just released it on the Apple App Store!

Plasma Party is based on the simple ‘whack-a-mole’ concept, extended across multiple iOS devices using a feature of Apple’s GameKit framework that allows more than 2 devices to connect through Bluetooth. In the game, two to four players can connect up to 16 iPods, iPhones and iPads to create a gaming board in which they must be the first to turn off all of their own colour lights.

Despite the gruelling challenge, the team managed to create an original game that only took a little tweaking before it was ready to submit to the Apple App Store, which is where it now sits for you to download – for free. We caught up with the developers to see what they thought of the whole experience.

BV: Who are you and what do you do?

LG: We are Lightwood Games, a team of two developers who have produced a number of puzzle games for iPhone, iPad and iPod touch. Usually with rather more than 24 hours to make them though!

We’re passionate about social gaming experiences, so our titles include multi-player online modes. We created the first ever online competitive word search puzzle, which has now been played more than 10 million times. We made a jigsaw app that lets you create puzzles from your own photos and then race to solve them against a friend in real time. Our Sudoku game has a crazy two-player mode like nothing you’ve ever seen before!

BV: What is the name of the Game you made at GameHack?

LG: At GameHack we called it “Plasmafest”, although we’ve since renamed it to Plasma Party, so it fits alongside some of our other “Party” games. We took a simple whack-a-mole concept and extended it across multiple devices connected using Bluetooth. Two to four players then compete to be the first to touch all the lights in their own assigned colour. Game play becomes a real-world social experience, involving intertwining limbs and digits with nearby opponents as you battle to reach lights in the far corners.

BV: Did you have fun at GameHack?

LG: Yes! It was something neither of us had done before, and whilst rather an intense experience, it was good fun. We were interested to see what other people were creating in the time, and some of the graphics were amazing.

BV: How did you come up with the game? Was it spur of the moment?

LG: We’d had the idea to use Bluetooth to create a larger play area for a little while, but hadn’t had the time to develop the idea. We figured it was something we could probably create in 24 hours, and despite doubting that at around 3am when the devices still weren’t communicating properly, it all suddenly came together in the last few hours.

BV: What is the game made from, what technology did you use?

LG: The game is written in Objective-C, creating a native, Universal iOS app. It utilizes a lesser known (and sparsely documented!) feature of Apple’s GameKit framework to connect more than 2 devices via Bluetooth.

BV: Any idea what you are going to make using your Arduino prize?

We both spend far too long during the day hitting refresh on multiple websites to catch the latest stats – how many word searches have been played today? How many bootups has Worcle had? Which advertising network is performing best? These stats all have APIs so we can aggregate them onto one page, but it’s still very distracting.

What would be just as distracting, but infinitely more awesome, would be to have a scrolling LED sign above the desk! Our very own private stock ticker :)

BV: Any future plans for your game?

LG: Amazingly, we’ve already submitted it to Apple! After all the lovely, enthusiastic comments we received, we just couldn’t wait to get it out to everyone to play. It feels a little like the event has only just finished, after a couple of days of further frantic coding to iron out the bugs we chose not to demonstrate on Sunday ;)

Apoyando a los desarrolladores argentinos a través de “OpenApp”

Ya están abiertas las inscripciones para la segunda edición del Concurso Nacional de Aplicaciones Digitales OpenApp, con el que Telefónica quiere premiar la innovación en Argentina.

Para darlo a conocer a lo largo y ancho del país, en los próximos meses tendrá lugar el Tour de Innovación digital, con 15 eventos en los siguientes destinos: Capital Federal, Santa Fe, Rosario, Puerto Madryn, Misiones, Mar del Plata, Tandil, Entre Ríos, Córdoba, Tucumán, Mendoza, y La Plata.

Se trata de jornadas en las que se explica en qué consiste Open App, se exponen las tendencias de mercado y casos de jóvenes que han logrado triunfar con sus desarrollos y nos cuentan en primera persona su experiencia.

Hay $350.000 en premios, viajes para los 15 ganadores (3 por categoría) para conocer los centros tecnológicos de Madrid y, además, un programa de formación.

Formación mediante webinars

Uno de los modos en que desde BlueVia queremos participar con este concurso, es ofreciendo formación a través de webinars de diversas temáticas que puedan interesar a los desarrolladores.

Tendrán lugar en las siguientes fechas:

*         Martes 14/02 a las 16:00hrs Tema: Modelo de negocio e Innovación con BlueVia

https://www3.gotomeeting.com/pjoin/807673334/105048449

*         Viernes 24/02 a las 10:00hrs Tema: Ganando dinero con Apps y nuevas tendencias de desarrollo

https://www3.gotomeeting.com/pjoin/799359830/105646267

*         Jueves 01/03 a las 16hrs Tema: BlueVia: Usos de APIs de red y venta de Apps

https://www3.gotomeeting.com/pjoin/846488478/105025686

Para conocer más sobre el concurso o participar de las jornadas gratuitas os invitamos a visitar: www.openapp.com.ar<http://www.openapp.com.ar>

También puedes estar al tanto de las novedades a través de los canales sociales del concurso https://www.facebook.com/OpenAppChallenge y TW: @OpenApp_Arg, y del de @bluevia_es

 

 

 

Emprender en movilidad y con la mirada hacia fuera

Si algo nos ha quedado claro a los asistentes al BDigital Apps 2011, de estos dos últimos días en Barcelona, es que las aplicaciones no son desde donde se accede a Internet, sino que SON Internet; y que cuando hablamos de ellas no nos referimos a apps del smartphone, sino a la cada vez más amplia variedad de dispositivos que se conectan a la red, como las videoconsolas, televisiones, etc. Ponentes de diversos sectores y países han probado con cifras y experiencias que la revolución pasa por la movilidad,  que es allí donde encontramos al consumidor, y que quien no quiera enterarse estará dando ‘palos de ciego’ en el progreso de su negocio.

La importante de la movilidad se acentúa todavía más si ponemos los ojos en mercados más allá de nuestras fronteras, en concreto en los de países emergentes, donde la expansión del uso de Internet va a llegar –o ya lo está haciendo- directamente a través del móvil. Precisamente en esto centró gran parte de su intervención Andrés Leonardo Martínez -@almo-, nuestro responsable de la comunidad de Latam, compartiendo cifras de penetración y uso en los diversos países en los que opera Telefónica, animando así a los emprendedores a buscar sinergias y a mirar hacia Latinoamérica.

En este sentido, levantó especial interés la ponencia del keniata Erik Hersman-@whiteafrican-, que quiso desmontar los tópicos sobre África –atletismo, safaris, guerra- y contarnos sobre la innovación en distintos países y desde dónde está llegando. Compartió algunos casos de éxito de movilidad e Internet, como MPesa, Movirtu y Ushahidi.com, y nos presentó el proyecto del que él es fundador, iHub.

Si queréis conocer más sobre Marketing y E-Commerce Mobile, y otros temas que allí se trataron, echad un vistazo al hashtag utilizado en el evento #bdigitalapps y esperad a que en la web publiquen los videos realizados!

Launching in-app payments via the BlueVia API

One of the most positive developments for mobile app developers has been the growth of in-app purchasing.  Research suggests apps that feature purchasing generate greater revenues.  The key to making it work is a micropayments system that links an app to customer bank details in some way.  Developers and merchants have increasingly benefited from mobile payments over platforms like Facebook.

Today, we’re launching an in-app Payment API that will enable BlueVia developers to do the same using operator billing.

Tracking the growth of in-app purchasing

There is plenty of evidence that in-app payments can supercharge revenue growth.  The app market is growing fast.  IDC reckons the mobile app market will exceed $35 billion by 2014.  But it’s the growth of in-app purchasing that is really eye-catching.  On the iPhone, for example, market analyst Distimo says there has been near threefold growth in the proportion of app revenue coming from those featuring in-app payments.  A year ago, 28% of app revenue was generated by apps with in-app payments and this rose to 72% last year.

There are lots of examples of in-app payments resulting directly and transparently in greater revenue and company valuations, for example companies like Zynga through games like FarmVille and Mafia Wars.  What this means for app developers, merchants and brands is that there is a strong incentive to build purchasing mechanisms into their applications.

The big questions is: what’s the best way to do this?

BlueVia’s answer to in-app payments

Today, we’re announcing the launch of in-app payments with our micropayment platform partner BOKU.  From today, you can go to the BlueVia website and access the Payment API.  As a developer, this will enable you to use BOKU’s bank-grade mobile payments technology and integrate it into your apps.

How BOKU payments help developers

BOKU presents app developers and merchants with a single contract, a single API and a single set of rules.  As a result, developers will be able to implement in-app purchasing within minutes.

The BlueVia Payment API makes it easier for developers to make money.  It gives them a simpler way to bill customers and open up markets that don’t currently have access to credit cards or other payment capabilities.

It’s another important milestone for BlueVia, and one we hope to see embraced by our developer community.  If you have ideas, questions or feedback about our Payment API, please share them with us and other developers either via the comment section below, or our developer support forum.

BlueVia - Facebook BlueVia - Twitter BlueVia - Vimeo BlueVia - SlideShare BlueVia - LinkedIn