Commit c2ee2f84 by Sebastián Katzer

Skip applying android specific options - now available on all platforms

parent 538bbbb1
......@@ -24,56 +24,42 @@ var exec = require('cordova/exec'),
// Default values
exports._defaults = {
id: 0,
text: '',
title: '',
sound: true,
badge: null,
data: null,
icon: null,
silent: false,
trigger: { type: 'calendar' },
actions: [],
actionGroupId: null,
attachments: [],
progressBar: false
actionGroupId : null,
actions : [],
attachments : [],
autoClear : true,
badge : null,
channel : null,
color : null,
data : null,
defaults : 0,
group : null,
groupSummary : false,
icon : null,
id : 0,
launch : true,
led : true,
lockscreen : true,
mediaSession : null,
number : 0,
priority : 0,
progressBar : false,
showWhen : true,
silent : false,
smallIcon : 'res://icon',
sound : true,
sticky : false,
summary : null,
text : '',
title : '',
trigger : { type : 'calendar' },
vibrate : false
};
// Listener
exports._listener = {};
/**
* Merge platform specific properties into the default ones.
*
* @return [ Void ]
*/
exports.applyPlatformSpecificOptions = function () {
var defaults = this._defaults;
switch (device.platform) {
case 'Android':
defaults.group = null;
defaults.groupSummary = false;
defaults.summary = null;
defaults.smallIcon = 'res://icon';
defaults.sticky = false;
defaults.autoClear = true;
defaults.led = true;
defaults.color = null;
defaults.vibrate = false;
defaults.lockscreen = true;
defaults.showWhen = true;
defaults.defaults = 0;
defaults.priority = 0;
defaults.number = 0;
defaults.channel = null;
defaults.launch = true;
defaults.mediaSession = null;
break;
}
};
/**
* Merge custom properties with the default values.
*
* @param [ Object ] options Set of custom values.
......@@ -423,11 +409,9 @@ channel.deviceready.subscribe(function () {
// Called before 'deviceready' event
channel.onCordovaReady.subscribe(function () {
channel.onCordovaInfoReady.subscribe(function () {
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
exports.setLaunchDetails();
}
channel.onCordovaInfoReady.subscribe(function () {
exports.applyPlatformSpecificOptions();
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment