Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
None
-
None
-
None
Description
FirefoxOS manifest files allow a richer set of fields than currently supported by firefoxos_parser.js
https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/metadata/firefoxos_parser.js
E.g.: "activities"
https://developer.mozilla.org/de/Apps/Manifest#activities
This is needed to e.g. open files of a defined mime type.
Extend syntax of plugin.xml like e.g.:
<platform name="firefoxos">
<config-file target="config.xml" parent="/*">
<activities>
<activity name="open" href="./import.html" disposition="inline">
<filter type="application/wallet-import" />
</activity>
</activities>
</config-file>
</platform>
This results e.g. in
"activities": {
"open": {
"href": "./import.html",
"disposition": "inline",
"filters":
}
},
Lines needed for this in firefoxos_parser.js:
var activitiesNodes = config.doc.findall('activities');
activitiesNodes.forEach(function(activitiesNode) {
var activityNodes = activitiesNode.findall('activity');
if (activityNodes.length) {
var activities = {};
activityNodes.forEach(function (node) {
var name = node.attrib.name;
var href = node.attrib.href;
if (name && href) {
events.emit('verbose', 'activity name='name' href='+href);
activities[name] = {};
activities[name].href = href;
var disposition = node.attrib.disposition;
if (disposition)
activities[name].filters = {};
var filterNodes = node.findall('filter');
filterNodes.forEach(function(filter) {
var type = filter.attrib.type;
if (type)
});
} else
});
manifest.activities = activities;
}
});