Forum Xamarin.Android

How save image into DCIM/Camera folder??

LuanFauthLuanFauth BRMember
edited November 2014 in Xamarin.Android

Hello Xamarins!!

I need save a downloaded image into Camera roll folder, or other anyway name folder into DCIM path, but... nothing happen!!

I use this code:

var webClient = new WebClient();
byte[] arrey = await webClient.DownloadDataTaskAsync("");

string AcessoPath = Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim).AbsolutePath;
var filename = Path.Combine(AcessoPath, "Camera/photo.png");
        File.WriteAllBytes(filename, arrey);
catch (Exception ex)

On debugging, nothing happen. NOTHING!!!
Don't enter into catch, and don't appear any wrong or error message into output.

Exist anyone other way to save image (bitmap/byte[]) into DCIM directory?

Sign In or Register to comment.