I am trying to open a URL in a WebView from a background service, and then take a screenshot of a hidden WebView.
Oddly enough, this does not work! Is it possible? Some snippets of code:
webView.setVisibility(View.INVISIBLE); ... final Picture picture = webView.capturePicture(); final Bitmap b = Bitmap.createBitmap(picture.getWidth(), picture.getHeight(), Bitmap.Config.ARGB_8888); final Canvas c = new Canvas(b); picture.draw(c); ....
thanks
source share