They work in any modern Web browser, and can be developed
using your favorite tools.
<ONCE THE CODE IS READY>
// Telephony object
var tel = navigator.mozTelephony;
// Check if the phone is muted (read/write property)
console.log(tel.muted);
// Check if the speaker is enabled (read/write property)
console.log(tel.speakerEnabled);
// Place a call
var cal = tel.dial(“123456789”);
// SMS object
var sms = navigator.mozSMS;
// Send a message
sms.send("123456789", "Hello");
// Recieve a message
sms.onreceived = function (event) {
// Read message
console.log(event.message);
};
// Vibrate for one second
navigator.vibrate(1000);
// Vibration pattern [vibrationTime, pause,…]
navigator.vibrate([200, 100, 200, 100]);
// Vibrate for 5 seconds
navigator.vibrate(5000);
// Turn off vibration
navigator.vibrate(0);
var contact = new contact();
contact.init({name: "Tom"});
var request = navigator.contacts.save(contact);
request.onsuccess = function() {
console.log("Success");
request.onerror = function() {
console.log("Error")
// Portrait mode:
screen.mozLockOrientation("portrait");
/*
Possible values:
"landscape"
"portrait"
"landscape-primary"
"landscape-secondary"
"portrait-primary"
"portrait-secondary"
*/
var connection = window.navigator.mozConnection,
online = connection.bandwidth > 0,
metered = connectrion.metered;
Essential Components
Marketplace Intro
https://marketplace.firefox.com/developers/
Game Dev
https://marketplace.firefox.com/developers/docs/game_apps
https://www.mozilla.org/en-US/styleguide/products/firefox-os/icons/
Twitter handle
@MozillaIN
#FirefoxOSAppDays
MozNet IRC (irc.mozilla.org)
#openwebapps
#b2g