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'), ...@@ -24,56 +24,42 @@ var exec = require('cordova/exec'),
// Default values // Default values
exports._defaults = { exports._defaults = {
id: 0, actionGroupId : null,
text: '', actions : [],
title: '', attachments : [],
sound: true, autoClear : true,
badge: null, badge : null,
data: null, channel : null,
icon: null, color : null,
silent: false, data : null,
trigger: { type: 'calendar' }, defaults : 0,
actions: [], group : null,
actionGroupId: null, groupSummary : false,
attachments: [], icon : null,
progressBar: false 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 // Listener
exports._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. * Merge custom properties with the default values.
* *
* @param [ Object ] options Set of custom values. * @param [ Object ] options Set of custom values.
...@@ -423,11 +409,9 @@ channel.deviceready.subscribe(function () { ...@@ -423,11 +409,9 @@ channel.deviceready.subscribe(function () {
// Called before 'deviceready' event // Called before 'deviceready' event
channel.onCordovaReady.subscribe(function () { channel.onCordovaReady.subscribe(function () {
channel.onCordovaInfoReady.subscribe(function () {
if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) { if (['Android', 'windows', 'iOS'].indexOf(device.platform) > -1) {
exports.setLaunchDetails(); 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