question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exclusive access to the camera

See original GitHub issue

I am trying to implement the ZXing barcode library into my Xamarin.Forms project. Because I am having a few problems there I tried the android demo project from the library: Sample.Android.

This one seems to work well but it crashes when putting the app into background and getting it back into foreground with the following exception:

[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] System.Exception: Couldn't get exclusive access to the camera
[MonoDroid] at ZXing.Mobile.ZXingSurfaceView.GetExclusiveAccess () <IL 0x00033, 0x00150>
[MonoDroid] at ZXing.Mobile.ZXingSurfaceView.StartScanning     (ZXing.Mobile.MobileBarcodeScanningOptions,System.Action`1<ZXing.Result>) <IL 0x00046, 0x0028b>
[MonoDroid] at ZXing.Mobile.ZXingScannerFragment.scan () <IL 0x00012, 0x0007f>
[MonoDroid] at ZXing.Mobile.ZXingScannerFragment.OnResume () <IL 0x000fd, 0x00617>
[MonoDroid] at Android.Support.V4.App.Fragment.n_OnResume (intptr,intptr) <IL 0x0000a, 0x0009f>
[MonoDroid] at (wrapper dynamic-method) object.2ec0fbbb-3a10-48d4-b1ab-3fe72444ec91 (intptr,intptr) <IL 0x00011, 0x0003b>

Does anybody know how to fix this problem?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
f1nzercommented, Jun 8, 2016

@lukegore PR #325 should fix this, you can try it

0reactions
lukegorecommented, Jun 8, 2016

Thank you! works like a charm!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Windows only allow one application to access ...
So it was made the simplest and straightforward way: you grabbed the camera, it's yours and you can set it up for your...
Read more >
Manage app permissions for your camera in Windows
Manage app permissions for your camera in Windows · Select Start > Settings > Privacy & security > Camera, then make sure Camera...
Read more >
How To Fix Allow Access To Camera Missing - YouTube
Let's fix your iPhone if the allow access to camera is missing for certain apps in this quick and easy guide. ... Ah...
Read more >
How To Allow Access To Your Camera And Microphone
To allow access to the camera and microphone, you'll first need to open your browser and go to the site or app you...
Read more >
What we know about McCarthy's decision to grant Tucker ...
6 security camera footage. House Speaker Kevin McCarthy has reportedly given Fox News host Tucker Carlson exclusive access to thousands of hours ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found