I'm trying to open URL in a WebView from a background service then take a screenshot of the hidden WebView.
Funnily enough it is not working! Is this possible? Some code snippets:
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