views:

88

answers:

1

Hi folks, i am developing phone-gap app in android. In app I am calling a servlet returning JSON. Under app code I am calling following method through javascript in index.html

JQuery.getJSON(servleturl,function(data){alert(data)});

When running in emulator the alert is getting displayed, but data is always null. However if i launch the index.html (main application file in phonegap) from browser, I am able to get Json.

same thing happens even if I use $ajax. please help me and let me know what I am doing wrong.

A: 

I fixed up (read made the changes to get working under a newer version of node.js) a little tool called ibug that John Boxall wrote that I found useful for debugging on the phone (since there is no real way to do it except debug.log and looking at XCodes console window. Its basically a stripped down firebug lite, and its hosted on github as ibug. Hopefully it will help you figure out why things aren't working.

Kris Erickson