开发者

How to add database to device?

I have sqlit开发者_运维问答e database in my system i need to add this data base to the device(in the application location).How to do this ????


You basically add code in your application that creates the database the first time it's used (Android will take care of the internals):

http://developer.android.com/guide/topics/data/data-storage.html#db


If your database is not very big - just place your DB file into assets and then during first run your application should just copy SQLite DB file from assets directory to your application data storage. See here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜