- Published on
Yesterday I Wrote My First Firefox OS App
- Authors

- Name
- Kevin van Zonneveld
- @kvz
Yesterday I wrote my first Firefox OS App.
For now it's called kbt2 and it's a round timer that I can use to give kickboxing lessons.
After:
- a few very frustrating hours dealing with the unintuitive and sometimes even failing Everlast Round Timer
- knowing that I could not use my own phone as it will be playing music during kickboxing sessions
- having a spare Firefox Developer Preview Phone thanks to Sergi Mansilla and a lucky raffle on a Decode Friday meetup
- knowing that building Firefox OS apps is as easy as creating a HTML site with some json inside a
./manifest.webappfor app definition, and JavaScript calls to make it e.g. vibrate
.. I decided to use my geekphone as a dedicated interval timer / instruction guide and started hacking on an app for that. It all went remarkably smooth.
Here's the phone:

It's a "Keon" Developer Preview by Geekphone. I was lucky to win one, but told they'll only be 50$.
You point its web browser to the location of your app. Your app can detect the phone and offer an install via a simple navigator.mozApps.install()

This basically copies all the assets listed in ./manifest.appcache to your phone, so it can be accessed
without internet (awesome cause there's bad reception inside the gym :)

Now just launch the app

And that's it. I hacked this up on a rainy Sunday afternoon thanks to a headstart with:
- Great docs on the Mozilla Developer Network
- The Firefox OS Boilerplate App which bundles some common code
- The Firefox OS Simulator 4.0 which let me test & refresh with just 1 click
Obviously this particular project is quite specific to my use-case; but still open sourced for inspirational purposes.
The first Firefox Phones are targeted at upcoming markets so featurewise can't really compete with - and won't replace - your modernday iOS/Android devices.
However, at just 50$ you do get a considerable amount of hardware:
- 1Ghz CPU
- 512 RAM
- GPS. Wifi N/UMTS/GSM reception
- 3.5" HVGA touchscreen (!)
- 3 mega pixel camera
- Light & proximity sensor. G-Sensor
- USB
- 1580 mAh Battery
.. That you can easily talk to via JavaScript APIs. Just imagine what other dedicated applications you could build on top of this :) Be it:
- a remote controller
- the brain of a robot that you're building
- a security device taking pictures when it detects changes in light
- in your car, uploading G-forces & GPS to track when you've been driving most economically :)
For some things a Raspberry PI or Arduino makes more sense, but since this has a touchscreen, solid housing, extra sensors, and the platform is fully open too, I see a lot of possibilities.
Update #1
The Keon I won will be sold at 91 EUR, not 50 Firefox phone on Ebay this Friday.
Legacy Comments (7)
These comments were imported from the previous blog system (Disqus).
Awesome! Nice to see that the phone went to somebody that really used it! :)
Your talk was extremely inspiring Sergi! Great job - and thank you so much!
thanks kevin, thats a nice report :)
Just read about the ZTE phone on BBC website so googled firefox os apps and found your blog....now I want one just to do these kind of crazy ideas on a wet Sunday Afternoon...GOOD WORK !
Thank, Kevin. I'm learning about mobile apps and this is the first article I read that made me feel like, hey, maybe I can do that. I will start with the very helpful links to Firefox OS Boilerplate and Simulator. ;-)
Hi
Kevin! Just three words for you: "You are awesome!"