Take in picture (just in memory) C# VisualStudio 2012

MartinSieradzkiMartinSieradzki Martin SieradzkiDEMember
edited September 2013 in Android

Hello Community,

i've got a question. I want to take a picture without writing anything to the internal storage.
I'm doing it with the following code (Take a picture => save in variable from storage => delete from storage).
But this doesn't work on every device, on some devices the pictures doesn't get deletet, it's just unreadable after "File.Delete()".

Here is my code:

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
base.OnActivityResult(requestCode, resultCode, data);
switch (requestCode)
case (1):
var s = GetFilePathFromContentUri(Uri.Parse(data.DataString));
var bitMap = BitmapHelpers.ResizeImage(s, 1024);
new File(s).Delete();
order.OrderImages.Add(new OrderImage(BmpToBytes(bitMap)));

I also tried File.Delete(s).

I hope you can help me.

best regards


Sign In or Register to comment.