- Add the JitPack repository to your build file
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency
dependencies {
implementation 'com.github.yueban:flipper-sqlcipher-plugin:1.0.2'
}
- Create a
SqlCipherDatabaseDriver
to init yourDatabasesFlipperPlugin
val client = AndroidFlipperClient.getInstance(this)
// add database plugin
client.addPlugin(
DatabasesFlipperPlugin(
SqlCipherDatabaseDriver(this, object : DatabasePasswordProvider {
override fun getDatabasePassword(databaseFile: File): String {
return if ("your database file name" == databaseFile.name) {
return "your database password"
} else {
""
}
}
})
)
)
client.start()
check sample for more details.
The minSdkVersion is 16, cause this library depends on android-database-sqlcipher
library which minSdkVersion is 16.