How can I use ORMLite with SQLCipher together in Android?

前端 未结 5 2183
轻奢々
轻奢々 2020-12-05 15:12

I would like to use OrmLite with SQLCipher in my Android project, but both libraries have their own abstract SQLiteOpenHelper class to implement. Java don\'t a

5条回答
  •  臣服心动
    2020-12-05 15:51

    I know this is quite old thread. But I had to go the same way recently. I've read two threads in search for solution: this and this.

    1. I followed ge0rg's answer, it almost worked, were some problems and I have to replace methods inside my code (I wanted to avoid it).
    2. I did what Eliott Roynette suggested here and it worked good except I needed to add one method to Helper class to accept password and I did it.
    3. I wanted to exclude code into lib to have more smart solution instead of code mix, so I build lib/module separately.

    And now I have solution that works (you can clone working demo from GitHub). Placing my answer into both threads to help others in the future.

提交回复
热议问题