WebView中addJavascriptInterface不起作用解决方法
2015-10-08 19:41
483 查看
private class AndroidBridge { Context mContext; AndroidBridge(Context context) { this.mContext = context; } @JavascriptInterface public void goMarket() { Intent installIntent = new Intent( "android.intent.action.VIEW"); installIntent.setData(Uri .parse("market://details?id=com.adobe.flashplayer")); mContext.startActivity(installIntent); } }
@JavascriptInterface
@JavascriptInterface
@JavascriptInterface
!!!!!多了安全限制,这句一定要加上!!!!!
相关文章推荐
- android - 动画
- Android中的Shape使用总结
- 怎么解决 Android studio的DefaultMavenFactory, Plugin with id 'com.github.dcendents.android-maven' not的问题
- iOS的触摸与手势识别
- iOS9的 NSURLSession
- 为固定高度的网页元素添加 iOS Safari 滚动「惯性效果」的方法
- iOS开发Provisioning profile解析
- php中将SimpleXMLElement Object转化为普通数组
- Cocos2d-Lua 3.3 API的用法 -- (一)
- 分享内容的截图的实现方法
- cocos studio应用案例
- Swift学习笔记(一):No such module 'Cocoa'
- Android DownloadManager下载状态查询(2)
- Android 5.1 Contacts源码分析(四):Contacts模块ListView Adapter结构
- IOS读取图片(转载)
- Android 开发第六弹:简易时钟(计时器)
- iOS效果 :(1) CALayer 图层阴影,边框,圆角,圆型图片的阴影
- Android基础入门教程——2.4.14 ViewPager的简单使用
- iOS NSString 字符串处理:截取字符串、匹配字符串、分隔字符串、拼接字符串、替换字符串
- [转][译][Android基础]Android Fragment之间的通信