devanshu_kaushik
devanshu_kaushik

Reputation: 969

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 expected 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?

Upvotes: 0

Views: 81

Answers (1)

Shane Powell
Shane Powell

Reputation: 14148

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.

Upvotes: 3

Related Questions