It is important to note that you can't just package the database in
your apk and start using it.  You'll have to create it first (which
creates an empty database at the path specified by Mark) and then
manually perform the steps necessary to re-populate it.

Based on a suggestion by Mark, I exported my database as a Raw string
resource and executed those command on the database the first time my
app is run.

On Oct 23, 6:48 am, Mark Murphy <[email protected]> wrote:
> Maxood wrote:
> > Where is this path:
> > /data/data/your.package.here/databases?
>
> On your emulator or device, though you can only browse to it on the
> emulator. And, of course, "your.package.here" is replaced by your own
> app's package name.
>
> > None of the books talk about where to keep the db file?
>
> The "db file" is on the device or emulator.
>
> Bear in mind that you never really have to care where the actual
> database is stored on the device, and that the above path I cite may
> change in future Android releases. Just provide the name of the database
> (e.g., constants.db), and Android handles the location for you.
>
> > Do i have to create a databases folder just like we create raw for
> > video and audio files?
>
> You are confusing resources and databases. Resources are packaged as
> part of an application and do not change. Databases are not (generally)
> packaged as part of an application and (frequently) change.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 1.5 Programming 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