Android main thread blocking WebView thread

后端 未结 1 409
别那么骄傲
别那么骄傲 2021-01-07 17:16

I\'ve been working on a problem with doing a synchronous call to JavaScript in a WebView (with a return value) and trying to narrow down the where and why of wh

相关标签:
1条回答
  • 2021-01-07 17:41

    Look more about migration WebView with Android 4.4. See description on Android Docs I think you need to use another method for funning your JS action.

    For example, base on that doc - Running JS Async Asynchronously evaluates JavaScript in the context of the currently displayed page. If non-null, |resultCallback| will be invoked with any result returned from that execution. This method must be called on the UI thread and the callback will be made on the UI thread.

    0 讨论(0)
提交回复
热议问题