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.
Related
My Pixel 2 Android Emulator won't play sound, not from my app, not even from YouTube. I've restarted my computer, cold-booted the app, yet nothing works. I can use a physical device, but I'd like to have my emulator on the side while coding. Any Ideas?
Most of the other similar questions seem to be from 5-10 years ago, probably out of date? I've been working on this all day, so any advice is hugely appreciated.
Try restarting the virtual device from scratch without using a snapshot. Here are two ways to do that:
Change the power button on the virtual device so that it actually does what it is supposed to do.
Go to Settings->System->Gestures->Press & hold power button. Select the Power menu option. Then press and hold the power button on the virtual device and select Restart.
Start your virtual device with the Cold Boot Now option.
Fortunately, I found the problem, although it wasn't directly related with the Android Emulator. The problem was with my missing/outdated usb sound drivers. Here's basically how I fixed it.
Press on the Window Key
Type "Device Manager" and hit Enter
Open "Sound, video and game controllers"
Note the name of any of the driver with a yellow warning sign on it.
Head to Google, search for that driver name, and download it
Open the Android Emulator, Test, and Enjoy success :)
I'm following along with the tutorial provided by the Android Developers official site and using the help files in Android Studio, but I'm finding out of date screenshots and feeling very confused and a little frustrated.
I have a Pixel 2 connected via usb.
I've enabled developer mode on the device.
I've got it not sleeping when connected via USB.
I've enabled USB debugging in the Developer Options on the phone.
...I just need to figure out how to get my Mac to see it via Android Studio.
The tutorial alludes to a configuration screen that I don't see in studio. I see something similar but the device drop down is disabled.
Hit the sync button,
Wait for downloads(don't stop the hidden downloads)
Restart if necessary, wait for the first invocation to complete work.
Then enjoy your first app.
Happy coding :)
answer: hit the sync button (elephant/mouse looking icon with a diagonal arrow), wait for downloads, don't stop the hidden downloads, then restart if necessary, wait for first invocation to complete, ...then it will (hopefully) work.
I just installed Android Studio, and I am very new with this program.
So when I run the Android Emulator it says: "To Start Android, enter your password", although I have never set a password. When I just enter a word with 4 letters it says "The Password you entered is correct, but unfortunately your data is corrupt".
After that, I have to Reset the Phone, but when I do that the same menu with "To Start Android, enter your password" appears.
Maybe it is just an easy mistake, but as I said I am new with this. I also did some research on the internet but I did not find anything useful.
this is the 2 images that it showe me:
1)
2)
and after i clicked on reset phone, nothing happened.
I would be very glad if someone has an answer for this.
This is a late response, but thought this simple fix might help anyone else who comes across this problem in the future. What worked for me is the following:
In VS2017 ==> Tools ==> Android ==> Select: Android Device Manager
In the Android Device Manager window, you'll see your Android Emulator.
Make sure the far right column contains the button "Start" (if "Stop" appears, click "Stop")
Right Click the device, and select the "Factory Reset" option in the menu.
Your emulator should now be working. Good luck.
open AVD and right click on the emulator choose ->Wipe data option.
Check that your avd folder path doesn't include national symbols (in my case it looked like C:\Users\Пользователь\.android).
After I changed this path everything is working.
See this post of how to change path:
Possible to change where Android Virtual Devices are saved?
Check out "Viewing and managing your Avds" part. Try wiping data of your emulator or create a new emulator for yourself.
https://developer.android.com/studio/run/managing-avds.html
enable GoogleAPIs and Google Play Store
Change the Android version. I was creating an emulator with Oreo 8.1 and got stuck in with the same issue.
I created another with Marshmallows 6.0 and no more asking for password.
Then if you are using Oreo 8.1 try with antoher.
I created a virtual device, and after, I had to reinstall the emulator.
When I booted the virtual device, I got this issue.
I deleted it and made a new one, and it worked fine.
Just go the AVD Manager and Wipe Data. The problem will be solved.
Here are the steps I followed after my device corrupted.
Close your emulator
Open AVD manager, right click on your device and click "Cold Boot Now" button.
Sorry for a very Late Answer. But you can't create a x64 Virtual Device on x64 System. Your device needs to be x86.
Just a warning to anyone getting this error on an emulator instance that was working and you cold booted or something. I got this error and just stopped and cold booted again and it was gone! So try that first before wiping your emulator instance unnecessarily.
Deleted the device in the Device Manager and created a new one with a higher OS version (Oreo -> Pie). The error disappeared. Did not find the real reason yet.
I cannot get sound working in the emulator in Android Studio. It's not my code as it's a very simple example program to demonstrate the MediaPlayer that works fine on an actual device.
On the emulator in Android Studio there is absolutely no sound, not even system sounds. Is this an Android/Android Studio bug? Or could it be the configuration of my particular system? Windows 10 issue?
Anyone else having this problem? Any solution other than using a real device or Genymotion (which I've never used) ?? Thanks.
EDIT: The only way I can get the emulator in Android Studio to start with audio is to launch it from the terminal with both the "-no-snapshot" and "-no-snapshot-load" options. And this only works about 80% of the time. It has something to do with snapshots. There are a couple of old questions on this but no solutions.
it seems that the problem has something to do with the emulator api so changing the emulator api solved it for me and I guess it will do for you.
Try to open your Oracle VM Virtualbox. Go to Settings -> Audio -> Host Audio Driver and change it to PulseAudio.
Let me know if it helps.
In Android Studio, click the Volume Up button (doc).
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..