android webview里HTML5的地理位置定位
来源:互联网 发布:什么是前端模块化编程 编辑:程序博客网 时间:2024/05/17 02:55
//启用数据库 webSettings.setDatabaseEnabled(true); String dir = this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath(); //启用地理定位 webSettings.setGeolocationEnabled(true); //设置定位的数据库路径 webSettings.setGeolocationDatabasePath(dir); //最重要的方法,一定要设置,这就是出不来的主要原因webSettings.setDomStorageEnabled(true) //配置权限(同样在WebChromeClient中实现) public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) { callback.invoke(origin, true, false); super.onGeolocationPermissionsShowPrompt(origin, callback); } 配置权限:<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
1 0
- android webview里HTML5的地理位置定位
- android webview里HTML5的地理位置定位
- 关于android webview里HTML5的地理位置定位
- android 腾讯X5webview里HTML5的地理位置定位
- android webview 地理位置定位
- Android WebView从assets中加载html5页面,实现地理位置定位
- Android中WebView控件支持地理位置定位
- Android中WebView控件支持地理位置定位
- 基于HTML5的地理位置定位实验
- 关于 Html5 的地理位置定位功能试验
- HTML5开发 地理位置定位
- HTML5 地理位置定位
- HTML5地理位置定位 lbs
- HTML5地理位置定位
- html5地理位置定位
- webview显示HTML5中的地理位置
- 使用HTML5进行地理位置定位
- HTML5之地理位置(定位技术)
- RabbitMQ的几种典型使用场景
- 安卓高级3 RecyclerView 和cardView使用案例
- textview使用的小技巧
- 第八周项目4 字符串加密
- Android开发之Mac版Eclipse环境配置
- android webview里HTML5的地理位置定位
- ViewExcel
- maven打包时拷贝依赖文件到lib
- Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plu
- 第八周项目2-建立链串的算法库
- 页面静态化技术深入探究
- 如何让myeclipse6.5支持struts2.0开发呢?
- 关于透明状态栏下的fitsystemwindows=“true”属性
- rails 001