Forum Xamarin.Android

Write to Portable Storage in Android

DanysChalifourDanysChalifour USMember ✭✭
edited February 2017 in Xamarin.Android

I Explain Myself, i don't want awnser like: "Add permissions to your manifest", because its not the problem.

When I use
string s =Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath,"NewDirectory"); Directory.CreateDirectory(s); string[] x = System.IO.Directory.GetDirectories(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath);

It successfully create a Directory in an INTERNAL folder from Android.OS.Environment.ExternalStorageDirectory.AbsolutePath.

The Problem is when I want to access PHYSICAL sd card it throw an Access Denied Exception and I can't manage to find the solution, everybody tell me the same awnser, while they don't understand the question.

This throw the error
string s =Path.Combine("storage","SdCard","NewDirectory"); Directory.CreateDirectory(s); string[] x = System.IO.Directory.GetDirectories("/storage/SdCard");


Sign In or Register to comment.