FORUMS
Remove All Ads from XDA

[GUIDE][Difficulty: Advanced] Read Google Calendar Events for the Day

871 posts
Thanks Meter: 1,913
 
By MishaalRahman, Editor in Chief on 10th March 2016, 05:07 AM
Post Reply Email Thread
30th March 2016, 09:53 PM |#21  
MishaalRahman's Avatar
OP Editor in Chief
Thanks Meter: 1,913
 
More
Quote:
Originally Posted by ManagementCritic

Thank you MishaalRahman,

I have read numerous solutions to pulling events from Google Calendar, but none so elegant. I have recently discovered phones and more recently discovered Tasker. My skills are quite rusty but with the help others (you included) I am finding my way. This is a wonderful resource.

As some have already pointed out, this is a great task to include in a wake-up profile. However, not all of us work or sleep on a regular schedule. I remember the 'good ole days' when I could get by on just two jobs.

A moving time segment from 'now' to 'set_length' would be ideal. I think I can work that out. But Event location (address) to pass to Google Maps or Waze as a destination is a topic for which I haven't found much information. Do you (or anyone else) have any suggestions?

Yes, simply pull the location by doing Test App --> Calendar Location, store that in a variable (just like we're doing with time, event title, and calendar name) then when you're done you can navigate to that location by using a Google Maps Navigation intent: https://stackoverflow.com/questions/...ent-on-android
7th April 2016, 09:56 AM |#22  
Senior Member
Thanks Meter: 27
 
More
Hey @MishaalRahman,

thanks for this great post. I have followed the steps but I'm always getting "You have no events today", when I have set a couple of events and some reminders. I have tried with my main calendar, I have tried with other calendars such as Work and Reminders but always the same result. Any ideas?

Thanks in advance,
Tepes4

Edit: Sorry about that, it seems that it was a sync issue after all. After manually syncing the calendar, it works. But can it work with the Reminders functionality of google calendar?
The Following User Says Thank You to Tepes4 For This Useful Post: [ View ] Gift Tepes4 Ad-Free
10th April 2016, 04:15 PM |#23  
Senior Member
Mississauga, on
Thanks Meter: 257
 
More
I am using Google calender, in step 6 what should I can be “my calender”to? Google calendar or leave it as it is?
Should I change something in step 5 too?

Keeps saying you have no events today
10th April 2016, 05:48 PM |#24  
Junior Member
Flag Houston, Texas
Thanks Meter: 7
 
More
@EnIXmA

The note at the end of the numbered instructions reads in part, "IF YOU IMPORT THIS, YOU MUST EDIT ACTION #6 (THE IF ACTION) AND CHANGE *MYCALENDAR*. REPLACE "MYCALENDAR" WITH THE NAME OF THE CALENDAR YOU WANT TO PULL FROM."

I'm sure you recall that when you linked to the various Google services (including calendar), you were asked for the email address of your Gmail account. In this case, you would enter (without the quotes), "*[email protected]*" to replace "*MYCALENDAR*" in step 6.

As an aside, I set AutoSync off and run a profile that turns it on for a few minutes every hour. When AutosSync is turned on it attempts to sync all enabled accounts. So when I am ready to use this profile for my morning agenda, I turn on AutoSync about 5 minutes prior to running 'GetEvents'.

I have taken this nifty task and am modifying it to retrieve my 'next' event. If there is a location stored in the event, that information will be passed to Maps for navigation (per the VERY useful tip from the OP located in post 21). I only need to sync Calendar if I have added an event that will occur within the hour. Keeping AutoSync off is just another way to save battery.

Hope this helps.

Quote:
Originally Posted by EnIXmA

I am using Google calender, in step 6 what should I can be “my calender”to? Google calendar or leave it as it is?
Should I change something in step 5 too?

Keeps saying you have no events today

The Following 2 Users Say Thank You to ManagementCritic For This Useful Post: [ View ] Gift ManagementCritic Ad-Free
11th April 2016, 07:41 AM |#25  
Senior Member
Mississauga, on
Thanks Meter: 257
 
More
Quote:
Originally Posted by ManagementCritic

@EnIXmA

The note at the end of the numbered instructions reads in part, "IF YOU IMPORT THIS, YOU MUST EDIT ACTION #6 (THE IF ACTION) AND CHANGE *MYCALENDAR*. REPLACE "MYCALENDAR" WITH THE NAME OF THE CALENDAR YOU WANT TO PULL FROM."

I'm sure you recall that when you linked to the various Google services (including calendar), you were asked for the email address of your Gmail account. In this case, you would enter (without the quotes), "*[email protected]*" to replace "*MYCALENDAR*" in step 6.

As an aside, I set AutoSync off and run a profile that turns it on for a few minutes every hour. When AutosSync is turned on it attempts to sync all enabled accounts. So when I am ready to use this profile for my morning agenda, I turn on AutoSync about 5 minutes prior to running 'GetEvents'.

I have taken this nifty task and am modifying it to retrieve my 'next' event. If there is a location stored in the event, that information will be passed to Maps for navigation (per the VERY useful tip from the OP located in post 21). I only need to sync Calendar if I have added an event that will occur within the hour. Keeping AutoSync off is just another way to save battery.

Hope this helps.

Thnx man.. Working fine now
The Following User Says Thank You to EnIXmA For This Useful Post: [ View ] Gift EnIXmA Ad-Free
19th April 2016, 04:49 AM |#26  
schorsch.funke's Avatar
Senior Member
Flag Swisttal
Thanks Meter: 68
 
More
Hi all,
is there any way to test other calendar than Google calendar? I'm using a private calendar with davdroid. The calendar app I use is acalendar.
With the test app method i'm can test only the Google one.

Many thanks, Georg

Gesendet von meinem SM-G900F mit Tapatalk
19th April 2016, 06:36 PM |#27  
schorsch.funke's Avatar
Senior Member
Flag Swisttal
Thanks Meter: 68
 
More
Quote:
Originally Posted by schorsch.funke

Hi all,
is there any way to test other calendar than Google calendar? I'm using a private calendar with davdroid. The calendar app I use is acalendar.
With the test app method i'm can test only the Google one.

Many thanks, Georg

Gesendet von meinem SM-G900F mit Tapatalk

I have solved the problem. I had not clear the entries in the Google Calendar before I switch to a private DAVdroid Calendar

Gesendet von meinem SM-G900F mit Tapatalk
11th May 2016, 04:36 PM |#28  
Senior Member
Flag Edmonton
Thanks Meter: 795
 
More
I have been working on modifying these tasks to meet my requirements, and would like to share the results with everyone.
I had a few issues with the way the original calendar task handled overlapping events. All day events and items that overlapped, sometimes either showed the wrong time, or showed multiple times, or did not show at all. Almost made me wake up late one morning.
For all day events, I I set a variable at the beginning to no, and the first event that was not a all day event I set it to yes. from then on, all day events were ignored.
For overlapping events, right before the if loop that parsed all the events I set up a for loop to pass overlapping events to the for loop one at a time. This created the need to rearrange the doublecheck variable, so I appended each event as it went through the for loop and had to search through the variable separately before the loop.

I also split it into two profiles, one that runs in the evening and will set my alarm for work in the morning, and another that runs in the morning that notify's me verbally and with a popup.

I can write a whole Guide if anyone wants to see what I did so they can incorporate it, but for now I just attached the profiles. Let me know if anyone's interested!
Attached Files
File Type: xml Calendar_Today.prf.xml - [Click for QR Code] (9.1 KB, 430 views)
File Type: xml Calendar_Tomorrow.prf.xml - [Click for QR Code] (11.5 KB, 268 views)
The Following 7 Users Say Thank You to githyanki For This Useful Post: [ View ] Gift githyanki Ad-Free
30th May 2016, 10:28 PM |#29  
Junior Member
Thanks Meter: 0
 
More
Can't get it to work
Hi. Thanks for posting this. But I can't get it to work. I've set the calendar name to my Gmail email address. Is that right? This is my main calendar. But it just tells me I have no events when I clearly do. And yes the calendar has been synced.

Thank you
18th June 2016, 03:24 PM |#30  
Junior Member
Flag Winchester
Thanks Meter: 0
 
More
Go to 6 and where it has %calendar1, in the field next to it type in exactly what is before your @gmail.com in other words [email protected] type in

*doe.john* with the asterisks.
20th June 2016, 11:20 AM |#31  
Junior Member
Flag Winchester
Thanks Meter: 0
 
More
I have football fixtures on my phone and two events are at the same time today and it only announced one of them.

So I looked at Githyanki's post:

Quote:
Originally Posted by githyanki

I have been working on modifying these tasks to meet my requirements, and would like to share the results with everyone.
I had a few issues with the way the original calendar task handled overlapping events. All day events and items that overlapped, sometimes either showed the wrong time, or showed multiple times, or did not show at all. Almost made me wake up late one morning.
For all day events, I I set a variable at the beginning to no, and the first event that was not a all day event I set it to yes. from then on, all day events were ignored.
For overlapping events, right before the if loop that parsed all the events I set up a for loop to pass overlapping events to the for loop one at a time. This created the need to rearrange the doublecheck variable, so I appended each event as it went through the for loop and had to search through the variable separately before the loop.

I also split it into two profiles, one that runs in the evening and will set my alarm for work in the morning, and another that runs in the morning that notify's me verbally and with a popup.

I can write a whole Guide if anyone wants to see what I did so they can incorporate it, but for now I just attached the profiles. Let me know if anyone's interested!


And it announced both of them! I love the pop up text idea too! I have two events today and the text inside the box was too large for the box, but the 4 events tomorrow all fit inside the pop up box. Weird.

I use Alarmpad dismiss to launch the original task, so if I can modify Githyanki's tomorrow profile to announce 'todays' events when I wake up that would be awesome.

Something for me to play with today.
Post Reply Subscribe to Thread

Tags
assistant, calendar, events, google calendar, tasker

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes