IMA evaluate JavaScript not in the WebView thread on Android.

183 views
Skip to first unread message

Александр Гранин

unread,
Oct 18, 2018, 5:23:29 PM10/18/18
to Interactive Media Ads SDK
I have the error when ads is finished. IMASDK evaluate java script not in the same thread.

java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread 'JZVD'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 2) {417d130} called on Looper (JZVD, tid 163393) {481878b}, FYI main Looper is Looper (main, tid 2) {417d130})
        at android.webkit.WebView.checkThread(WebView.java:2486)
        at android.webkit.WebView.evaluateJavascript(WebView.java:1047)
        at com.google.obf.hk.a(IMASDK:22)

These guys fixed it like this 

private void runJavaScriptInWebView(final String script) {
mWebView.post(new Runnable() {
@Override
public void run() {
mWebView.evaluateJavascript(script, null);
}
});
}

https://github.com/braintree/popup-bridge-android/commit/02d589d59b3447f8a771c0f097a0c0e8cc8fc125

ima-sdk-adv...@google.com

unread,
Oct 19, 2018, 2:43:02 AM10/19/18
to ima...@googlegroups.com
Hi,

Thank you for reaching out to support. The issue you are encountering does not appear to be a native IMA SDK issue and our team, unfortunately does not provide support for this kind of implementation.

Best regards,
Peter Laurence N. Oliquino
IMA SDK Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
You received this message because you are subscribed to the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages