Wednesday, August 5, 2015

Setting up FireFox OS Development Environment on Windows

This post describes the setting up of FireFox OS development Environment on Windows for developing FireFox OS mobile apps.


About FireFox OS

FireFox OS is developed by Mozilla, the organization behind the Mozilla web browser. FireFox OS is a community driven project and the apps for this OS can be developed using HTML5 and Javascript.


You need Mozilla Firefox browser to develop and debug the firefox os Apps.
Install the latest version of Mozilla Firefox browser from the below link and install the browser.

Once Mozilla firefox is installed, launch the Mozilla browser and hit ‘Shift + F8’. This will launch the Web IDE. Alternatively you can launch Web IDE by Open Menu --> Developer -->Web IDE.

Web IDE is a browser based IDE that allows for web development and can be accessed from a web browser.



Once the Web IDE is launched, you can view the list of the components along with their installation status.


Click on the Ínstall’ against the latest version of the FireFox OS simulator to install the latest version of the simulator.




It won’t take long to install the Firefox OS simulator. Installing Firefox OS simulator is really fast.


Once the simulator is installed, click on ‘Select Runtime’ from the Firefox WebIDE.


In ‘Simulators’, select version of the Firefox OS you want to simulate. The simulator will be launched.



Now let us run a demo app in the simulator.

In Firefox WebIDE, click on ‘Open App’ and select ‘New App’.


Now you need to select a template for our demo app. Since this is our first app, we will select the ‘HelloWorld’ template.


Provide the project name. It can be anything you like, I just provided it as ‘HelloFireFoxOS’. Click ‘OK’ after providing the Project Name.


Provide a location where the projection can be saved.


The project is created and displayed in the Firefox WebIDE.


Select the Firefox OS version you want to simulate on right side drop down in the 2nd line of the Firefox WebIDE and click on clip_image031 symbol to launch the project in the simulator.


Once the app is launched on the simulator, the ‘Stop ‘button beside the ‘Start’ button will be enabled and the ‘Start’ button is changed to the ‘Install and Run.’


The app is launched in the simulator and the below screen is displayed. Since we haven’t really added any code and ran only the template, it is perfectly fine.


Click on stop button to stop the app running in the simulator.


Now let us make a small change to the app. Select índex.html’ and the file content is displayed.


Now let us change the ‘Hello World’ to ‘Hello Firefox OS’ and save the modifications by doing a Ctrl+S.


Now ‘Install & Run‘the app and modifications done are reflected in the app on the simulator.


This is a very basic demo of the sample app on FireFox OS, we should be able to build on this to create more complicated and useful apps.