- Application Preferences
- Barcode Scanner
- Child Browser
- IMEI
- Video Player
The next step in the plugin migration to the new API will be to conform with Andrew Lunny's proposal for a Cordova Plugin Spec. Moving to this spec will make it much easier for PhoneGap dev's to discover and install plugins. Yup, exciting things are coming down the pipe. I'm going to work on that as soon as I can but I wanted to make sure I got these updates out before my vacation.
Enjoy!
Update (2012/08/09): As of PhoneGap 2.0 the plugins.xml file has been deprecated. It has been replaced with config.xml. So if you are starting a brand new project that has config.xml in the res/xml directory you will need to add your plugin declarations to this file. If you are using an older version of PhoneGap or upgrading an older project to PhoneGap 2.0 you can still use the plugins.xml file as we've got backwards compatibility (sort of). Please note though config.xml will take precedence over plugins.xml so you should not have both files in one of your projects as you'll end up tearing your hair out.
Enjoy!
Update (2012/08/09): As of PhoneGap 2.0 the plugins.xml file has been deprecated. It has been replaced with config.xml. So if you are starting a brand new project that has config.xml in the res/xml directory you will need to add your plugin declarations to this file. If you are using an older version of PhoneGap or upgrading an older project to PhoneGap 2.0 you can still use the plugins.xml file as we've got backwards compatibility (sort of). Please note though config.xml will take precedence over plugins.xml so you should not have both files in one of your projects as you'll end up tearing your hair out.
You're changes are so great: clearly distinguishing plugin versions for cordova <1.8.1 versus 2.0.0. Thanks!
ReplyDeleteI may not have been paying attention lately.. is it accurate to say that res/xml/config.xml === plugins.xml + cordova.xml? Either way is supported in 2.0.0, but may change in the future?
@Libby
ReplyDeleteWell the current thinking is all platforms will be moving to config.xml so expect plugins/cordova.xml to go away in the future. I would have preferred that we would have decided on what is in config.xml before introducing it in Android but Joe rushed it into 2.0.0. Expect some tag name changes going forward.
Thank you very much for this update, I have been waiting for a long time. I'll test later how it's workign.
ReplyDeleteI just realized you must be saying that 1.9.0 is to be chucked over the fence, so to speak.
ReplyDeleteCollective groan still audible..
hai simon i used ur link for keyboard but i have a problem how to solve this?kindly solve this issuehttps://groups.google.com/forum/?fromgroups#!topic/phonegap/MB4xrmCYmvc,http://stackoverflow.com/questions/11686368/show-hide-keyboard-is-not-working-propery-in-android-phonegap#
ReplyDeleteWhat about 1.9.0? Does the plugin spec has been frozen yet? Should I update my plugins accordingly? Will they work correctly with the current 2.0 release?
ReplyDeleteThanks!
Hi all,
ReplyDeleteI have tried to integrate twitter in Android using phonegap 2.0 version.But what happens is when I tap on Start Twitter oAuth button I am getting the message Getting authorization, but it is not redirecting to the next process. I have done using phonegap1.9.0 successfully. But could not do using 2.0ver. What may be the problem and what's the solution?
Regards
Ashwini
Simon, I 'm new to Phonegap but I can see the amazing work thath you are doing for the phonegap comunity. Could you please make an update for the Low Latency plugin for Cordova 2.0.0? I am looking for help a long time ago...
ReplyDeleteThanks!
Thanks for this plugin Simon, but I think you should update the documentation on inserting the line into config.xml and not plugins.xml. Newbie like me stucked hours figuring out why your plugin didn't work, and a good soul at stack-overflow pointed out I should write the plugin line into config.xml instead. Anyway, thanks again for this awesome plugin!
ReplyDelete@imin
ReplyDeleteYeah, I will update the post to mention that. If you are using the old plugins.xml file it will work but if PhoneGap detects a config.xml it will use that first.
@nicoprofe
ReplyDeleteThat actually isn't one of my plugins. You can tweet at Andrew Trice and as him to update it. Alternatively, you could follow my instructions from this post to update the plugin to 2.0.0 yourself. Then send a pull request to the repo to have your name immortalized in open source software development history.
@Ashwini
ReplyDeleteCome on over to my Formspring account as this sounds like it would be a bigger discussion.
@Ashwini I had a similar issue with the 2.0 release with a Facebook SSO not returning correctly anymore. I did post an issue on the JIRA tracker, but unfortunately the team dismissed it (https://issues.apache.org/jira/browse/CB-1161).
ReplyDeleteI would not recommend using 2.0 in production as it has some strange bugs for android.
@Olivier
ReplyDeleteHmmm...that is odd. I can't get into JIRA right now as it is down. I've been away for a bit and I'd like to look into this some more. Are all the details in the JIRA ticket?
@Olivier
ReplyDeleteUndoubtably you've seen my posts on how to upgrade your plugins. I've gotta set up a meeting with other core PG Plugin developers to put together the plugin roadmap.
@Libby Baldwin
ReplyDeleteYeah, I wasn't exactly happy with how 1.9.0 went down.
Hi Simon,
ReplyDeleteI am using Cordova 2.0 and I am tryin to use the same version of the barcode scanner plugin. I am having an error..
TypeError: cordova.exec is not a function
[Break On This Error]
cordova.exec(successCallback, errorCallback, 'BarcodeScanner', 'scan', []);
is there something specifc I need to consider for the plugins tag in config.xml..?
my config.xml has an entry .. like
is this correct..?
thank you
Domnic
@Domnic
ReplyDeleteI believe if you are the same person from the PG mailing list you were trying to load the barcode scanner before the cordova.js file.
Hi Simon,
ReplyDeleteThats true. I am still stuck up in running a code that can scan a bar code and get the results on an alert. I tried all possiblities.. I am sort of at the edge now.
I am getting this error:- Phonegap class not found exception when I am starting an app that uses the barcode scanner.
wish I had someone who can help me.
thanks
Domnic
@Domnic
ReplyDeleteZip up your project and post it somewhere and I will take a look at it.
Hi Simon,
ReplyDeleteThat is very kind of you.
https://docs.google.com/open?id=0B49NPqa2UD4GSVZsOUo1SEtRQUU
The error I am getting is..something related to the flashlight..and I tried to comment out the code that enables flashlight.. but still no improvements.
Hope you could give me a better insight.
thanks
Domnic
thank you
Domnic
@Domnic
ReplyDeleteYou are missing one of the key steps in your setup of a PhoneGap Android project. The main activity does not have the following attribute:
android:configChanges="orientation|keyboardHidden"
Without it the app will be restarted on orientation changes which is why this isn't working for you. See the getting started guide:
http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android
as it is documented near the end of step 3.
Hi Simon I got an issue on blackberry simulator using phonegap 2.0 any help please
ReplyDeletegap:["NetworkStatus","getConnectionInfo","NetworkStatus(),true]
gap:["Device"."getDeviceInfo","Device1",true]
gap:["App","show","App2",true]
usePolling gap_callbackServer:
getPort gap_callbackServer:
gap_poll:
@HighTechMan
ReplyDeleteI don't do the BB side very often. It looks like you are using the wrong cordova.js. Each platform has their own version of cordova.js.
How do you add the following into config.xml for phonegap build?
ReplyDeleteandroid:configChanges="orientation|keyboardHidden"
@Robert Frew
ReplyDeleteAt the end of step 3 on this page shows how to add it to your manifest.xml.
This looks like an active PhoneGap community so hopefully this is a good place to pose this question...As a veteran programmer but relative PhoneGap & Android newbie, does anyone know where I might find a PhoneGap plugin for the new Android ioio ("yo-yo")interface for hardware peripherals?
ReplyDelete@John Goluch
ReplyDeleteSorry, I do not know of such a plugin.
Hi Simon!
ReplyDeleteAfter I was trying to run my app with your plugin I got that logcat error when I'm tapping on the video to play:
Uncaught ReferenceError: cordova is not defined at file:///android_asset/www/scripts/video.js:10
I'm using the latest ver of phonegap, the 2.1.0. Have you got an idea, what could be the matter?
@Ádám Metz
ReplyDeleteDid you make sure you loaded the cordova.js script file before the video.js script?
Thanks for your reply Simon!
ReplyDeleteMeanwhile this annoying issue is solved, but I got another one, and I don't know how to fix it.
I have to tap twice on the link, that points to the required video to start playing immediately, just after the second tap.
here is my link
a href="#" onclick="playVideo('file:///android_asset/www/video/120508_Fragmin_Norge.3gp')
My question is: Is it possible to play the video after the first tap?
Thanks for your answer in advance!
Adam
@Ádám Metz
ReplyDeleteThere should be no reason why it doesn't play after the first click/tap.