2

I want to create an application.
My app is a book and I created a SQLite database for my data as "mybook.db" that is 3.5 MB in size.
I tested my app and all activity works good!
Now I want to publish it on the Play store.

I used In App Billing for selling my content to premium users, but I realized that my database is available on "./data/data/myapp/database" and also in the asset folder of apk package, and anyone can copy and use it! :(

Now what I can do to save my data?
is it possible to convert sqlite to android class?
is it possible to encode data?
How I can save relation between may data?

Please help me...

----------- Edit ------------ i don't want use SQLCipher !

is there any way to use another data structure for saving data?

  • There can be two ways for your problem : 1) Use a online database i.e. you can configure according to users access rights. 2) Use an encrypted database to store the data. – Ashish Ani Dec 25 '15 at 18:20
  • And high encryption should be used while saving db in local directory. – Ashish Ani Dec 25 '15 at 18:23
  • 1
    Your `assets` folder, as well as the `database path` are **local to your app**. Only **rooted** devices will show those folders contents. – Phantômaxx Dec 25 '15 at 18:26

1 Answers1

0

You could encrypt the data before saving to database and then decrypt when reading it back in. Here is a SO question/answer on how to do it.

Community
  • 1
  • 1
DavidR
  • 6,622
  • 13
  • 56
  • 70