On Dec 16, 2:25 pm, Haravikk <[email protected]> wrote:
> I can't say for sure but I doubt that would work; as .zip files can't
> really be modified in place without generating a whole new zip-file
> every time.

There is following interesting method in AssetFileDescriptor:
public FileOutputStream   createOutputStream()
So, it looks like we have a write access for assets :)

> I think the web-based download is probably the best idea, however,
> instead of downloading thefileall at once you could query the SQLite
> database, if the entry you want doesn't exist, then request just that
> entry from the web-site. This way you're only downloading small chunks
> ofdataat a time.

I like the idea, but currently I can't implement if for non-technical
reasons :/

> Otherwise I say just package it in your app as the SQL query required
> to populate the initial database; .zip compression is good at
> shrinking down textualdataso it shouldn't even be closed to 1mb
> afterwards, besides which 1mb is pretty insignificant these days,
> especially with 64gb NAND chips on the horizon.

That's the way I would probably choose. I had reduced my data file
(because of quite slow SQL performance). So, it is now much smaller
than 1 Mb :)

> On Dec 16, 5:44 am, Andriy Tsykholyas <[email protected]>
> wrote:
>
> > On Dec 10, 7:50 pm, "Mark Murphy" <[email protected]> wrote:
>
> > > > My idea is to put thisdataas afilein the .apk. Then, on initial
> > > > application launch to read thisdataand populate Android SQLite
> > > > database with it. Then just work with this database. But after the
> > > > database is populated the datafileis no longer needed. And I'd like
> > > > to remove it to free some memory.
>
> > > or just download it in SQLite format in the first
> > > place.
>
> > It just came to my mind... Is it possible to pack SQLine database in
> > the package and access it from SQLiteDatabase or SQLiteOpenHelper for
> > read/write? :)
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > Android App Developer Books:http://commonsware.com/books.html

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

Reply via email to