- Home /
How Do I Open Someone's Google Calendar App (Not Calendar.Google.com!)
Hey everyone,
I searched the forums for an answer to this but I couldn't find anything here or elsewhere on the Internet. I'm developing a volunteer app in Unity. When a volunteer signs up for a shift, I would like to show a button that says "Add to Google Calendar" and then when they tap it, I want to bring up the Google Calendar app on their phone with all the event details ready to go. They would just have to finish creating the event to add it to their actual calendar. (I'll need to know how to do this with iCal and Outlook Calendar later, but Google is first.)
Right now, using Application.OpenURL, I'm able to open calendar.google.com on their phone with all the event details ready to go. I make a generic string and then add in the details afterward. (I'm just including them in the URL, see below)
string googleCalendarString = "https://calendar.google.com/calendar/u/0/r/eventedit?text=";
googleCalendarString = googleCalendarString + currentSelectedWorldQuest.ourQuestData.eventTitle + "&dates=" + startDateTime.ToString("yyyyMMdd'T'HHmm") + "/" + endDateTime.ToString("yyyyMMdd'T'HHmm") + "&location=" + currentSelectedWorldQuest.ourQuestData.locationAddress + "&details=" + currentSelectedWorldQuest.ourQuestData.description1 + " " + currentSelectedWorldQuest.ourQuestData.description2 + " " + currentSelectedWorldQuest.ourQuestData.description3;
Application.OpenURL(googleCalendarString);
But this looks bad on phones - going to calendar.google.com doesn't look great on my smartphone and it's not the behavior I want.
How can I use C# and Unity to open the Google Calendar app on their phones, with all the event details (description, location) all inputted?
Your answer

Follow this Question
Related Questions
Android App crashes suddenly after putting FPS TextMesh 0 Answers
Stuck with Importing Google Packages 1 Answer
How to make an android app a "trial" version 2 Answers
Signing an Android application 1 Answer
Load Xml on Android with XmlReader 2 Answers