Page 1 of 1

Using a phonegap plugin

Posted: Wed Mar 05, 2014 11:28 pm
by neogucky

I'm currently trying to workaround a problem where video and audio on an Android devices storage won't be played.

I want to try either of the following plugins:
https://github.com/macdonst/VideoPlayer
https://github.com/michalzubkowicz/Fi...

I have troubles integrating those plugins in my appery.io project. Following the instructions on the pages I did the following:

I added the js files (ie. videoPlayer.js) to ANDROID/MyApp/assets/www/files/resources/lib/
I added the java files (ie. videoPlayer.java) to ANDROID/MyApp/src/com/phonegap/plugins/video/
I added the plugins to ANDROID/MyApp/res/xml/config.xml likes this:

code
<widget>
&#47;&#47;here are a lot of <feature> blocks
<plugins>
<plugin name="videoPlayer" value="com&#46;phonegap&#46;plugins&#46;video&#46;videoPlayer" />
<plugin name="FileOpener" value="com&#46;phonegap&#46;plugins&#46;fileopener&#46;FileOpener"/>
</plugins>
</widget>
/code

And I added the js files (ie. videoPlayer.js) to the "external resources" tab in App settings.

I know for sure, that the js files are loaded correctly and the methods are successfully registered in window.plugins. But when I call one of the functions, I get this error: "exec() call to unknown plugin: videoPlayer".
I think, this means, I didn't load the java files correctly. Do you have any suggestions how I could solve this problem?


Using a phonegap plugin

Posted: Wed Mar 05, 2014 11:59 pm
by Igor

Hello,

Are there any errors if you will try to export app as .apk file?
Did you use our tutorial when you adding plugin? http://docs.appery.io/documentation/u...


Using a phonegap plugin

Posted: Thu Mar 06, 2014 12:00 pm
by neogucky

Thank you. I haven't seen that tutorial.