我尝试使用urllauncher打开facebook messenger,如下所示。但我不能启动信使。
我可以用urllaucher打开facebook页面,youtube,甚至打电话。
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))),
),
),发布于 2021-11-19 08:58:52
我需要在Minifest中添加查询选项卡。我以为我不需要它,因为我可以打开facebook。
<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>https://stackoverflow.com/questions/70025550
复制相似问题