- Home /
Can other android apps delete save data of Application.persistentDataPath?
Hi.
My app saves user's data on Application.persistentDataPath. And my app's user said that his save data has gone after he used the CleanMaster (kind of data cleaning app of Android). So I wonder that other android apps can delete data of Application.persistentDataPath? If it is true, is it very danger to use Application.persistentDataPath to save user's data?
If someone has information about this problem, please reply.
Thank you in advance.
Answer by Larry-Dietz · Dec 28, 2017 at 06:19 AM
Application.persistantDataPath is unique to each app, so there shouldn't be any worry about another application accidentally accessing this data.
However, it is still just files in a file system. So applications that clean up your file system, removing data it believes is not needed, is always going to be a possibility. I do not believe there is any way to lock this data so these types of app can't delete it. It is always going to be a risk.
-Larry
Thank you for your reply. If we can't lock data of Application.persistantDataPath from another apps, I think it is very risky that to use Application.persistantDataPath to save user's data. Is there any safe path to save user's data on Android device?
Don't think so. Whatever directory you can access (to read/write), other apps probably (might depend on their permissions) can too. You could always try saving user data on a cloud platform. Yes, requires internet connection but you don't have to worry about data loss/manipulation.