Include database file with Android app via Eclipse

How can I instruct Eclipse to copy a file from my Android solution to the emulator as part of Run / Debug? I have a small database stored in Assets that should accompany the application. So far, I just copied the file myself using DDMS, but would prefer it to turn on automatically. Project properties allow me to specify some aspects of the assembly, for example. build order and which libraries should be included, but I see nothing about simple file copying.

+6
android eclipse database
source share
1 answer

Is the file in the "res / assets" folder inaccessible with the AssetManager class during testing or during testing or when installing through a signed apk?

I use a large file that I store in "res / raw" in one of my games, I can access this file during testing using eclipse without any problems, just using the usual calls to context.getResources (). openRawResource ()

Deploying databases in your application is a recurring topic in the Google Android development team here is a post with a few thoughts on this.

Good luck.

+8
source share

All Articles