Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I don't have a lot of information at the time on this issue as I wasn't able to find anything in a logcat.
Basically what happens is when using Xamarin.Mobile to take an image using TakePhotoAsync. When the camera exits and returns to my activity it causes my activity to restart.
This behavior is only present on Galaxy S4 phones running Android 4.3, when the phone is rotated to the left when taking the photo. (All other orientations work, and all other devices I've tested seem to work fine as well)
This code also worked fine on the Galaxy S4 before 4.3 and the recent camera firmware update.
Using the regular Android method for capturing an image works fine (Calling the capture intent and listening on OnActivityResult)
@Ryan: Would it be possible for you to provide a small testcase?
The code I am running is as follows.
public static Task<MediaFile> CaptureImageAsync(Context context)
var mediaPicker = new Xamarin.Media.MediaPicker(context);
var options = new Xamarin.Media.StoreCameraMediaOptions
DefaultCamera = Xamarin.Media.CameraDevice.Rear
, Name = "temp.jpg"
The code that calls this:
protected async void CaptureBarcodesUsingCamera()
var barcodeImage = await ImageBarcodeDecodingHelper.CaptureImageAsync(this);
Just found that I was not using the latest Xamarin.Media. I was on version 0.6.3, I switched to version 0.7 using the GetTakePhotoUI helper method instead of TakePhotoAsync and this has resolved the issue.
My apologies for the bug report.
Closing as INVALID as per Comment #3.