Embed presentation
Download as PDF, PPTX
































![var sdcard = navigator.getDeviceStorage("sdcard");
var file = new Blob(["This is a text file."], {type: "text/plain"});
var request = sdcard.addNamed(file, "my-file.txt");
request.onsuccess = function () {
var name = this.result;
console.log('File "' + name + '" successfully wrote on the sdcard
storage area');
}
// An error typically occur if a file with the same name already exist
request.onerror = function () {
console.warn('Unable to write the file: ' + this.error);
}](https://image.slidesharecdn.com/20150125-html-conference-150125014546-conversion-gate02/85/Firefox-OS-33-320.jpg)
![var name = navigator.mozCamera.getListOfCameras()[0];
var streamReady = function(stream){
var display = document.querySelector("video");
display.mozSrcObject = stream;
display.play();
};
var success = function(camera){
camera.getPreviewStream(size, streamReady);
};
var fail = function(error){};
navigator.mozCameras.getCamera(name, {}, success, fail);](https://image.slidesharecdn.com/20150125-html-conference-150125014546-conversion-gate02/85/Firefox-OS-34-320.jpg)






































This document outlines the basic information for an app including its name, description, launch path, and developer details. It provides links to resources for Firefox OS development and includes code snippets for handling device storage and camera functionality. The document emphasizes the advantages of using Firefox for development due to its comprehensive features for developers.
































![var sdcard = navigator.getDeviceStorage("sdcard");
var file = new Blob(["This is a text file."], {type: "text/plain"});
var request = sdcard.addNamed(file, "my-file.txt");
request.onsuccess = function () {
var name = this.result;
console.log('File "' + name + '" successfully wrote on the sdcard
storage area');
}
// An error typically occur if a file with the same name already exist
request.onerror = function () {
console.warn('Unable to write the file: ' + this.error);
}](https://image.slidesharecdn.com/20150125-html-conference-150125014546-conversion-gate02/85/Firefox-OS-33-320.jpg)
![var name = navigator.mozCamera.getListOfCameras()[0];
var streamReady = function(stream){
var display = document.querySelector("video");
display.mozSrcObject = stream;
display.play();
};
var success = function(camera){
camera.getPreviewStream(size, streamReady);
};
var fail = function(error){};
navigator.mozCameras.getCamera(name, {}, success, fail);](https://image.slidesharecdn.com/20150125-html-conference-150125014546-conversion-gate02/85/Firefox-OS-34-320.jpg)




































