-
17 Jul 2012 12:02 PM #1
EXT.Ajax.request on Large Files is Broken Android 2.2
EXT.Ajax.request on Large Files is Broken Android 2.2
I know it is a very small user case but I can confirm an issue much like what is posted here
https://groups.google.com/forum/?fromgroups#!topic/phonegap/apQEO2pRdNo
Essentially using Ext.ajax to load a large file will return a Status of 0 on Android 2.2. It works fine on Android 2.3 and above though. I know this is a Ext issue as if I switch over to jQuery $.ajax and load the exact same file it works without a problem.
It would be nice to not include jQuery into my application but for now that's the only way it will work loading large local files with ajax.
-
18 Jul 2012 5:23 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
How large of a file are we talking about?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
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 services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
18 Jul 2012 8:25 AM #3
I was loading a 2.6mb file but I am going to go out on a limb and say it will happen with anything over 1MB, this is only a guess though. I started down this road because of this issue.
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
I hope this post will help some people but if you are trying to build for android 2.2 using Sencha you will have a problem because your app.js will likely be larger then 1MB. Android 2.2 will attempt to compress this and break. You will receive an Error reading "Data exceeds UNCOMPRESS_DATA_MAX"
My work around was to rename app.js to app.jet and fix the reference in my index.html file also JUST for android builds. This is stupid, but it works. Only files listed on that website for NO compression will work over 1MB.
Again this is ONLY Android 2.2, as 2.3 has fixed this problem. You will need to do this for any files in your www folder that are larger then 1MB and do NOT have a extension listed on that page.
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote