hi,gus.
let me tell you the db path.
/data/data/YOUR_PACKAGE/databases/
just copy your db file to that directory.

i successly copy note_pad.db to that dir, and successly read the data
in note_pad.db using SQLiteDatabase API.

but ,when i copy another db file which is larger (about 16Mb), i
encounter IOException.

I try many times. always IOException.
Maybe the file is too large.

is  there a limit size in YOUR_PACKAGE directory?


On 2月21日, 上午4时27分, burton miller <burton.mil...@gmail.com> wrote:
> yeah - same problem here.
>
> i determined that (2 months ago) it was impossible.  here are your
> options:
>
> 1)  copy the db from your apk (as a raw resource) to the file system
> at run time, and access it there - which doubles the size of your db
> footprint.
> 2) download your db upon installation
>
> my db is 5MB, so i had to go with option 2, which results in a ~1
> minute installation when you first run the app.  this is a shitty
> solution, but right now that seems to be it.  if your db is small, use
> option 1.
>
> On Feb 18, 3:56 pm, mcssys <mcs...@gmail.com> wrote:
>
> > I have the same need.  Any help would be greatly appreciated.
>
> > And...
>
> > 1. When an application is installed on a device, is the same directory
> > structure that is used on the Emulator duplicated on the device.  When
> > I try to view the device directory structure, I get a "opendir failed,
> > permission denied" so I cannot verify if it is the same structure.
>
> > Thanks!
>
>
--~--~---------~--~----~------------~-------~--~----~
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