Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app copy protection and data files

In my app, I access my sqlite database at the following hard-coded location in my code:

/data/data/ com.mydomain.appname/databases/database.db

If I turn ON copy protection in the Market Place, will my app still have access to this location?

Or will I have to change it to something like:

/data-private/data/ com.mydomain.appname/databases/database.db

(or something like this)

Since I have a Dev phone only, I have no way of testing to see if my app still functions normally after turning on copy protection.

Thank you!

[edit: this question was rephrased for clarity]

like image 205
Ben Mc Avatar asked Jan 22 '23 13:01

Ben Mc


2 Answers

In my experience setting the copy protection to enabled does not affect how you access the files in your app in any way.

I will however recommend that you do not ever change the copy protection on that app to disabled. I made that mistake about 9 months or so ago and the users of my app were not very happy. Basically I had originally uploaded an app and enabled copy protection. I decided to turn copy protection off because of all of the reports about how weak/easily circumventable it was. So on my next update of that game I turned copy protection off. The problem with this is that the non copy protected version of the application could not read the files created by the copy protected version of the app. So people could not save or load their saved games or high scores. The solution was to completely remove the game and reinstall which is far from desirable.

They may have fixed this by now but I am not willing to test and find out.

like image 145
snctln Avatar answered Feb 04 '23 01:02

snctln


I also added my app with copy protection on but got reports from friends that they could not find the app on Market but as soon as I switched of the copy protection everyone could find my app. But there was no problem with data access or anything with the option turned on.

like image 34
Viktor Avatar answered Feb 04 '23 00:02

Viktor