A
A
Al2017-08-29 21:11:42
Android
Al, 2017-08-29 21:11:42

How to override class from com.android.webview.chromium package in android?

Facing error while loading page in webview

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference                                                                              
at com.android.webview.chromium.WebViewContentsClientAdapter.getDefaultVideoPoster(WebViewContentsClientAdapter.java:1181)

On the Internet they write that this is a bug in android 7.0, I decided to override it with my own, that's sort of like a bug fix for this problem. But I don’t understand how I can override what is in the com.android.webview.chromium package , so that when webview.loadDataWithBaseURL() is called, my method will work and not the one in the package?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-08-29
@zagayevskiy

No way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question