Commit 5afa40a8 by Sebastián Katzer

Hotfix: device plugin isnt available before the onCordovaInfoReady event. (Fixes #126)

parent 56782af0
......@@ -208,15 +208,12 @@ LocalNotification.prototype = {
var plugin = new LocalNotification(),
channel = require('cordova/channel');
channel.onCordovaReady.subscribe( function () {
plugin.applyPlatformSpecificOptions();
});
channel.deviceready.subscribe( function () {
cordova.exec(null, null, 'LocalNotification', 'deviceready', []);
});
channel.onCordovaReady.subscribe( function () {
channel.onCordovaInfoReady.subscribe( function () {
if (device.platform != 'iOS') {
channel.onPause.subscribe( function () {
cordova.exec(null, null, 'LocalNotification', 'pause', []);
......@@ -228,6 +225,9 @@ channel.onCordovaReady.subscribe( function () {
cordova.exec(null, null, 'LocalNotification', 'resume', []);
}
plugin.applyPlatformSpecificOptions();
});
});
module.exports = plugin;
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