- Home /
Access existing folders android
Hello,
I've been trying to access existing folders on an Android system by using various methods in C#.
Specifically, I want to access existing images on an Android system, and I'm first trying to access the folders in which they're saved.
The latest I have tried is Directory.Exists ("/sdcard/DCIM/Camera"). This seemed to work a few builds ago, but after changing the Android Manifest (adding ) this method also returns false.
I am building for android API 23. Player settings have been changed to write to external memory, even though I am not writing any data.
DirectoryInfo dir = new DirectoryInfo("/sdcard/DCIM/Camera");
public Text instruction;
// Use this for initialization
void Start ()
{
instruction = gameObject.GetComponent<Text>();
instruction.color = Color.yellow;
if (Directory.Exists("/sdcard/DCIM/Camera"))
{
instruction.color = Color.red;
}
Are there any better, more reliable ways of accessing Android folders? Am I missing something?
Your answer
Follow this Question
Related Questions
Black texture shows using WWW on Android phone 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
C# for beginners in Unity for multi-platforms? 1 Answer
This shader (or Image Effect) is not working on Android 0 Answers