1. Are you ready for the Galaxy S20? Here is everything we know so far!

Android Emulator Web Browser Needs Camera Permissions on macOS Catalina

Discussion in 'Android Development' started by Jimmy Zhang, May 11, 2020.

  1. Jimmy Zhang

    Jimmy Zhang Lurker
    Thread Starter

    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 (Text):
    1. Process:               qemu-system-x86_64 [1487]
    2. Path:                  /Users/USER/Library/Android/*/qemu-system-x86_64
    3. Identifier:            qemu-system-x86_64
    4. Version:               0
    5. Code Type:             X86-64 (Native)
    6. Parent Process:        studio [1288]
    7. Responsible:           studio [1288]
    8. User ID:               673642719
    10. Date/Time:             2020-04-29 11:50:56.314 -0400
    11. OS Version:            Mac OS X 10.15.4 (19E287)
    12. Report Version:        12
    13. Bridge OS Version:     4.4 (17P4281)
    14. Anonymous UUID:        B56B5142-EE7D-3D95-B70C-861201C1208B
    17. Time Awake Since Boot: 2200 seconds
    19. System Integrity Protection: enabled
    21. Crashed Thread:        63  Dispatch queue: com.apple.root.default-qos
    23. Exception Type:        EXC_CRASH (SIGABRT)
    24. Exception Codes:       0x0000000000000000, 0x0000000000000000
    25. Exception Note:        EXC_CORPSE_NOTIFY
    27. 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?


    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?


Share This Page