Mozilla Rep, Firefox OS Contributor, GSoCer 2013
Software Enginner at HackeEarth
github/MrDHat
@MrDHat
ktyaks@gmail.com
{
"name": "My App",
"description": "My elevator pitch goes here",
"launch_path": "/",
"icons": { "128": "/img/icon-128.png" },
"developer": {
"name": "Your name or organization",
"url": "http://your-homepage-here.org"
}
}
var b = navigator.battery;
if (b) {
var level = Math.round(b.level * 100) + "%",
charging = (b.charging) ? "" : "not ",
chargeTime = parseInt(b.chargingTime / 60, 10),
dischargeTime = parseInt(b.dischargingTime/60,10);
b.addEventListener("levelchange", show);
b.addEventListener("chargingchange", show);
b.addEventListener("chargingtimechange", show);
b.addEventListener("dischargingtimechange", show);
}
var contact = new mozContact();
contact.init({name: "Christian"});
var request = navigator.mozContacts.save(contact);
request.onsuccess = function() {
// contact generated
};
request.onerror = function() {
// contact generation failed
};
var call = new MozActivity({
name: "dial",
data: {
number: "+1804100100"
}
});
https://marketplace.firefox.com/
var installapp = navigator.mozApps.install(manifestURL);
installapp.onsuccess = function(data) {
// App is installed
};
installapp.onerror = function() {
// App wasn't installed, info is in
// installapp.error.name
};