Tencent / VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Other
11.81k stars 1.61k forks source link

使用sonic加载webview后,与前端用js交互后获取到薪的url,然后加载这个url,无法加载出来,请问什么情况? #215

Closed qianzhihe86 closed 6 years ago

qianzhihe86 commented 6 years ago

What steps will reproduce the problem? 该问题的重现步骤是什么?

  1. 使用sonic加载webview后,与前端用js交互后获取到薪的url,
  2. 然后加载这个url,无法加载出来,请问什么情况?

What is the expected output? What do you see instead? 你期待的结果是什么?实际看到的又是什么? 期待该url能加载出来,实际是webview.load(url)后还是原来的页面;

What version of the product are you using? On what operating system? 你正在使用产品的哪个版本?在什么操作系统上? compile 'com.tencent.sonic:sdk:3.0.0-beta' 安卓手机

Please provide any additional information below. 如果有的话,请在下面提供更多信息。

qianzhihe86 commented 6 years ago

已解决

vasdeveloper commented 6 years ago

该问题在于JavaScriptInterface回调加载url 是在子线程,需要post到主线程去加载url