cordova - How to use Meteor-PhoneGap Plugin -



cordova - How to use Meteor-PhoneGap Plugin -

i getting started using phonegap integration meteor , having problem getting plugin work. please provide steps below how utilize photographic camera plugin. running on simulator. code below. give thanks in advance.

i added photographic camera plugin this: meteor add together cordova:org.apache.cordova.camera@0.3.1

then utilize have next code:

if (meteor.isclient) { template.hello.events({ 'click button': function () { // increment counter when button clicked navigator.camera.getpicture( function(data){ session.set("picture", res); }, function(err){ console.log(err); }, { quality: 50, destinationtype: camera.destinationtype.data_url } ); } }); } if (meteor.isserver) { meteor.startup(function () { // code run on server @ startup }); }

when click on button error:

i20141006-21:58:33.174(-7)? (ios) camera.getpicture: source type 1 not available. i20141006-21:58:33.222(-7)? (ios) no photographic camera available

according meteor-cordova-phonegap integration docs,

any functionality relies on cordova/phonegap plugin should wrap code in meteor.startup() block

docs link here

cordova meteor phonegap-plugins cordova-plugins

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -