Bug 9984 - Unable to reconnect to camera service when switching camera
Summary: Unable to reconnect to camera service when switching camera
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.20.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Marek Habersack
Depends on:
Reported: 2013-02-01 11:51 UTC by Paul Johnson
Modified: 2017-08-23 21:27 UTC (History)
5 users (show)

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

Source file showing the problem. (11.54 KB, application/octet-stream)
2013-02-01 11:51 UTC, Paul Johnson

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 Paul Johnson 2013-02-01 11:51:33 UTC
Created attachment 3322 [details]
Source file showing the problem.

Following the method outlined on the android developers website, I am finding that I cannot switch cameras in app. I am not sure if this is down to monodroid using an enum for CameraFacing (Java uses an int) or something else.

Attached is the source file which you should be able to connect to a test launcher quickly enough.

If I add in camera.Release() and then camera.Reconnect() after stopping and before reopening the camera respectively, I get different errors. If they are removed, I get the cannot reconnect to camera service error.
Comment 1 Paul Johnson 2013-03-12 12:34:30 UTC
This is still here in 4.6
Comment 2 Paul Johnson 2013-04-08 22:38:50 UTC
And 4.7
Comment 3 Marek Habersack 2014-07-30 17:47:01 UTC
Can you please provide a full solution with the repro? The activity you provided references resources that aren't available. Thanks!
Comment 4 Paul Johnson 2014-07-30 17:56:01 UTC
I'll see if I can create a solution for you today.
Comment 5 Paul Johnson 2014-07-30 19:29:45 UTC

A quick and simple demonstration. I've updated the code as well to remove the deprecated code
Comment 6 Cody Beyer (MSFT) 2017-08-23 21:27:01 UTC
Unfortunately, we’re unable to reproduce this report. If this issue is still occurring for you, please reopen this issue and attach a reproduction to the bug by starting with a clean Xamarin.Android project adding just the code necessary to demonstrate the issue.