问题
I have downloaded and installed FIrefox OS Simulator for testing and developing. I want to test some functionalities that are allowed only on certified applications, such as SMS and phone calling, as described here.
What should I include in my manifest (.webapp file) in order to access this functionality in the simulator?
Thanks, Tamas Ionut
回答1:
This is very manual, but I think it'll is cool to understand how stuff work under the hood (and it's the only way I know it'll always work):
- Be sure your
manifest.webapp
includes"type": "certified"
- Pack the app
- Add the directory containing your
manifest.webapp
and thezip
package to the simulator's Gaiswebapps
directory - Add an entry on
webapps.json
for your app. Be sure it has"appstatus": 3
- Have fun :)
The webapps
directory of your simulator's Gaia should be in your Firefox profile, on a path like this:
/home/username/.mozilla/firefox-trunk/foobarbaz.default/extensions/r2d2b2g@mozilla.org/profile/webapps/.
Now the easiest, but not currently that easy, way:
MDN has an entry that says
Note: If you want to test certified app APIs (described above), turn on "developer mode" on the device you want to install the app on (Firefox OS) and make sure to specify the correct type in your manifest.webapp file.
I've seen that option on Simulator, but it has gone recently. I can barely recall seeing somewhere someone saying that they would disable some flags for the Simulator build, but as I can't find it anymore. Anyway, you could try two options:
- building the Simulator yourself (I'll require tons of space and time, be aware!) and see if you can get this option there. It's not likely it'll work, if it was really disabled though
- Download Simulator 1.1pre2 ou 1.1pre3 from labs ftp, the last Simulator build I'm aware that had that option enabled.
回答2:
Check the standard sms and dialer apps.
Keep in mind though that the production builds of Firefox OS will not allow the installation of third-party certified apps.
来源:https://stackoverflow.com/questions/15136765/firefox-os-certified-apps