Search code examples
c#databasesqlitexamarinlocal-database

Xamarin Sqlite Local file path


I have an app (Xamarin.Forms cross platform) that uses SQLite to manipulate data locally. I have initialized the data values like this:

static UserDatabase database;

database = new UserDatabase(DependencyService.Get<ILocalFileHelper>().GetLocalFilePath("User.db3")); //sv67219.Diabetes_App.dbo"));

This seems to work perfectly, but i dont know where exactly is the database stored. In other words, where is "User.db3" stored? (Which folder?).

I want to know this because i want to view my database via DBBrowser. Coz without DBBrowser i have no idea what tables are being created and whats going on in the background (otherwise i use querying for each scenario to output values).

Thanks!


Solution

  • Step 1: Go to following directory

    C:\Users...\AppData\Local\Android\sdk\tools\lib\

    Step 2: click on the following application monitor.exe

    enter image description here

    Step 3: select the emulator

    enter image description here

    Step 4: Click on data folder and then again data folder

    enter image description here

    Step 5: Find your app (com.xxx.xxxx.xxxx) and then select files folder. Then you can see xxxx.sql