On Mar 14, 2:17 am, Dianne Hackborn <hack...@android.com> wrote:
> On Tue, Mar 10, 2009 at 6:36 PM, Justin Allen Jaynes 
> <jus...@ragblue.com>wrote:
>
> > 1.  Why is there a file size limit on resources in the raw or assets
> > folders (such a small limit, that is)?
>
> Assets are normally stored compressed, so currently opening it requires
> uncompressing into an in-memory buffer.  From that perspective, 1MB is
> pretty big -- it's over 1% of the total memory available to the kernel and
> all apps on the G1!
>
> To get around this, you can store your file uncompressed -- the new aapt has
> an option to turn off compression for custom fie extensions -- so you can
> read it directly from the .apk as an AssetFileDescriptor.  It would also be
> nice to support streaming access that uncompresses while you read...
> patches welcome. :)
>
> > 2.  Does this limit apply to all raw and asset files, or only to files
> > that you get an input stream for?
>
> It is compressed files.  PNGs, MP3s, etc are not compressed in the .apk
> since their data is already compressed.
>
> > 2.  Can I change the file size limit, or is it a fixed feature?
>
> Fixed.
>
> > 3.  Is it appropriate to split a raw file into two or three files and
> > read them in as three consecutive separate streams, all output to one
> > file?  Or is this a bad practice since they must have implemented a file
> > size limit for storage conservation reasons?
>
> Sure, that is fine.
>
> > 4.  Can I delete the resources from raw or assets at runtime (or is this
> > totally invalid since the compiler sets up R.raw to have methods
> > representing the files) to save space?
>
> Not at all, sorry.  You .apk is completely read-only.
>
> > 5.  How big is too big an application? (mine is a large word dictionary
> > and the whole app after first run takes 4 meg)
>
> Given the storage space on the G1, that is pretty big -- 5-10% of the space
> available to all applications, their private data (Gmail messages and such),
> and the browser cache.  That size of an .apk will probably reduce the number
> of users you have, depending on how valuable people find the app to be.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.

How do we specify to not "compress"  some resource data in order to
break the 1MB limitation using Eclipse ?

Carlo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to