im working on Android 4.0. i have a WebView where i want to capture its screen. i Override the WebViewClient onPageFinished as folow:
@Override
public void onPageFinished(WebView view, String url) {
Picture picture = view.capturePicture();
Toast.makeText(finplan.this, "picture height "+picture.getHeight()+ " url "+url, Toast.LENGTH_LONG).show();
in another procedure i called the loadUrl:
mywebview.loadUrl("http://www.google.com");
// this one works fine and picture.getHeight() is > 0
mywebview.loadUrl("file:///android_asset/test.html");
// this one works, but the picture.getHeight() retrieved in onPageFinished is always 0
test.html is a any simple html file, i notice later that any loadUrl with "http//" works fine but dont works on 'file://'. Any help in this ???