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.webapp
for 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 remarkibly 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 it's webbrowser 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 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 targetted at upcoming markets so featurewise can't really compete with - and wont'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 possibilites.
Update #1
The Keon I won will be sold at 91 EUR, not 50$ as I mentioned. However, ZTE will launch a 79$ Firefox phone on Ebay this Friday.