WebView rendering can take a long time for long documents, and indeed, onNewPicture is deprecated with API 12 (Honeycomb 3.1) and returns a null image from API level 18 (Jellybean 4.3).
I tested for API level 17 (JB 4.2) and it still works fine. It probably works fine in API 18 too if you don't need the actual Picture data.
Please check the issue with the issue tracker so that we can get a non-obsolete replacement.
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR1) { PictureListener pictureListener = new PictureListener() { @Override @Deprecated public void onNewPicture(WebView view, Picture picture) { Log.i(TAG, "Picture changed!"); } }; webView.setPictureListener(pictureListener); }
source share