0
votes

My Sencha Touch 2.1 web app works fine on iOS broswer, Google Chrome & desktop browsers. However, on native android browser I am not able to make any Ajax calls. It's just giving me an error:

Uncaught TypeError: Cannot read property 'connection' of undefined.

Web app works fine when using Google chrome on Android but not on native android browser. Phone's Android version is 4.0.3.

Has anybody experienced this before?

Thanks

2

2 Answers

0
votes

To handle Ajax calls in Android 4 you need to set the following:

Ext.Ajax.setDisableCaching(false);

Also set it in Ext.Loader, for example:

Ext.Loader.setConfig({
    enabled: true,
    disableCaching: false
});
-1
votes

To make sencha touch ajax work, please check these thing:

  • Ajax works with the URL which has the same domain and protocol (http or https).
  • The server response content-type must be text/html.

Good luck.