I need to take a screenshot on Android API 24.
If I'm using something like the code below, I'm able to take the screenshot but a video on the html page is black square!
float scale = webView.getScale();
int height = (int) (webView.getContentHeight() * scale + 0.5);
Bitmap bitmap = Bitmap.createBitmap(webView.getWidth(), height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
webView.draw(canvas);
I try to use PixelCopy but I can do it in Android Nuget!
How can I make a screenshot of the html page with webview videos on api 24?