Flutter 唤起第三方应用

使用第三方库url_launcher

  • pubspec.yaml
dependencies:
  url_launcher: ^5.1.3
  • 方法
_launchURL() async {
    const url = 'xxx'; // 这个xx就是唤起三方应用的重要因素
    // taobao://item.taobao.com/item.html?id=41700658839
    if (await canLaunch(url)) { // 判断当前手机是否安装某app. 能否正常跳转
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
 }
  • url schema 汇总

QQ: mqq://
微信: weixin://
京东: openapp.jdmoble://
淘宝: taobao://
美团: imeituan://
点评: dianping://
1号店: wccbyihaodian://
支付宝: alipay://
微博: sinaweibo://
腾讯微博: TencentWeibo://
weico微博: weico://
知乎: zhihu://
豆瓣fm: doubanradio://
网易公开课: ntesopen://
Chrome: googlechrome://
QQ浏览器: mqqbrowser://
uc浏览器: ucbrowser://
搜狗浏览器: SogouMSE://
百度地图: baidumap:// bdmap://
优酷: youku://
人人: renren://
我查查: wcc://
有道词典: yddictproapp://
微盘: sinavdisk://
名片全能王: camcard://

Subscribe to ionantha

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe