Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Running into "land mines" with Android app and large files

We've run into two problems with Android, and were wondering if there's a place where things like this are documented?

  1. Downloading small files via Titanium.Network.createHTTPClient works. When trying to download a large file (6mb) the download hangs and crashes at about 54%. Setting a timeout value with c.setTimeout(99999999) has no effect. It still crashes in the same spot.

  2. Opening and using a very small Sqlite database works great. If we replace that database with a larger one (10mb+) the app just crashes when trying to access a recordset.

Is there some sort of file size problem with Android? What other limitations are there that we should be aware of?

— asked March 15th 2010 by Mark Burggraf
  • android
  • debugging
  • files
  • large

1 Answer

  • It looks like the problem with downloading large files is that the entire file is being stored in memory before being written to disk. Thus, once the app runs out of memory, it crashes.

    Is there any way to download directly to a disk file?

    — answered March 15th 2010 by Mark Burggraf
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.