views:

779

answers:

2

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]

+3  A: 

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.

snctln
+3  A: 

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.

Viktor
I have not followed this lately but when they first introduced copy protection the protected apps would not appear on the ADP1.Here is an article that mentions it http://android-developers.blogspot.com/2009/03/software-update-available-for-android.htmlFTA: "However, developer phones like the ADP1 allow for unrestricted access to the device's contents, making it impossible to enforce copy protection"So basically to ensure that your app is seen on all phones with the Android Market leave this setting to disabled.
snctln
Strange thing is that they used normal HTC Hero and HTC Magic phones, some could find the app others could not. Sorry for going off topic here :)
Viktor