android通过webview中的javascript接口启动toast
我的 Android 应用程序有一个 WebView,其中我在 WebView 中有一个按钮。当单击网页中的按钮时,我应该通过 JavaScriptInterface 显示来自 javascript 的 toast。
我从android开发者网站http://developer.android.com/guide/webapps引用了这个例子/webview.html
当我实现这个 javascript 和 android 代码时,Toast 仅出现在 Android 2.2 中,而不出现在任何其他 API 级别中。
如果您遇到了这个错误问题,有人帮助我吗??? 我找不到任何解决方案...请帮助我..
问候, 桑索什·普利曼。
My android app has a WebView in which i have a button in webview. When clicking the button in the web page i should display a toast from javascript through JavaScriptInterface.
I referred this example from android developer site http://developer.android.com/guide/webapps/webview.html
When i implemented this javascript and android code, Toast appears only in Android 2.2 but not in any other API level.
Someone help me if you had crossed over this error problem???
I couldn't find any solution for this... Please help me out..
Regards,
SanthoshPulliman.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定较低级别的 API,但从 JavaScript 到 Java 的桥梁在 2.3+ 中被打破了。 http://code.google.com/p/android/issues/detail ?id=12987。
I am not sure about the lower level API, but the bridge from JavaScript to Java is broken in 2.3+. http://code.google.com/p/android/issues/detail?id=12987.