Home Webview and camera access
Reply: 0

Webview and camera access

user1241
1#
user1241 Published in July 21, 2018, 1:51 pm

I have a web app (secured via SSL) that has an access to camera.It shows camera captures in a canvas. It worked perfectly in the browser. However, I want the camera content to show in the Webview in my app. Here is my code in the method onCreate:

    final WebView myWebView = (WebView) findViewById(R.id.webView);
    WebSettings webSettings = myWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    myWebView.getSettings().setAllowFileAccessFromFileURLs(true);
    myWebView.getSettings().setAllowUniversalAccessFromFileURLs(true);
    myWebView.loadUrl("https://myvideoapp.me");
    myWebView.setWebViewClient(new WebViewClient());

Here is permissions i used in my manifest.XML

 <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.318538 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO