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 ?
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.
If all the other solutions do not seem to work you can
keep the virtual device working and restart eclipse,
and the adb process and it should work. It worked for me. My guess is that the connection to adb is already taken by some other camera and that's blocking your current camera from connecting to the IDE development with the virtual device.
If you are using Intellij Idea no need to restart Genymotion or IDE.
Genymotion: Switch off camera
Intellij IDEA: From menu select Tools/Android/"Enable ADB Integration"
Genymotion: Switch on camera
It should works for you as well.
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.
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.
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.
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.
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..
Related
Google glass 2 stuck on the "Glass" screen, I tried restarting it, but it shows the logo and nothing changes.
I tried to make a factory reset - holding the camera button, clicking on the power button, and continue holding the camera button. I show me the recovery screen with options, but nothing is selectable, clicking on camera button won't let me select or click anything.
Is there any way to make a full factory reset to fix this "Glass" screen issue to make it working again?
As i am not allowed to put a comment i give you following answer....
Have you tried to do a factory reset with ADB as described here:
How can I do factory reset using adb in android?
How to factory reset android using adb
This is the factory reset commands with adb in your command line:
adb reboot bootloader //device will restart
fastboot devices //this will print a device code if it worked right
fastboot erase userdata
fastboot erase cache
Then manually reboot device. You'll need adb and fastboot.
If that doesn't fix the problem, and you don't care about keeping a warranty intact, you can re-flash the firmware. If you care about a warranty... use the warranty.
The firmware is available for the Explorer Edition here, if it's Enterprise E2 it'll be here. Enterprise E1 firmware isn't available freely as far as I know, so if it's EE1 you're out of luck.
The firmware files come with a text file which contains the adb commands you need to run. Run them all in the order they're written. The final one will restart your device. Voila. Clean slate.
If it still doesn't work after that, it's a hardware problem.
With my previous laptop (Windows7) I was connecting to my phone camera via DroidCam and using videoCapture in OpenCV with Visual Studio, and there was no problem. But now I have a laptop with Windows 10, and when I connect the same way it shows orange screen all the time. Actually DroidCam app in my laptop works fine, it shows the recording. However while using OpenCV videoCapture from Visual Studio it shows orange screen.
Thanks in advance
I found a solution from the internet, and while searching found lots of people complaining about that. You disable the camera of your laptop from device manager and then restart. It is working then.
It seems like a bug from the DroidCam app taking over the main source.
Follow these steps:
Press "Win" key
Type "Device Manager"
Unfold "Sound, video and game controllers"
Right-click DroidCam Source 3 or similar
Click on "Disable device"
Repeat step 4
Click on "Enable device"
This is a solution that worked for me. Let me know if it does it for you. Note that "re-enabling" DroidCam may result in the same problem again.
I have a big problem!
When I want to start camera in Eclipse AVD android emulator it shows Unfortunately, Camera has stopped. When I start App Camera - light near my laptop camera turns on, but just for a few seconds. It turns off when I click at error communicate "OK". I have Lenovo B590 laptop. I've updated my drivers. My camera works in Skype. I tried running my AVD with another target and another CPU(atom etc), but still same error.
I tried all solutions for my problem from this site (and another), but none worked. I need to write the program, but I can't test it when the camera doesn't work.
Screenshot with my AVD settings:
I had the same problem on an Lenovo X220. I solved it by installing a "fake-cam" driver.
According to me, first of all check your system drivers and calculate how many drivers are not present in system or not updated or which are outdated via driver max or update my driver software then install/update web camera,usb bus related, memory related, chip-set related and port and processor related drivers install(you can install the driver by CD when ever you purchase your computer at that time some shoppers are given that)
Then edit your AVD back camera value set=webcame0 and give the size of your SD card and memory then click edit and then ok and run you camera application. I'm sure that camera will start.
I have never had an issue debugging in Android until I switched to my current workspace. It happens in both Eclipse and IntelliJ. Previously I had an issue where the phone would hang at the "Waiting to attach debugger" dialog. Somehow I fixed that so the debugger at least attaches to my app.
Now I can set a breakpoint and have the debugger stop at that point. After about 5-10 seconds it disconnects no matter what I do. I'm able to read a few values of variables in memory before everything disappears. My co-worker is able to debug the same app just fine using Eclipse and we haven't been able to figure out what is wrong or different between our workstations (besides me using IntelliJ). We might have different images for our laptops though.
Any ideas? I've had to use Log statements for now but they are just too slow compared to using an actual debugger. I've tried using different USB cables and that didn't make much of a difference. I've gone through the debugger settings and nothing seemed out of the ordinary. Other Q/A's on SO have mentioned the app silently crashing, but I'm ruling that out due to it debugging fine for my co-worker.
I've been having the same problem running IntelliJ IDEA build IC-133.193. I solved the problem with the following actions:
Quit IntelliJ
From a command line kill the adb server with adb kill-server
From a command start the adb server as superuser with sudo adb start-server
Restart IntelliJ
IntelliJ will start the adb server if it detects that it is not running. The key appears to be starting adb as superuser before starting IntelliJ.
[Update] This doesn't always work. The best solution I've found is to start the app on the device and then attach the debugger to the Android process through the Run menu. I haven't had any disconnections using this method.
I have been fighting for a few days with adb not seeing my device. After trying many other posted solutions, I discovered that the issue was with Chrome also trying to connect its debugger to a web view. If Chrome is connected using chrome://inspect, then adb seems to disconnect. Quitting Chrome resolves the issue. Then I can connect with Android Studio and then restart Chrome and reconnect. Hope this helps someone else.
This fixed it for me
Go to Power Options on your computer
Click 'Change plan setting' on your chosen plan.
Click 'Change advanced power setting' on your chosen plan.
Expand 'USB Settings' .
Expand 'USB selective suspend setting' and change it to disabled.
This issue occurs to me when I try to use a USB 3.0 port. Using a USB 2.0 it does not happen.
This happens to me when the cable connection is sensitive.
When I try to debug using one of the configurations that I've set up (for example Android233), the emulator never actually launches. I just see a little green icon in my task bar that says "launching Android233," but it never launches. I've let it sit there for hours and it never does anything. I don't know if this is related, but my emulators don't show in device view in the DDMS perspective. I have a physical Android device, which shows up in device view. My question is, what is happenin' and how can I fix it?
Thanks for taking the time to read my question :)
I thought I had the problem figured out, but it stopped working again. Here's more information: When I run my debug configuration, in the lower right corner of my Ecplipse windows it says:
"Launching MyDebugConfig (100%)" and then there's a green icon next to it.
I looked in task manager and the emulator is not in there. I looked in DDMS and my AVD is not listed and there is nothing in the LogCat or Thread or anything else for that matter. I have my debug configuration set to prompt me to pick a device, but it never does that. It just loads my AVD, even if I have my phone connected (which is visible in DDMS). I'm so stumped. I've had this problem since I started using Eclipse and I don't know what to do.
Thanks.
Go to DDMS Perspective =>Click View menu=>reset adb
If Your genymotion virtual device is not seen in android device monitor then just try this.
1. start android studio
2. start Android Device Monitor
3. Lastly start the genymotion virtual device it will appear
The emulator won't show up in the DDMS section until its running.
The emulator won't lunch probably because you misconfigured it, currently the lunch dialog of the emulator doesn't support error messages, however you can get the lunch stack trace while you try to lunch the emulator via Eclipse.
Disconnect your physical device, run your project and select the emulator. you should see an error message on DDMS console.
If you in Windows try run (after starting emulator)
adb.exe kill-server
adb.exe start-server
and wait for restarting your adb