Cordovarduino not working - javascript

I'm using cordovarduino with phonegap to connect an arduino via OTG to a android app built using phonegap. I programmed an arduino to send data (working and verified on terminal), but when I connect it to the phone then it doesn't give any output.
Am I missing something , like allowing a permission or so?
The git used by me for reference : https://github.com/xseignard/cordovarduino

I figured out the problem using console.log and other console output. The problem was I hadn't added the plugin to the config file. Doind
phonegap plugin add cordovarduino
& re-building solved the issue

Related

Phonegap app can not connect to database on mobile

I have been been working on an app in phonegap and make login and register with JavaScript and ajax call.
So I tested it on Google Chrome and it works perfect, connecting on server (mysql) and inserting data etc... So I decide to build app to test it on mobile (android), and it just not responding when I click on register or login button.
Is there some code or file which I need to import ?
Check the url you are connecting with in the ajax call, if its a full path
Application did not receive internet connection, so I changed my config.xml file.
Core plugins I found here: https://build.phonegap.com/plugins

Jsons doesn't load after upgrading the phonegap version to cli-5.4

I am developing an application using phonegap and builds using phonegap build.
Previously I used phonegap version 3.7. With that version I was able to load data to my app and make them display.
But I had to update the version to cli-5.4 to initiate push notifications. After that it does not load json. But all others working fine.
Somebody please explain what should I have to do.
Thank you
It could be a whitelist problem. Whitelist in Android was moved to a dedicated plugin due to security problems in Cordova 4 I think. Also have a look at the whitelist guide

Phonegap upload not working

I am using phonegap for the first time and attempting to get a simple image uploaded to my server. I am using the js from the Full Example in the docs (http://docs.phonegap.com/en/3.3.0/cordova_file_file.md.html#FileTransfer)
I am able to pull up the image gallery and select the image, but nothing is being uploaded to my server, and neither the success or failure callbacks are being fired.
I am not sure if it matters but I am using phonegap build and I am currently testing on iOS but this will eventually be on Android as well.
Any ideas?
after trying to manually run the functions through the debug console I realized that I had the file plugin but not the FileTransfer plugin installed. installing that appears to have fixed it.
The phonegap documentation is sorely lacking!

Is it possible to get this facebook plugin working with pure phonegap app

This might be really a basic issue. I am kind of confused. I don't understand one thing. Phonegap app is pure html5 and javascript. But for this plugin (https://github.com/davejohnson/phonegap-plugin-facebook-connect/tree/master/example/HackBook) to work we need separate java code for android and xcode for ios.
I got the java version of the android tutorial working with the simulator but when I just copy the assets folder to build a pure phonegap app. it does not work.
Then it beats the purpose if i still have to maintain 2 code lines.
Does just the html and JavaScript code in this plugin is not supported by phonegap app without java or xcode.
Here is my phone gap app. you can download it. https://build.phonegap.com/apps/211586/share
My code in the git repositiry is here
https://bitbucket.org/sunmeet/phonegab2.0_fbapi
PhoneGap Build service only Supports ChildBrowser , Barcode Scanner, Google Analytics recently.
if you try to use any external plugin which needs assets other than HTML / CSS / JS, you can't use them with PhoneGap Build Service. But, PhoneGap Team are trying to push out different plugins like Facebook Connect in Future Releases.
So, here they gave two Options to Deveopers.
Use Child Browser and Do Process Facebook OAuth Authentication.
Build Locally.
Andriod developement environment is "Eclipse" IOS
developement environment is "XCode"(OS: MacOS)
I Suggest you to work with first option and once plugin is our from build service its really easy to integrate anytime.

Phonegap app working locally, not working on phone

I have written a phonegap application, and it performs a pretty simple task, it gets some JSON from a YQL link, and then displays it nicely to the user. This works excellently when I run it using Google Chrome on a Desktop, but, my client tells me that it does not work on his device which is Android 2.3. What can be going wrong? I'm using phonegap build to build to app, and they tell me that it is given internet permission, but, when my client puts the APK on the phone (its not on the market yet), does he need to do something special for it to access the internet?
Thanks a lot,
Dhaivat
in phonegap, allow external host : Open phonegap.plist -> external host and add your url or * to allow all
within the phonegap app the webapp runs under the file:// protocol - this might affect things.
you should test this at least on an emulator yourself - clients usually screw up anything some might screw up when testing ;) best would be to test on an actual device tho.
I'm not sure if this will help but I had a similar problem testing my app here:
https://stackoverflow.com/questions/17496104/json-wordpress-feed-not-appearing-in-android-studio-emulator-using-phonegap
I needed to change access origin to ="*"/ in my config.xml

Categories

Resources