Database File Location For Sqlite Within Monodroid
When using the following code to copy a SQLite database from an Assets folder , the output is being put in the following folder: '/data/data/AndroidTestDb.AndroidTestDb/files/Andro
Solution 1:
Use Context.GetDatabasePath to obtain the filesystem path for your database file:
// Assuming a Context subclass, e.g. an Activitystring dbPath = GetDatabasePath("AndroidTestDup.db").AbsolutePath;
Solution 2:
There is no direct way, the closest I can think of is:
// someContext may be the current activityStringoutFileName= someContext.getFilesDir().getParent().getAbsolutePath() + "/databases/AndroidTestDup.db";
Solution 3:
My idea to find out the sqlite database in monodroid is,
-First Install any android File Explorer application in your emulator.
-Then using the application just select any location you want to store your database.
-Then Use "adb push " command in adb. to copy your source database to a mobile location that you have selected.
-So now you know path of the database.
-Just use that path in your program.
Thank you...
Post a Comment for "Database File Location For Sqlite Within Monodroid"