hjhrq1991 / jsbridge Goto Github PK
View Code? Open in Web Editor NEW基于github.com/lzyzsd/JsBridge优化改进而来的JsBridge
Home Page: http://hjhrq1991.info/
License: MIT License
基于github.com/lzyzsd/JsBridge优化改进而来的JsBridge
Home Page: http://hjhrq1991.info/
License: MIT License
刚看JsBridge准备替换,原来项目里面用的Tbx X5WebView,感谢楼主对JsBridge的优化,准备上手了
通过gradle直接安装的1.0.7版本的库,compile 'com.hjhrq1991.library.tbs:tbsjsbridge:1.0.7',能否更新到新版本的X5内核?
I have redesigned new libraries, It only takes ten minutes to complete . Maybe can help you.
Java:
https://github.com/SDBridge/SDBridgeJava
Kotlin:
https://github.com/SDBridge/SDBridgeKotlin
09-21 09:15:32.827 22578-23509/com.my.trip W/System.err: java.lang.NullPointerException
09-21 09:15:32.827 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.s.o(Unknown Source)
09-21 09:15:32.827 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.TbsSDKExtension.b(Unknown Source)
09-21 09:15:32.827 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.TbsSDKExtension.a(Unknown Source)
09-21 09:15:32.827 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.n.run(Unknown Source)
09-21 09:15:32.827 22578-23509/com.my.trip W/System.err: at java.util.Timer$TimerImpl.run(Timer.java:284)
09-21 09:15:33.477 22578-23509/com.my.trip W/System.err: java.lang.NullPointerException
09-21 09:15:33.487 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.s.o(Unknown Source)
09-21 09:15:33.487 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.TbsSDKExtension.a(Unknown Source)
09-21 09:15:33.487 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.TbsSDKExtension.b(Unknown Source)
09-21 09:15:33.487 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.TbsSDKExtension.a(Unknown Source)
09-21 09:15:33.487 22578-23509/com.my.trip W/System.err: at com.tencent.tbs.sdk.extension.n.run(Unknown Source)
09-21 09:15:33.487 22578-23509/com.my.trip W/System.err: at java.util.Timer$TimerImpl.run(Timer.java:284)
09-21 09:15:34.077 22578-22578/com.my.trip W/Toast: From com.my.trip, go ahead.
bridgeWebView内嵌vue单页面应用,使用keep-alive缓存(没有使用keep-alive时,是正常的),android6.0及以下,当第二次进入一个页面时,bridgeWebView.getUrl()没有变,也不进入onPageFinished等方法,历史记录缺失,导致无法返回、返回错乱等问题,没有报错。android7.0及以上的测试机正常;android6.0测试机,红米Note4X、Galaxy A7是正常的,乐Max2有上述问题;android5.0、4.0的试了几个都有这个问题。两种内核版本的JsBridge都试过,都有这个问题。我们又将应用部署到服务器上,在问题手机乐Max2上用QQ浏览器、夸克浏览器访问,返回操作是正常的;用Via浏览器访问,返回也不正常。小白查了几天没有解决。。大神如果有时间可以看看这个问题。
我已经重新设计了新的交互库,10分钟就能完成接入,也许可以帮助你.
Java:
https://github.com/SDBridge/SDBridgeJava
Kotlin:
https://github.com/SDBridge/SDBridgeKotlin
引用了基于tbs的jsbridge,调用没反应,无报错信息。
window.WebViewJavascriptBridge.callHandler(
'getdata' //桥注册的名称ID
, {'msg': '中文测试'} //传递给原生的参数
, function(responseData) { //异步回调接口
alert('native return->'+responseData);
}
);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.