Using Firefox OS Simulator

  • Revision slug: Mozilla/Boot_to_Gecko/Using_Firefox_OS_simulator
  • Revision title: Using Firefox OS simulator
  • Revision id: 335309
  • Created:
  • Creator: MarkGiffin
  • Is current revision? No
  • Comment

Revision Content

The Firefox OS Simulator is a desktop PC tool that shows you what apps will look like on a phone that is running the Firefox OS. It is the easiest way to try out apps on Firefox OS before submitting them to the Firefox Marketplace. The Firefox OS Simulator was formerly called "r2d2b2g", but that name is too difficult.

The Simulator is packaged as a desktop Firefox add-on. You can use any recent version of Firefox, including released, Beta, Aurora, or Nightly versions.

Installing Firefox OS Simulator

  1. Using Firefox, go to this link: https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
  2. Click Add to Firefox. It's a large download. Follow the prompts that appear.

Starting the Simulator

  1. On the Tools menu, go to Web Developer and click Firefox OS Simulator. (If you don't see the Tools menu, try pressing Alt.) The dashboard appears.

    Dashboard

  2. Click the Stopped button. It changes into the Running button and Firefox OS boots up in its own window. The default size for this window is 320x480.

    Simulator

    To stop the Simulator, click the Running button in the dashboard, or just close the Simulator window.

Note: You can also start and stop the Simulator in the Developer Toolbar command line using firefoxos start and firefoxos stop.

Navigating in the Simulator

Imitate swipe motions in the Simulator by clicking and dragging with the mouse. The mouse scroll wheel will move a list up and down, such as in the Settings app.

To get back to the home screen, click the home button at the bottom of the Simulator, or press the Home key on your keyboard.

? Is the back key still Esc?

Console checkbox

Click the Console check box before you start the Simulator to open an error console so you can spot errors that might occur while you're working on your app.

Web APIs in Simulator

Mozilla is working on many Web APIs to make native platform capabilities available to Open Web Apps. The Web APIs currently supported in the Simulator are:

  • Contacts API
  • Settings API
  • ? what other APIs ?

Installing an app in the Simulator

To install an app in the Simulator, type the URL to the app's manifest in the URL box, and click Add Manifest. This will install the app in the Simulator. Here is a simple weather app that you can use as a test:

 

Removing an app from the Simulator

What does the Add Directory button do?

Does this also work for packaged apps?

 
 

Updating an app

 

Packaged apps
What about these
 
Reporting bugs
Remember that the Simulator is a brand-new tool and is still heavily under development. Please let us know if you find any bugs. link
 
 
 
More information
Makes it easier to install and use ...
 
If you are interested in more technical details, the Simulator itself is the Firefox OS desktop client (also called the B2G desktop client), which is a build of Firefox OS that runs on Windows, Mac, and Linux. Firefox OS Simulator makes it much easier to use Firefox OS desktop because you don't have to pull code files and build it to use it. You just install the Firefox add-on and you're ready to go.
 
The Simulator is just a slightly-modified version of the Firefox OS desktop client with a slightly-modified version of Gaia, so the documentation for B2G Desktop, Gaia, and B2G generally will also apply to the Simulator to some extent. Here are a couple of those docs:
 
https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client
https://wiki.mozilla.org/Gaia/Hacking
 

 

Revision Source

<p>The Firefox OS Simulator is a desktop PC tool that shows you what apps will look like on a phone that is running the Firefox OS. It is the easiest way to try out apps on Firefox OS before submitting them to the Firefox Marketplace. The Firefox OS Simulator was formerly called "r2d2b2g", but that name is too difficult.</p>
<p>The Simulator is packaged as a desktop Firefox add-on. You can use any recent version of Firefox, including released, Beta, Aurora, or Nightly versions.</p>
<h2>Installing Firefox OS Simulator</h2>
<ol>
  <li>Using Firefox, go to this link: <a href="/en-US/firefox/addon/firefox-os-simulator/" title="/en-US/firefox/addon/firefox-os-simulator/">https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/</a></li>
  <li>Click <strong>Add to Firefox</strong>. It's a large download. Follow the prompts that appear.</li>
</ol>
<h2>Starting the Simulator</h2>
<ol>
  <li>On the <strong>Tools</strong> menu, go to <strong>Web Developer</strong> and click <strong>Firefox OS Simulator</strong>. (If you don't see the Tools menu, try pressing <strong>Alt</strong>.) The dashboard appears.
    <p><img alt="Dashboard" src="/files/4487/dashboard.jpg" style="width: 600px; height: 419px;" /></p>
  </li>
  <li>Click the <strong>Stopped</strong> button. It changes into the <strong>Running</strong> button and Firefox OS boots up in its own window. The default size for this window is 320x480.
    <p><img alt="Simulator" src="/files/4485/simulator.jpg" style="width: 336px; height: 552px;" /></p>
    <p>To stop the Simulator, click the <strong>Running</strong> button in the dashboard, or just close the Simulator window.</p>
  </li>
</ol>
<div class="note">
  <p><strong>Note:</strong> You can also start and stop the Simulator in the Developer Toolbar command line using <code>firefoxos start</code> and <code>firefoxos stop</code>.</p>
</div>
<h2>Navigating in the Simulator</h2>
<p>Imitate swipe motions in the Simulator by clicking and dragging with the mouse. The mouse scroll wheel will move a list up and down, such as in the Settings app.</p>
<p>To get back to the home screen, click the home button at the bottom of the Simulator, or press the <strong>Home</strong> key on your keyboard.</p>
<p><span style="color:#ff0000;"><span style="background-color:#ffff00;">? Is the back key still Esc?</span></span></p>
<h2>Console checkbox</h2>
<p>Click the <strong>Console</strong> check box before you start the Simulator to open an error console so you can spot errors that might occur while you're working on your app.</p>
<h2>Web APIs in Simulator</h2>
<p>Mozilla is working on many Web APIs to make native platform capabilities available to Open Web Apps. The Web APIs currently supported in the Simulator are:</p>
<ul>
  <li>Contacts API</li>
  <li>Settings API</li>
  <li><span style="color:#ff0000;"><span style="background-color:#ffff00;">? what other APIs ?</span></span></li>
</ul>
<h2>Installing an app in the Simulator</h2>
<p>To install an app in the Simulator, type the URL to the app's manifest in the URL box, and click <strong>Add Manifest</strong>. This will install the app in the Simulator. Here is a simple weather app that you can use as a test:</p>
<p>&nbsp;</p>
<p>Removing an app from the Simulator</p>
<p>What does the Add Directory button do?</p>
<p>Does this also work for packaged apps?</p>
<div>
  &nbsp;</div>
<div>
  &nbsp;</div>
<h2>Updating an app</h2>
<p>&nbsp;</p>
<div>
  Packaged apps</div>
<div>
  What about these</div>
<div>
  &nbsp;</div>
<div>
  Reporting bugs</div>
<div>
  Remember that the Simulator is a brand-new tool and is still heavily under development. Please let us know if you find any bugs. link</div>
<div>
  &nbsp;</div>
<div>
  &nbsp;</div>
<div>
  &nbsp;</div>
<div>
  More information</div>
<div>
  Makes it easier to install and use ...</div>
<div>
  &nbsp;</div>
<div>
  If you are interested in more technical details, the Simulator itself is the Firefox OS desktop client (also called the B2G desktop client), which is a build of Firefox OS that runs on Windows, Mac, and Linux. Firefox OS Simulator makes it much easier to use Firefox OS desktop because you don't have to pull code files and build it to use it. You just install the Firefox add-on and you're ready to go.</div>
<div>
  &nbsp;</div>
<div>
  The Simulator is just a slightly-modified version of the Firefox OS desktop client with a slightly-modified version of Gaia, so the documentation for B2G Desktop, Gaia, and B2G generally will also apply to the Simulator to some extent. Here are a couple of those docs:</div>
<div>
  &nbsp;</div>
<div>
  https://developer.mozilla.org/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client</div>
<div>
  https://wiki.mozilla.org/Gaia/Hacking</div>
<div>
  &nbsp;</div>
<p>&nbsp;</p>
Revert to this revision