Home > Uncategorized > Firefox OS “Hello World”

Firefox OS “Hello World”

ffox

After meeting the Firefox OS guys at the MWC in Barcelona, I decided to give a go to porting my first app from PhoneGap (BlackBerry) to FireFox OS. The app I chose, was a simple HTML based app, with no requirement for access to device sensors etc. It used Jquery Mobile, but not much else.

First up, is that you have to put a file called manifest.webapp into the root (/www) folder of the app, with someting like the following content:

{
“name”: “Free SMS”,
“description”: “A firefox OS app that allows you send free SMS text messages from your firefox smartphone to most European countries”,
“launch_path”: “/index.html”,
“icons”: {
“128”: “/resources/icon128.png”
},
“developer”: {
“name”: “Open Merchant Account Ltd”,
“url”: “http://www.openmerchantaccount.com
},
“default_locale”: “en”
}

Of course, the files index.html and /resources/icon128.png need to exist, and icon128 needs to be 128×128 pixels in size. Zip the folder up, ensuring that manifest.webapp and index.html are at root level of the zip file.

Create an account at firefox marketplace, and go to https://marketplace.firefox.com/developers/submit/app/manifest – I selected packaged app, although the website recommends a that you choose hosted. Press select a file, and upload the zip. If everything works ok, then you should be able to move to the next page where you should supply screenshots, and marketing text.

In order to create screenshots, then you’ll need the latest version of firefox, then download firefox_os_simulator xpi at https://marketplace.firefox.com/developers/docs/firefox_os_simulator – This plugin can then be installed by pressing Tools > Add ons > Gear icon > Install add on from file. Once the add on is installed, press “Add Directory” and select the manifest.webapp from your hard drive.

The simulator should kick into life, and if you unlock it, then swipe the apps right a few pages, you should see your app. Click to launch, and snap a few screenshots.

Currently Firefox OS marketplace appears to be available only for US, UK, Brazil and Spain, but it should increase in time.

My completed zip can be downloaded from my RPI server here http://www.servedwithpi.com/firefoxos.zip

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: