Bug 4157 - MediaPicker.TakePhotoAsync launches camera capture twice when rotating screen
Summary: MediaPicker.TakePhotoAsync launches camera capture twice when rotating screen
Alias: None
Product: Mobile API (Preview)
Classification: Xamarin
Component: Xamarin.Android ()
Version: Preview
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Eric Maupin
Depends on:
Reported: 2012-03-30 10:26 UTC by Chris Tossing
Modified: 2012-04-13 11:45 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Chris Tossing 2012-03-30 10:26:07 UTC
To reproduce:
1. launch the media picker sample
2. make sure you are in portrait mode
3. tap the Take Photo button
4. rotate the screen to take a landscape photo
5. tap "Done" or "Accept" (still in landscape mode)
6. stay in landscape mode
7. notice the camera is launched again
8. tap the back button
9. notice no image is displayed

A few things to note:
* if you start in landscape mode and stay in landscape mode, the camera is not launched again, returns normally, and displays the image
* if you start in portrait mode and stay in portrait mode the entire time (even to tap "Done" or "Accept"), the camera is not launched again, returns normally, and displays the image
* if you follow the above reproduction steps, the first photo taken is saved at the original filename - however, the returned task.Result.Path is the original filename with "_1" appended before the ".jpg" extension - if you take another photo, you end up with two photos on the file system - if you don't take another photo as in the above reproduction steps, the returned task.Result.Path points to an empty file (the "_1" appended filename), but the first photo taken (with the unchanged original filename) is on the file system
Comment 1 Chris Tossing 2012-04-10 18:40:31 UTC
Do we have an idea when this might get fixed?  We would like to do a release of our app soon, but it relies on camera functionality.  The current behavior "works" fundamentally, but it would be much preferred to have a more professional, polished experience for the user before releasing.
Comment 2 Eric Maupin 2012-04-11 20:37:09 UTC
This has been fixed and the available .zip has been updated ( http://xamarin.com/mobileapi )
Comment 3 Chris Tossing 2012-04-13 11:45:50 UTC
The fix seems to work great.  Thank you!