Reputation: 53
I made an application that has a large database. Spent a lot of time to build the content of the database .
When the software is run for the first time . The database Inside the device ( external memory ) is copied .
My question is : What should I do to the database file is not accessible by other programmers ? Is there a way of coding the database ? So others Can not use the database files ?
Upvotes: 0
Views: 28
Reputation: 25755
The Database of your application resides in your applications internal storage, which is not accessible for other applications. So it's "secure" by default.
However, on a Rooted phone, you can access the internal storage of the application and copy the database.
You can make it harder for a potential thief by encrypting the database. The problem with this is, that to access the database in your app, you have to decrypt it. Therefor, you'll have to store the password somewhere, which can be obtained by de-compiling your App.
There really isn't a 100% secure way to do this, if your database is stored on the device.
On the other hand, if the database is so valuable, you could have it on a server and allow access to it via API. This way, you can control (to some degree) who can access the database and don't run into the problem of people simply copying it. But this solution, too, isn't 100% safe.
Upvotes: 2