Go to this link: https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/
Take a look about: https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager
- Make sure you have Firefox Desktop 26+ installed
- Open the App Manager (in the URL bar, type
about:app-manager
) - If you don't have a real device:
- Install the Firefox OS Simulator
- In App Manager's bottom toolbar, click on Start Simulator, then click on the name of the installed simulator, which should appear there.
- If you have a real device:
- Make sure your device is running Firefox OS 1.2+
- On Windows, make sure to install the drivers provided by your phone manufacturer
- In the Settings of your device, disable Screen Lock (
Settings > Phone Lock
) and enable Remote Debugging (Settings > Device information > More information > Developer
) - Install the ADB Helper add-on in Firefox Desktop
- Install device driver, look at here and here. To help with connecting a Firefox OS device look at here. To install ADB in Ubuntu Linux look at here.
- Connect your device to your machine via a USB cable
- You should see the name of your device in the App Manager's bottom bar. Click on it.
- The bottom bar should show "Connected to: xxx"
- Click on the Apps panel and add an app (packaged or hosted)
- The Refresh button validates your app and installs it on the Simulator/Device
- The Debug button connects the developer tools to the running app
- See the Troubleshooting section for help if you are having trouble
To create the first app
- create a directory with name firstApp
- create in firstApp directory the files:
- manifest.webapp
- index.html
- edit the manifest.webapp and put this text
- {
"version": "1.0",
"name": "firstApp",
"description": "My first app",
"launch_path": "/index.html",
"developer": {
"name": "Bruno Heins",
"url": "http://brunoheins.blogspot.com"
},
"locales": {
"br": {
"description": "Meu primeiro app",
"developer": {
"url": "http://brunoheins.blogspot.com"
}
}
},
"default_locale": "en"
}
- edit the index.html and put this text
- <!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>My first app</title>
</head>
<body>
<p>This is my first app!</p>
</body>
</html>
- In Firefox, select Web Developer -> App Manager
- Click in Add Packaged App and select the firstApp directory that has the manifest.webapp file
- Click in Start Simulator and then start with Firefox OS 1.2 ou 1.3...
- Select your app and then click in Debug
You'll get a warning "Missing 'icons' in Manifest.". To correct, make this:
- create a app-icons directory into firstApp
- create the files:
- /app-icons/icon-16.png
- /app-icons/icon-48.png
- /app-icons/icon-128.png
- put this code in manifest
- ...
"launch_path": "/index.html",
"icons": {
"16": "/app-icons/icon-16.png",
"48": "/app-icons/icon-48.png",
"128": "/app-icons/icon-128.png"
},
...
- close the simulator and click in Update from your App Dashboard
Nenhum comentário:
Postar um comentário