I have to bundle a folder with my android app. This is what the folder will have开发者_StackOverflow: 1. a sqlite database with pre-populated data - say a music DB. 2. a few sound files
The database should some how link a column to these sound files(preferably relative paths). I have to expose this db and the sound files to other apps through a content provider.
I got a simple db up in my assets folder and exposed it as a content provider. Where I am stuck is the mp3 part. How do I get to expose the soundfiles to other apps using a content-provider?
I do not want to store the sound files as data blobs in the DB.
I found some info here http://www.techjini.com/blog/2009/01/10/android-tip-1-contentprovider-accessing-local-file-system-from-webview-showing-image-in-webview-using-content/ But wondering how I can get my files to the app internal space in the first place(if i ever have to).
Do I have to do Uri.create, open the stream and then copy the already existing files (in my assets folder/or even the sdcard) one by one to another location, say my application space? ( I might have a 1000 files!)
thanks for any help!
- nimmi
精彩评论