Android app copy protection and data files

狂风中的少年 提交于 2019-12-12 09:45:31

问题


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]


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/2300807/android-app-copy-protection-and-data-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!