- Home /
How do I hide my files on Android?
public void ConnectionDB()
{
if (Application.platform != RuntimePlatform.Android)
{
connectionString = Application.dataPath + "/DB.db";
}
else
{
connectionString = Application.persistentDataPath + "/DB.db";
if (!File.Exists(connectionString))
{
WWW load = new WWW("jar:file://" + Application.dataPath + "!/assets/" + "/DB.db");
while (!load.isDone) { }
File.WriteAllBytes(connectionString, load.bytes);
}
}
}
When I install my application on my phone "DB.db" file appears in the phone memory. I don't want the file to appear. How can I do that?
Comment
If you don't want something saved, don't save it.
If you want to save something but don't want it to be readable by the user whose device it is saved on, I think you're better off thinking about encrypting it rather than trying to hide the file.