diff --git a/src/cordova.js b/src/cordova.js index a7d8a9b34..e91be56e8 100644 --- a/src/cordova.js +++ b/src/cordova.js @@ -12,10 +12,11 @@ const promisifyCordova = (pluginObj, pluginName, methodName) => { return; } - if(!pluginOjb.installed()) { + if(!pluginObj.installed()) { console.warn('Cordova: tried calling', '"' + pluginName + '.' + methodName + '"', 'but the ' + pluginObj.plugin + ' plugin is not installed.'); return; } + console.log('Cordova: exec(' + pluginName + ', ' + methodName +')'); cordova.exec(resolve, reject, pluginName, methodName, args); }) } diff --git a/test/app/app.js b/test/app/app.js index d0b82bee6..bf1178a01 100644 --- a/test/app/app.js +++ b/test/app/app.js @@ -12,6 +12,7 @@ document.addEventListener('deviceready', function() { alert('No cam'); console.log('Camera not installed'); } + /* Native.Camera.takePicture().then(function(resp) { console.log('Got picture'); }, function(err) { @@ -23,10 +24,13 @@ document.addEventListener('deviceready', function() { } else { console.log('AppLinks not installed'); } + */ if(Native.StatusBar.installed()) { console.log('StatusBar installed'); - Native.StatusBar.styleBlackTranslucent(); + Native.StatusBar.hide().catch(function(err) { + console.error('unable to set statusbar', err); + }); } else { alert('No statusbar'); console.log('StatusBar not installed');