开发者

Deploying Android App

开发者 https://www.devze.com 2023-01-21 08:26 出处:网络
I have developed a database application for Android. Now I want to make it available to deploy it. But I don\'t how to deploy it with the 开发者_如何转开发database. I hope you might have used sqlite d

I have developed a database application for Android. Now I want to make it available to deploy it. But I don't how to deploy it with the 开发者_如何转开发database.


I hope you might have used sqlite database. Keep your sqlite database in your assets folder and create your apk. Android will take care of the rest.

    String myPath = DB_PATH + DB_NAME; 
SQLiteDatabase myDataBase = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE); 

where DB_Path = "/data/data//databases/"; and DB_Name = your database name

0

精彩评论

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