We are trying to use webcam js to initiate photo capture process in our android webview app. The code is perfectly working in the browsers, but when we deploy the page as webview in android app, it just shows up black screen after allowing webcam permission.
Here is the MainActivity. Java / Android Manifest File and PHP file that we are using
`
Note: We are using appetize.io to test our app. My android emulator is broken, and my smartphone kinda stopped installing apps few days back. So no way except for testing in appetize.io. Here is the url of that test: https://appetize.io/app/wz565bcb9ywcq6cwdmkd53x1uw?device=nexus5&scale=75&orientation=portrait&osVersion=8.1
We are trying to use webcam js to initiate photo capture process in our android webview app. The code is perfectly working in the browsers, but when we deploy the page as webview in android app, it just shows up black screen after allowing webcam permission.
Here is the MainActivity. Java / Android Manifest File and PHP file that we are using
`(MainActivity.Java package com.example.mbracegate;
import android.Manifest; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Build; import android.graphics.Bitmap; import java.util.*; import android.view.View; import android.webkit.PermissionRequest; import android.os.Bundle; import android.view.KeyEvent; import android.view.Menu; import android.webkit.CookieManager; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ProgressBar; import android.content.pm.PackageManager;
import androidx.annotation.RequiresApi;
public class MainActivity extends Activity { private ProgressBar progressBar; private WebView webView;
})`
Android Manifest `<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.mbracegate" >
`
html file `<!DOCTYPE html>