mirror of
https://github.com/bitwarden/mobile
synced 2025-12-23 03:33:59 +00:00
initial commit
This commit is contained in:
22
src/Android/Services/SqlService.cs
Normal file
22
src/Android/Services/SqlService.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Bit.App.Abstractions;
|
||||
|
||||
namespace Bit.Android.Services
|
||||
{
|
||||
public class SqlService : ISqlService
|
||||
{
|
||||
public SQLite.SQLiteConnection GetConnection()
|
||||
{
|
||||
var sqliteFilename = "bitwarden.db3";
|
||||
var documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Documents folder
|
||||
var path = Path.Combine(documentsPath, sqliteFilename);
|
||||
|
||||
Console.WriteLine(path);
|
||||
var conn = new SQLite.SQLiteConnection(path);
|
||||
|
||||
// Return the database connection
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user