tag:blogger.com,1999:blog-5478652748522272780.post776747905226700663..comments2023-07-12T05:39:38.387-07:00Comments on CodeLog: How to fetch android sqlite db file from device in Mac Xamarin/Visul Studio.Suchithhttp://www.blogger.com/profile/13334981347260075605noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5478652748522272780.post-38793533897925903792019-08-06T05:13:28.989-07:002019-08-06T05:13:28.989-07:00Check in which path your db file saved. if it is s...Check in which path your db file saved. if it is same same as above mentioned location(System.Environment.SpecialFolder.Personal), then just run the above method from your activity class. If it is in diffrent location just change the source path inside the method accordingly.Suchithhttps://www.blogger.com/profile/13334981347260075605noreply@blogger.comtag:blogger.com,1999:blog-5478652748522272780.post-82032917890020604382019-08-06T04:49:38.230-07:002019-08-06T04:49:38.230-07:00public class LoginDbHelper : SQLiteOpenHelper
{
...public class LoginDbHelper : SQLiteOpenHelper<br /> {<br /> private const string APP_DATABASENAME = "App.db";<br /> private const int APP_DATABASE_VERSION = 1;<br /><br /><br /> public LoginDbHelper(Context ctx) : base(ctx, APP_DATABASENAME, null, APP_DATABASE_VERSION)<br /> {<br /> <br /> }<br /> public override void OnCreate(SQLiteDatabase db)<br /> {<br /> db.ExecSQL(@"CREATE TABLE IF NOT EXISTS Login(<br /> Id INTEGER PRIMARY KEY AUTOINCREMENT,<br /> UserName TEXT NOT NULL,<br /> Password TEXT NOT NULL)");<br />}<br />public override void OnUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)<br /> {<br /> OnCreate(db);<br /> }<br />this is my code how to Reterive my App.db to App_backup.dbAndroid Developerhttps://www.blogger.com/profile/15286903013901722559noreply@blogger.com