We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 JsCallJava的call方法中 有一个类型判断:values[k + 1] = new JsCallback(webView, mInjectedName, argsVals.getInt(k));进行执行的时候有一个argsVals.getInt(k)获取到对应的全局方法索引,但是假如我需要传入一个对应的方法名称(String 类型),需要怎么做,我没有看到onJsPrompt代码是怎么对message进行封装的,例如我检测到的: message="{"method":"delayJsCallBack1","types":["number","string","function"],"args":[1,"call back haha","1"]}";其中1是message传过来的,请问我需要怎么做,期待您的回复。
The text was updated successfully, but these errors were encountered:
我自己弄的 public class UseJsMethod { WebView webView; private Handler mHandler=new Handler(); public UseJsMethod(WebView webView) { this.webView = webView; }
public void useJsMethod(final String methodName) { mHandler.post(new Runnable() { public void run() { //use method in js webView.loadUrl("javascript:"+methodName+"()"); } }); }
}
Sorry, something went wrong.
No branches or pull requests
在 JsCallJava的call方法中 有一个类型判断:values[k + 1] = new JsCallback(webView, mInjectedName, argsVals.getInt(k));进行执行的时候有一个argsVals.getInt(k)获取到对应的全局方法索引,但是假如我需要传入一个对应的方法名称(String 类型),需要怎么做,我没有看到onJsPrompt代码是怎么对message进行封装的,例如我检测到的:
message="{"method":"delayJsCallBack1","types":["number","string","function"],"args":[1,"call back haha","1"]}";其中1是message传过来的,请问我需要怎么做,期待您的回复。
The text was updated successfully, but these errors were encountered: