I'm now at my wits ends with Phonegap and its Plugins!!
I have created an a Phonegap app and it works and it runs well on android. I now wish to simply use the Facebook JS SDK. I have been using the plugin found here. But I keep constantly running into 100 different errors.
The code in the ConnectPlugin.java is saying that Plugins has been deprecated. But I'm using Cordova 2.3.0 and in the Cordova 2.3.0.jar the Plugin.java class exists as seen in the picture below:
I'm really not sure what on Earth to do now to get this plugin to work? I have tried everything and have searched the net for hours with no working solution. I just need the Facebook plugin to work. Please any help would really be appreciated!!
Should you ever have any plugin problems ie there is complainant about the Plugin Class as above, then at least for Facebook this problem has been solved here
Related
I have two applications one is running on android java,the other one is a cordova application. I need to use the android functionality on the cordova app. is therere a workround to this? I have been scratching my head for a week.
I have looked into Android plugins but i don't really know how to glue them together. I know Cordova can communicate back and forth with native code. But since i am an android developer and i have little idea on how cordova works with plugins Am Stuck with just my plain Android App built on java.
If you have a custom requirement, then your best shot is creating a plugin for Cordova which is well documented in the cordova docs. It will guide you on how to build as well as publish a plugin for Cordova.
Once you publish a plugin, you can add it using
cordova plugin add <plugin_name>
Having great difficulty adding AdMob to an existing Visual Studio Cordova project. Seems every plugin I try fails for various reasons. Either the compile fails, or perhaps it does a "require", which my app is not using Node at all. The google docs say that their Android app creation environs is required - but is that true?
If anyone has successfully added AdMod to their existing Visual Studio 2015 project (all client side), could you please share specific steps for doing so?
TIA
if you are looking to implement this, it is imperative that everything be loaded in the correct order. I finally got it .The only combo that worked for me was following exactly the code found in the cordova-admob git hub example.
I'd like to create a PhoneGap App and open a connection to another device through Bluetooth (https://github.com/don/BluetoothSerial). I started with the sample projects but nothing seems to happen with my settings, no events are triggered / console shows nothing.
I'm new to Phonegap and after struggling for days with installing NodeJs, Cordova (4.0.0), Phonegap (3.6.0-0.21.19), Ant, getting new Java JDK (1.7.0_71), updating Android (23, target here is Android API19) I can build and run Android apps. I followed http://www.pycode.com/android/creating-a-phonegap-cordova-3.0-app-in-eclipse.html as installation guide.
Nevertheless I couldn't build the jar file for Cordova (Target "jar" is not found), paths are set correctly. I searched online but the existing posts didn't help. Actually I found out that it's better to just use the CordovaApp-CordovaLib as a library, so I used this instead. Anyway it seems like I can't use any plugins at the moment (added in config.xml and gave Bluetooth permission in AndroidManifest.xml). I'm not even sure if this is the problem here.
Seems like many people are struggling with Phonegap and I hope somebody experienced the same issues and can help.. Thanks in advance!
Update
Figured out that the onDeviceReady method wasn't called at all. Checked for cordova.js (don't just use any!) and copied it into my C:\ProjectPath\platforms\android\assets\www folder.
Quite embarrassing, maybe that's why nobody's answered. I used the PhoneGap Developer App - of course this couldn't work. Use cordova build to build apk and test it on device..
I've build an application 6 month ago with phonegap 2.6.0. My application works great. I want to update my application with phonegap 3. I use the CLI to create the project, I copy and paste all the files in the new project. I had with the CLI the needed basic plugin (device information, camera...). this work.
But now, I've custom plugin that I've written that I need to put in my new project.
My question is: Do I need to rewrite all my custom plugin in order to get it working with phonegap3? Is there a way to use my "older" plugin in phonegap 3?
Thank you
Do I need to rewrite all my custom plugin in order to get it working
with phonegap3?
Yes, you will need to rewrite your plugin to use the new Cordova/phonegap. This is because a lot of things changed between how plugins interact with the main thread (on the native side) and how the JavaScript code is loaded into the page (now it uses require.js and AMD modules instead of just injecting the plugin code into window.plugins object.
Is there a way to use my "older" plugin in phonegap 3?
Unfortunately, no, there is no way that I know of to use old plugins.
Hopefully it won't take that much effort to rewrite your plugin. There isn't a plugin upgrade guide yet but it is something that is needed - as you do this upgrade, feel free to take notes about what you needed to do and donate those notes back to the community. This would be a tremendous help in starting the plugin upgrade guide.
I'd recommend going through these two docs:
Android Plugins
Plugin Development Guide
You could also probably look at the changelog for official Cordova plugins to see what they had to do between versions, but it might take some effort to determine the difference between bug fixes and updating the plugin code to work with new Cordova versions.
My objective is to have an IDE with JS syntax error reporting and a PhoneGap plugin.
My goal is to make an android application using PhoneGap.
I understand that Eclipse has a well supported PhoneGap plugin.
The issue is that I have spent hours trying to get Eclipse JS syntax error reporting to work with no luck.
Netbeans is extremely easy to install and has working JS syntax error reporting with no extra steps needed. For example, with NetBeans, I just install and everything (including JS syntax error reporting) works. With Eclipse, I must install, then install several addons related to JS. In the end, I could not get the JS syntax error reporting of Eclipse to work, despite hours of research. I am new to Eclipse.
Is developing an android/phonegap app with Netbeans IDE a good method?
I found this plugin, but don't know exactly how it works with PhoneGap or if it's any good: http://www.nbandroid.org/
The Phonegap plugin described here on the PhoneGap wiki includes the default Eclipse JSDT syntax checking. It also includes an option to turn on customizable JSLint checking - see Section 7 here. This all comes with a single plug-in to add the Android ADT.
If something's not working for you, it would be great if you raised the specific problem on StackOverflow, on the mailing list, or create an issue.
From 7.4 version Netbeans has Phonegap support without external modules.
Obviously you need also phonegap and android sdk :)
see http://wiki.netbeans.org/MobileBrowsers#PhoneGap_2