簡體   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