android webview实现唤起qq临时会话
16lz
2021-01-23
安卓部分代码
页面html代码
class MyWebviewclient extends WebViewClient {@Overridepublic void onPageStarted(WebView view, String url, android.graphics.Bitmap favicon) {if (url.startsWith("mqqwpa")) {view.stopLoading();Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse(url));startActivity(in);}else{super.onPageStarted(view, url, favicon);}}} WebViewClient mWebViewClient = new MyWebviewclient();webView.setWebViewClient(mWebViewClient);
页面html代码
location.href="mqqwpa://im/chat?chat_type=wpa&uin=954502368";
更多相关文章
- 在Eclipse 中关联android sdk 源代码
- 操作内存卡的常用代码
- 启动页面
- android 根据SD卡中图片路径读取并显示SD中的图片——源代码
- android代码混淆及打包相关
- android 中生成XML文件的代码
- [置顶] [Android自定义控件]Android中如何用代码写出优美的Button
- recovery代码流程