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.
+2
A:
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.
franklins
2010-10-27 03:12:26
But when I refer to the database through openorcreate() method, it is created in /data/data/<app.package>location. Please tell me how can I use it from assets folder?
Mudassir
2010-10-27 03:15:23
String myPath = DB_PATH + DB_NAME; SQLiteDatabase myDataBase = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE); where DB_Path = "/data/data/<app.package>/databases/"; and DB_Name = your database name
franklins
2010-10-27 03:21:09