• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android Emulator Web Browser Needs Camera Permissions on macOS Catalina

Hi, I am in charge of testing a mobile-compliant website that also needs access to the device camera and microphone. I needed to expand the ability to test different Android devices, so I downloaded the Android SDK and created virtual devices. However, if I set the camera of any virtual device to "Webcam0" (to use my computer's webcam) and go to the url via the built in web browser, the entire emulator crashes immediately. macOS then generates the following report:

Code:
Process:               qemu-system-x86_64 [1487]
Path:                  /Users/USER/Library/Android/*/qemu-system-x86_64
Identifier:            qemu-system-x86_64
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        studio [1288]
Responsible:           studio [1288]
User ID:               673642719

Date/Time:             2020-04-29 11:50:56.314 -0400
OS Version:            Mac OS X 10.15.4 (19E287)
Report Version:        12
Bridge OS Version:     4.4 (17P4281)
Anonymous UUID:        B56B5142-EE7D-3D95-B70C-861201C1208B


Time Awake Since Boot: 2200 seconds

System Integrity Protection: enabled

Crashed Thread:        63  Dispatch queue: com.apple.root.default-qos

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace TCC, Code 0x0

The "Namespace TCC" points to a privacy issue. The new Catalina makes it v hard to access the camera (https://carlashley.com/2018/09/28/tcc-round-up/). I have googled how to work around the issue for Android development and the responses are something like the following:
That's great for someone who is actually building a native Android App, but I just want to launch the Android emulator and use its default web browser to test a website.

1. Is it overkill to use Android Emulator for this purpose? In other words, can I simply go to Dev Tools in Chrome desktop and resize the browser to the target dimensions of whatever Android device I want to test?

And

2. If it were not overkill / I had to do it via the Emulator, how would I do it? My hunch is to build a custom Chromium apk with the NSCameraUsageDescription settings in Info.plist and put it into the emulator via instructions here: https://developers.google.com/web/t...er-browsers#chromium_content_shell_on_android but that would require pulling down Chromium and making a custom build.

There should be a happy medium between these two solutions, right?
Thanks.
 
Back
Top Bottom