getJSON returning null phonegap(android) -
I am developing a phone-gap app in Android. In the app, I am calling a servlet called Returning JSON. Under app code, I am calling the following method through index.html in javascript
JQuery.getJSON (omnibal, function (data) {warning (data)});
When the emulator warning is being displayed, but the data is always zero. However, if I launch index.html (main application file in phonegap) from the browser, then I can get Jason.
That's it, even if I use $ ajax, please help me and tell me what I'm doing.
A little later, but I still have this problem, and I have solved it, so if you If you do not correct this problem then it will be helpful.
Therefore, the problem is not in JSON or PhoneGap, but it is in the Android manifest .xml file.
You should have a tag like this:
Android: Usage-permission Android: name = "android.permission.INTERNET" />
This should allow your application to work with the internet without this connection of your Internet connection is prohibited. This tag needs to be kept right after the opening tag.
Check the PhoneGap Sample Manifest for a complete list of possible permissions.
Hope this will help someone.
Comments
Post a Comment