2 Apr 2012 4:02 AM #1
Unanswered: Ext.util.jsonp request does not work on device android 2.3 / iphone 5.1
Hello. I have a simple application that requets data to a server using ext.util.jsonp.
My server is made with Embarcadero Delphi 2010, and runs on local network over port 81.
If I use google chrome to run the application, it works good and ext.util.jsonp request gets information from server. I use for the url: "http://192.168.0.10:81"
But if I try it with iphone or android device on the same network, it does not work. For iphone I have put the files on a public server, but with android I have made an apk with eclipse and phonegap, and install it on the device.
I use jsonp to avoid cross-domain problem, as said in documentation.
No error is reported, but ext.util.jsonp does not connect neither run the callback function.
2 Apr 2012 6:34 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You should use a remote debugger to see if there are any errors. Also would look at server logs to see if the server was hit and with what params.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
2 Apr 2012 10:14 AM #3
Yes, the first thing I did was activate debug on safari (on iphone), but no errors reported in my phone. It doesn't call "callback" function. I put index.html the code here:
With my iphone 4G (ios 5.1), and with my arnova 7b G2 (android 2.3), only alert message "requesting..." is shown. No errors in safari debug on iphone.
As you can see, a local ip is used. The PC in this computer runs a http server that works good because with google chrome (on the same pc but with network ip) works good.
Thanks for your help.
7 Aug 2012 7:06 AM #4
Jsonp does not work on Android emulator
Is there a solution for this problem? Even I have run into the same issue. Infact twitter app also does not work when you bundle it as an apk and deploy on Android emulator.