Page 1 of 1

project warnings in eclipse

Posted: Mon Apr 22, 2013 11:47 pm
by Sean Kelley

I am using exported appery project for first time in eclipse and I am seeing several warnings about type Plugin being deprecated related to childbrowser, barcode scanner, etc. Is this a problem?

On a related note, I am trying to get this working at least in eclipse:
https://github.com/remcob00/cordova-p...

Is it possible that something like this could be included in appery as plugin? It is only for android but the phonegape 2.4 InAppBrowser is not working well for youtube videos, and is really not a good user experience for in app video play.


project warnings in eclipse

Posted: Tue Apr 23, 2013 12:01 am
by Alena Prykhodko

Hello!
Could you please specify what exact warnings are there? Screen shots would be helpful. We'll take a look.


project warnings in eclipse

Posted: Tue Apr 23, 2013 11:18 am
by Maryna Brodina

Hello!

I am seeing several warnings about type Plugin being deprecated related to childbrowser, barcode scanner, etc. Is this a problem? -- No, it's not a problem

You can add any PhoneGap plugin in Eclipse.


project warnings in eclipse

Posted: Fri Apr 26, 2013 1:46 pm
by Sean Kelley

I wonder if there is something special I need to do for an external plugin to be seen by Appery's implementation of phonegap related to an exported eclipse project beyond normal plugin instructions provided but plugin developers.

For example, I am attempting to include the YouTube player api plugin and I am getting the error:
TypeError: Result of expression 'window.plugins.youtube' [undefined] is not an object
From what I can tell phonegap does not see my added plugin. I have reviewed developer instructions and wonder if my problem has something related to the Appery exported project structure that I am missing. Since phonegap is already included in exported project and not something I am including explicitly, I wonder if I am missing something.

The original plugin is info is here:
https://github.com/remcob00/cordova-p...

My attempt to get help on phonegap forum is here:
https://groups.google.com/forum/?hl=e...

Any clues would be greatly appreciated, as this is my first attempt at adding plugins outside of Appery and I know I will have to do more.


project warnings in eclipse

Posted: Fri Apr 26, 2013 4:12 pm
by Kateryna Grynko

Hi Sean,

Did you plug Youtube.js file provided with the plug-in?
On what event do you call window.plugins.youtube.show(...) ?
Try it on "deviceready" event.


project warnings in eclipse

Posted: Fri Apr 26, 2013 5:30 pm
by Sean Kelley

I did put the call in device ready. In my videoPage.js I have:
code // device events
j_336_deviceEvents = function() {

Code: Select all

     document.addEventListener("deviceready", function() { 

     //I  added 
     //window.plugins.youtube.show({ videoid: vid}, function() {}, function() {} ); 
     window.plugins.youtube.show({ videoid: "oHg5SJYRHA0"}, function() {}, function(e) {console.log(e)} ); 
     }); 
 } 

/code

And in my videoPage.html I have:
code
<script type="text&#47;javascript" src="res&#47;lib&#47;cordova&#46;js"><&#47;script>
<script type="text&#47;javascript" charset="utf-8" src="res&#47;lib&#47;youtube&#46;js"><&#47;script>
/code
I tried putting the youtube.js in assets/www directly but I have been moving it around in case there was a problem with location. It is now in assets/www/res/lib for now.

I also put this in res/xml/config.xml
code &#46;&#46;&#46;
<plugin name="YouTube" value="com&#46;remcob00&#46;plugins&#46;youtube&#46;YouTube"&#47;>
<&#47;plugins>
<&#47;cordova>
/code.

Here is my project explorer
Image


project warnings in eclipse

Posted: Fri Apr 26, 2013 6:11 pm
by Kateryna Grynko

First, try in Eclipse project settings set Android version 2.3 or higher.
Second, if in your app the expression window.plugins.youtube has a value="undefined" then youtube.js is not linked to the page.
If function window.plugins.youtube.show is defined, but when calling nothing happens then error is somewhere in plug-in Java code.