[mono-android] Random Access on Assets

Jonathan Pryor jpryor at novell.com
Wed Mar 23 13:04:07 EDT 2011


On Mar 23, 2011, at 12:30 PM, Aaron Knabb wrote:
> I feel like maybe I'm misunderstanding something. I have a fairly sizable file (10-20mb) that I need to deploy with my app. I need to be able to perform .Seek() on its stream to pull various parts out.

Have you tried storing the file uncompressed? I would expect that to support streaming (though I haven't actually tested).

To store a file uncompressed within the .apk, within Visual Studio, edit your Project Properties, and on the Application tab there is a "Leave the following resource extensions uncompressed" text input area. Add the appropriate file extensions (e.g. ".dat"), and the file will be stored in the .apk uncompressed.

Otherwise, try using Android 2.3.3?

> So I guess I'm just wondering if there is a way to automatically deploy a file along with my application every time I run in vis studio and have that file allow seeking. If not, I'll just work around it by doing some copying mechanism out of the assets.

I wish. Such a mechanism would have allowed install-time extraction of assemblies. I only found one such way to do so -- add the files to the .apk as lib/armeabi/libFOO.so -- then read them from the $APPDIR/lib directory [0].

This was deemed an ugly hack, and was later removed.

 - Jon

[0] http://mono-android.net/Releases/Previews/Preview_5



More information about the Monodroid mailing list