开发者

Blocking access to my app's database

I need to block user access to my app's data stored in the SD card... like the images etc as they are crucial to my app's proper functioning and if deleted by mistake, will cause the application to function way different from what is expecte开发者_StackOverflow中文版d of it. Is there any way to do so programmatically, like when I create this directory structure during my first run, lock the access to it to be only unlocked when the app runs?


Short answer... NO, it's not possible at all.

If it's that important, you could store all your data in a encrypted file. That way if it's deleted then you know it's all deleted and you have to start again. You also know that it's 'most likely' haven't been tampered with.

Most likely tho, the best solution is to handle errors better and become a more robust application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜