Why Android Studio Emulator cannot use my laptop webcam? - android-camera

Android Studio 3.0.1
Windows 10
Java v9.0
Please excuse my level of a-maturity. But, I cannot use laptop webcam as front or back camera in Emulator, although, I set it in AVD Manager, Virtual Device Config setting. In API level 23, I have camera App, when I open it in the Emulator, it says, "cannot connect to camera". On API level 26 and 27, there is no camera app.
Also, I am sure, my Webcam is defined and active in Windows 10, device Manager.
I would be really thankful, if any body can help me in this regard.
Also, here is the [log][1] file when I open camera app in Emulator.
There are some similar questions about Emulator Camera in here, I tried them but I got no result.
When I start Emulator, my camera LED indicator start to flash in the beginning. But it turns off after a few seconds.
[1]: https://pastebin.com/jZyenaU0
[1]: https://i.stack.imgur.com/behFz.png
[2]: https://i.stack.imgur.com/MNgEQ.png
[3]: https://i.stack.imgur.com/1S4QG.png

Related

Android apps worked in usb debugging but not in android emulator (white screen)

I run "ionic cordova run android" using visual studio code.. but the apps shows white screen in the emulator.. it display properly if using USB debugging.. the device also display properly if install using the apk.. the reason why I want to use emulator because I want to debug "http://10.0.2.2".. this is my emulator setting..
Emulator setting
Things that I have done is as per below
Choose ANGLE (D3D11) for OpenGL ES Renderer at the emulator advance setting
Choose Software - GLES 2.0 graphic for the Emulated Performance during create emulator
Try both R and Q for the system image during create the virtual device
Update the SDK based on the system image set at the emulator
System image selection
Issue
I compile the source code at different laptop (Laptop A) and it manage to display error at the web console using google inspect
it display "newtrustedfunctionforjit fn.bind is not a function"..
Founding
the issue is related to the chrome version 83 and the browser need an upgrade to solve the issue
The emulator is not using a browser (it using web view) hence I cannot update the google version
Solution
download new skin for newer android model into laptop A
download same skin on the laptop B (the laptop that I initially come with this post)
Below is the explanation from GitHub for angular
Explanation about the chrome issue
Below is my new System Image
Release Name S
API Level 31
ABI x86_64
Target Android 12 (Google APIs)
New System Image

Failed to start Vuforia on Unity UWP executable build

I'm trying to build a very simple UWP app (for PC Desktop only) with a single image target and camera using Vuforia on Unity.
Everything works fine in the Editor, but after I build and run the app I get the following error on a black screen :
I don't even know where to debug this, as the only log I get is this error and nothing else. I also tried delayed initialization, but this same behavior happens when I manually call VuforiaAppllication.Instance.Initialize(); after it's initialized and before it's started.
Here's my build settings :
I'm using Unity 2020.3.30f1 and Vuforia 10.2.5, the only target SDK installed on my system is 10.0.19041.0 and also, I have Visual Studio 2019 Community installed if that info helps.
Fixed by disabling my laptop's webcam from device manager, and connecting an external USB camera.

Visual Studio Code - Flutter : "Device emulator-5554 is offline"

I have just spent an hour reading through similar questions on Stack Overflow, and they are all for Android Studio, not Visual Studio Code. Also, I am doing Flutter development, so don't have access to adb commands, such as adb kill-server.
Everything was fine, unlike I clicked the power button on my emulated Android. Now, when I run/start debug and select active device, I get Failed to launch Nexus 5X API 29 x86: Error: Emulator didn't connect within 60 seconds.
How can I restart the emulated device? When it appears, clicking the power button does not seem to do anything. Is there a flutter terminal command?
Or can I somehow use a different emulator (if so, how)?
I faced the same issue with Android Virtual Device and Memu emulator so I switched to Genymotion.
I am using Genymotion personal edition which works amazingly and it's very light on resources too as compared to AVD and Memu.
You can download Genymotion Personal edition from Genymotion Personal Edition
Apart from Installing emulator Image you should also consider installing the GAPPS bundle in the emulator as it does not comes with it preinstalled. GAPPS will be needed in many apps requiring Google Play Services.
Here are the docs on how to install GAPPS in Genymotion emulator: GAAPS Docs
GAAPS Website
My Genymotion Emulator is Google Pixel 3a, 9.0 API 28.

Emulator device offline

I am trying to build android Oreo source code in ubuntu 14.04,it is built successfully but the emulator is not turning on.I tried by restarting the server and check for android devices,it shows that the device is offline and I am not able to turn it on.Suggest a way to solve this issue.Thanks in advance.
link followed-
https://source.android.com/devices

Can I use Unity remote with a Android emulator instead of Android phone?

Unity Remote is good app. It allows to connect with Unity while you are running your project in Play mode from the editor.
But what if I want to test game but I don't have an Android phone? Yes, it happens ¯\_(ツ)_/¯
I have a great Android emulator: Nox APP Player
The emulator doesn't have USB, so it just show me standsrt text Connect device with a USB cable ..... bla bla bla ...Game in the Unity Editor is running...emulator doesn't display the game.
Can I somehow connect this emulator to unity using Unity Remote? Or using something else? How?
Not sure if you still need the solution for this problem, but I think I should leave an solution for those who come later.
You can connect Nox with Unity via UnityRemote (I'm using Unity Remote 5) with the adb of Nox. Here the steps :
Rename your adb.exe to other (i.e adb_origin.exe). It's normally located at SDK folder\platform-tools
Go to Nox installation folder\bin, looking for nox_adb.exe, copy it to the location of your origin adb.exe
Rename nox_adb.exe to adb.exe
Open cmd and enter : adb.exe connect localhost:62001 and you will see "already connected to localhost:62001". If not, you can try replace localhost by 127.0.0.1
Then apply steps 3 → 7 of #Alexey
At the Resolution dropdown, you can choose Normal (default is Downsize) to have better image quality on Nox
Note that after all of this, you should restore the origin adb.exe for later use.
Here is my result picture :
Hope this will be useful.
Took from https://gamedev.stackexchange.com/a/126192/81175
I was able to run Unity Remote 4 on standard Android emulator.
Final effect looks something like
Whole procedure:
Install Unity and open some Unity tutorial project (2D Roguelike tutorial in my case)
Install JDK, Android SDK and setup Android emulator using AVD Manager.
My emulator config looks like this:
Important note: CPU/ABI option seems to be one of most important ones(Intel x86 emulator didn't work for me)
Then install Unity Remote 4 from apk file to emulator using command: adb.exe install path/to/apk (Windows) or adb install path/to/apk (Linux/Mac).
Then in Edit → Preferences → External Tools — set paths to Android SDK and JDK
In Edit → Project Settings → Editor in section Unity Remote select: Any Android Device.
In File → Build Settings — add Your scenes and switch platform to Android.
Press PLAY in Unity while Android Emulator is running and Unity Remote 4 app is opened.
Tip: At first I needed to restart unity after all changes, because it wasn't starting game on emulator. Now it runs everytime.
However, it works for AVD Manager emulators. I've tried them too, before I asked the question, and they didn't work because of CPU/ABI Intel x86 as #Axxxon said...now it works with CPU - ARM armeabi...
Unfortunately NOX APP PLayer doesn't connect. Maybe it because it's not have CPU/ABI settings. Or I just don't get how to launch this player with Unity.
It is said. Because NOX APP has touch simulating, screen shaking and other good stuff for checking game. AVD emulators doesn't have these things :'-( therefore they are useless for me.
But maybe this answer will help to someone.