Integrating ormlite-4.9 with sqlcipher-2.08
Asked Answered
W

2

6

I'm integrating ormlite-4.9 with sqlcipher-2.08. I've googled around but, I didn't succeed. I also saw Mr. Gray's answer(How can I use ORMLite with SQLCipher together in Android?) about integration. I tried by his answer. However, I guess it was for older versions of ORMLite and SQLCipher which has different packages than mine which is downloaded from http://sqlcipher.net/sqlcipher-for-android.

Can someone explain me a bit in detail?

Woodie answered 7/10, 2012 at 17:46 Comment(2)
I know nothing about ORMLite, but to follow his instructions, just change info.guardianproject.database.sqlcipher to net.sqlcipher.database.Edelstein
refer to my answer here https://mcmap.net/q/735367/-how-can-i-use-ormlite-with-sqlcipher-together-in-androidPatriarchy
C
3

I just add the same problem than you. The problem is that you have to change the ormlite-android.jar code to make it work with the SQLCipher lib. So what you have to do is :

  1. Download the SQLCipher latest version from here or directly from the website
  2. Unzip the folder then copy it in to your project.
  3. Add the zip in the assets folder to your build path.
  4. Download the ormlite-core code for 4.46 (you can try higher but i don't guarante that it is going to work), you can do it here.
  5. Add the library to your libs folder
  6. Download this git project : https://github.com/d-tarasov/ormlite-android-sqlcipher
  7. Copy the source folder in your project
  8. The package of ormlite classes have changed so just correct it.

And it should work :) Let me know i you have any problem with that !

Charqui answered 16/7, 2014 at 8:4 Comment(2)
My friend @Eliott, this question asked 2 years ago. Thaks for replaying, I will try use this.Woodie
No worries, it is just when i see your question and i was looking for an clear answer i didn't found it so I decided to put it for futur people which gonna have the same problem :)Charqui
S
2

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.

Speedy answered 18/9, 2014 at 9:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.