android跳转QQ陌生人聊天或者加入QQ群
16lz
2021-01-25
首先是跳转陌生人聊天:
只需要陌生人的qq号就好了
try { String url = "mqqwpa://im/chat?chat_type=wpa&uin=" +QQ号; startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));} catch (Exception e) { showShortToast("请先安装QQ!");}
接着是申请加群:
需要qq群的key,获取地址是 http://qun.qq.com/join.html
Intent intent = new Intent(); intent.setData(Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D" + KEY)); try { startActivity(intent); } catch (Exception e) { showShortToast(" 未安装手Q或安装的版本不支持"); }
更多相关文章
- 万字长文带你了解最常用的开源 Squid 代理服务器
- 关于下载最新版本Android(安卓)Studio却无法启动默认HelloWorld
- osg for android 学习之十一:从3dmax导出osg文件
- Android(安卓)Java调用.so和.a、Unity C#调用jar插件和C++开发的
- Qt5.3 For Andoid 安装过程
- Api级别详解
- android导入项目出现style错误,menu错误
- NDK 编译可执行程序
- Android(安卓)使用 kotlin 协程