I am using genymotion emulator http://www.genymotion.com/ but when I opened the camera , I got message \"cannot connect to the camera \" , what is the problem ?
I tryied all the suggestions above including restart adb but None worked Then I see a suggestion on an English-language website My English is not good so I can not totally understand it and I forget the URL of the page..
However the final suggestion is delete your virtual device in genymotion and just re-create a same one, maybe you will work.
I followed that advice and I succeeded. So I come here to share.
Just expanding the @sivi's answer:
In my case, i just re-established the connection to emulator using these :
adb kill-server ---> adb start-server
and it started working perfectly.
UPDATE Made it a community wiki in case someone else has something to add, I can't keep this updated right now :)
It could just be that you didn't activate the camera for the emulator. Opposed to the stock emulators that once you set up the webcam they just work, on genymotion emulators you need to turn the cameras on. The process is very simple.
On the emulator window, press ctrl+3 or ⌘+3 to bring the camera configuration panel that looks like the left, and turn it on like on the right:
You can select a dummy camera which will show a genymotion logo moving around the screen or use the system camera if it's available and preview it. Note that on the above screenshot I'm using the phone front camera instead of the back camera.
Here is another solution. I've tried all of the above and frustruately none of them worked. Eventually I found out that if I rotate the device to landscape the camera is working. otherwise I get the green screen. Hope that helps someone..
just end your ADB.exe process or similar in MacOS kill adb and it will automatically re start hence genymotion needs it and you will be able to use your camera, ADB is probably keeping the cam busy.
If you are using eclipse, I found out going to DDMS and then Devices you can reset the adb. You can find the option by clicking on the drop down arrow that says "View Menu".
Example to find Rest adb.