1

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?

G. Ciardini
  • 1,210
  • 1
  • 17
  • 32
  • check below link https://stackoverflow.com/questions/9745988/how-can-i-programmatically-take-a-screenshot-of-a-webview-capturing-the-full-pa – Madhav Oct 02 '19 at 13:15
  • Is the video encrypted - if so this is the expected behaviour? – Mick Oct 04 '19 at 10:03

0 Answers0