After updating to 8.0 we get a crash so far we haven\'t seen before:
java.lang.NullPointerException: Attempt to invoke virtual method \'int android.graphics.
Anyone still wondering instead of downvoting here is the actual fix to this. Since I spent quite some time on this I will post it here.
You need to add the following to your WebChromeClient:
webview.setWebChromeClient(new WebChromeClient() {
@Override
public Bitmap getDefaultVideoPoster() {
Bitmap icon = BitmapFactory.decodeResource(context.getResources(), R.drawable.black);
return icon;
}
});
Any drawable is fine as long as it is an actual PNG file. If you use a drawable/xml you still get an exception.