disusered / cordova-open

Open audio, video, images and more with applications installed on the user's device
MIT License
54 stars 55 forks source link

phonegap serve test #35

Closed armando-basile closed 8 years ago

armando-basile commented 9 years ago

Hi all, i trying to use cordova.plugins.disusered.open to open a local pdf so i installed in my app the plugin using

$ cordova plugin add cordova-open

also i tryed to build with success using

$ cordova build android

but when i try to test my app using

$ phonegap serve

seems that i have some problem. this is my code http://pastebin.com/eGN4fEAg

in pc console i see log message "pdfbutton button clicked" but don't see other log message after call cordova.plugins.disusered.open (after open log message), no pdf is show and i have always focus on my app.

should i add something in my config.xml file or add some script reference into my html ? could you help me ?

thanks

PS: installing apk on device, it work fine :) pdf opens successfully

disusered commented 8 years ago

The javascript is expecting a callback from native code, when running in web environments it won't be available, it should be mocked or stubbed in your tests 👍