繁体   English   中英

如何使用 flutter 以编程方式打开谷歌日历应用程序

[英]how to open the google calendar application programatically with flutter

我试过使用flutter中的url_launcher插件打开谷歌日历应用程序,脚本如下:

if (await canLaunch('https://calendar.google.com/calendar/r/month/2019/1/24')) {
  await launch('https://calendar.google.com/calendar/r/month/2019/1/24');
  } else {
  throw 'Could not launch URL';
}

在代码中没有错误,但发生的事情是我通过浏览器而不是通过应用程序访问谷歌日历。

为什么会这样,还有其他选择吗?

谢谢。

我知道回答这个问题已经晚了,但有人可以从中得到帮助:-

https://calendar.google.com/calendar/u/0/r/eventedit?dates=20210226T033000/20210226T040000&ctz=Asia/Calcutta&location&text=Blawsome:+A+Crystal+Alchemy+Healing+Meditation&details=Parth+Pitroda

只需根据您的要求更改它:)

如果你想测试这个谷歌事件,那么只需复制并点击这个。

我发现这篇带有谷歌应用程序网址的 reddit 帖子,这对我来说工作正常com.google.calendar://?action=create&title={{Title}}&description={{Description}}&location={{Location}}&add={{email,anotheremail}}&isallday={{0}}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM