DSBridge-Android icon indicating copy to clipboard operation
DSBridge-Android copied to clipboard

:earth_americas: A modern cross-platform JavaScript bridge, through which you can invoke each other's functions synchronously or asynchronously between JavaScript and native.

Results 106 DSBridge-Android issues
Sort by recently updated
recently updated
newest added

DWebView有内存泄漏的风险,比如我开了2个activity(里面含有一个webview),始终有一个activity释放不了。

测试发现,在ifame里会无法找到回调方法,提示 dscb0 is undefined。 原因:没有考虑iframe里使用的情况。 解决:dsbridge.js添加对ifame环境的判断,具体代码如下: ![image](https://user-images.githubusercontent.com/22423509/53563245-65279b00-3b8e-11e9-8292-78155c0dd413.png)

Call failed:The parameter of "%s" in Java is invalid. 这句提示建议改成:函数未注册或你的代码有异常,错误原因:e.getCause().getMessage()。 因为异常可能是上层引发的,不一定是函数没有注册,我误以为没注册好几次了,我这边已经手动强化了这个提示。 ` Log.e(LOG_TAG,"=======DWebView发生了异常======="); Log.e(LOG_TAG,"可能原因:函数未注册或你的上层代码存在异常,请查看'异常细节'"); Log.e(LOG_TAG,"异常细节:"+e.getCause().getMessage()); Log.e(LOG_TAG,"↓↓↓↓↓下边是堆栈细节输出↓↓↓↓↓"); e.printStackTrace(); return ret.toString(); ` ![image](https://user-images.githubusercontent.com/22423509/51235359-3c669000-19aa-11e9-9920-ecb16eee31a5.png)

// Create request body if(requestData.getString("method").equals("POST")){ RequestBody requestBody=RequestBody .create(MediaType.parse(contentType),requestData.getString("**data**")); rb.post(requestBody) ; } 这里获取data 是空的,应该改为获取 body 吧?

js交互时,Native向Js传递一张2M的图片耗时30秒。 ![image](https://user-images.githubusercontent.com/14197731/51905850-5fa72b80-23fd-11e9-89a9-bb0c28e9a0b6.png)

java.lang.NoClassDefFoundError: android.webkit.JavascriptInterface at wendu.dsbridge.DWebView$InnerJavascriptInterface.call(DWebView.java:139) at wendu.dsbridge.DWebView$6.onJsPrompt(DWebView.java:738) at com.tencent.smtt.sdk.q.onJsPrompt(Unknown Source) at com.tencent.tbs.core.webkit.tencent.TencentWebChromeClient.onJsPrompt(Unknown Source) at android.webview.chromium.WebViewContentsClientAdapter.handleJsPrompt(Unknown Source) at org.chromium.android_webview.AwContentsClientBridge$5.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4898) at java.lang.reflect.Method.invokeNative(Native Method) at...

嗨,您好,我在使用这个框架的时候,使用X5版本不能用chrome debug h5,使用原生版本可以debug,您知道是什么原因吗?

Failed to resolve: com.github.wendux:DSBridge-Android:3.0-SNAPSHOT build.log on jitpack: Git error: Could not unresolve 3.0-3.0.0-g60a2494-57 from 60a2494e04 https://github.com/wendux/DSBridge-Android.git

DWebView dwebView = new DWebView(SDK.obatinFirstPage(app).obtainWebview().getContext()); dwebView.addJavascriptObject(new JsAPI(),"JsAPI"); 这样写没有日志打出也,没报错,就是调用不起作用,不能用这种构造方法?