Question by
Figment_Beennn · Jun 15, 2017 at 04:16 PM ·
c#androidwwwpermissionswrite data
Writing Files to Android Device
I'm having trouble writing files received via WWW to an android device.
The save location is using Unity's Application.persistentDataPath
:
/storage/emulated/0/Android/data/**/files/
Writing method:
File.WriteAllBytes(GetDirecroryPath(Dir.ROOT) + file, www.bytes);
Error:
UnauthorizedAccessException: Access to the path '/storage/emulated/0/Android/data/**/files/' is denied.
Any help or advice would be greatly appreciated.
Thanks
Comment
I should also note, 'Write Permission' is set to 'External (SDCard)'.
I am also able to create directories, it appears to only be files downloaded.