首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >打开facebook messenger

打开facebook messenger
EN

Stack Overflow用户
提问于 2021-11-18 19:20:49
回答 1查看 71关注 0票数 1

我尝试使用urllauncher打开facebook messenger,如下所示。但我不能启动信使。

我可以用urllaucher打开facebook页面,youtube,甚至打电话。

代码语言:javascript
复制
OutlinedButton.icon(
                  onPressed: () async {
                    //_launchURL(about.messenger!,);
                    await canLaunch("https://m.me/myfacebookname")
                        ? await launch("https://m.me/myfacebookname", forceWebView: false)
                        : throw 'Could not launch ${"https://m.me/myfacebookname"}';
                  },
                  icon: const Icon(Icons.messenger_outline_sharp),
                  label: const AutoSizeText(""),
                  style: ButtonStyle(
                    shape: MaterialStateProperty.all(RoundedRectangleBorder(
                        borderRadius: BorderRadius.circular(30.0))),
                  ),
                ),
EN

回答 1

Stack Overflow用户

发布于 2021-11-19 08:58:52

我需要在Minifest中添加查询选项卡。我以为我不需要它,因为我可以打开facebook。

代码语言:javascript
复制
<queries>
      <!-- If your app opens https URLs -->
      <intent>
        <action android:name="android.intent.action.VIEW" />
        <data android:scheme="https" />
      </intent>
      <!-- If your app makes calls -->
      <intent>
        <action android:name="android.intent.action.DIAL" />
        <data android:scheme="tel" />
      </intent>
      <!-- If your app emails -->
      <intent>
        <action android:name="android.intent.action.SEND" />
        <data android:mimeType="*/*" />
      </intent>
    </queries>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70025550

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档