cordova-plugin-fire-tv
Version:
Cordova plugin that augments your application's Manifest.xml with Fire TV bits and pieces.
20 lines (17 loc) • 693 B
JavaScript
module.exports = function (context) {
var fs = require('fs'),
path = require('path'),
platformRoot = path.join(context.opts.projectRoot, 'platforms/android'),
manifestFile = path.join(platformRoot, 'AndroidManifest.xml');
if (fs.existsSync(manifestFile)) {
fs.readFile(manifestFile, 'utf8', function (err, data) {
if (err) {
throw new Error('Unable to find AndroidManifest.xml: ' + err);
}
fs.writeFile(manifestFile, data, 'utf8', function (err) {
if (err) throw new Error('Unable to write into AndroidManifest.xml: ' + err);
});
});
}
};