The plugin must respect the following architecture :
plugin-name/
-- plugin/
-- android/
-- windows/
Because Firefox OS development use HTML/Javascript, no external files is needed.
The first step in plugins development is to write a central javascript file in the root/plugins path. The name of the file must be the name of the plugin. So let’s see an minimal plugin :
Rizla.plugins.Alert = {
// rizla function
name : 'Alert',
descript : 'This a basic plugin that does nothing except show alert',
version : '0.1',
css : '../style/main.css',
onInit : function(){
switch (Rizla.platform){
case "android":
Android.alert("Plugin Alert initialisation");
break;
default:
alert("Plugin Alert initialisation");
break;
}
},
// At this point you can define the specific plugin function
};