javascript - How to use cordova-diagnostic-plugin with meteor? -
i using cordova diagnostic plugin-https://github.com/dpa99c/cordova-diagnostic-plugin , added using meteor add cordova:cordova.plugins.diagnostic@1.1.0 , wrote code below mentioned in plugin github readme
if (meteor.iscordova) { document.addeventlistener("deviceready", ondeviceready, false); function ondeviceready(){ cordova.plugins.diagnostic.islocationenabled(function(enabled){ console.log("location " + (enabled ? "enabled" : "disabled")); }, function(error){ console.error("the following error occurred: "+error); }); } }
but getting error shown below
uncaught typeerror:cannot read property 'diagnostic' of undefined
any on how use plugin in meteor.
Comments
Post a Comment