In the enter of the state profile make a task to change the variable of the event.
Other solution is to use Intent Received, but this will require you to work with the received variables and decide wither to fire your tasks or no.
> A work around is to make 2 profiles one with a state (Calendar) and the other with an event (Variable Set).
>
> In the enter of the state profile make a task to change the variable of the event.
This will not work for what the OP is looking for. If there is already a active all day event the calendar profile will not fire again when another calendar event occurs.
>
> Other solution is to use Intent Received, but this will require you to work with the received variables and decide wither to fire your tasks or no.
>
That sounds interesting. Do you have the intent data required for tasker to receive a calendar event?
That sounds interesting. Do you have the intent data required for tasker to receive a calendar event?
That sounds interesting. Do you have the intent data required for tasker to receive a calendar event?
I used this intent >> android.intent.action.PROVIDER_CHANGEDunder scheme field, I put content.
Cool, that works. Which recieved variables do you use, and what kind of data is available? The only variables I found just give information on the actual intent IE - %intent data which does not seem usefull. Are there extras you can access?
to get events details: content://com.android.calendar/events
to get the attendees details: content://com.android.calendar/attendees
In fact, I have not checked the variables coming from this event,
I run an SQL query (Formatted URI) from calendar events table every time to check all required information later than %TIMES
Could you post the exported Tasker description of how you do this. I am not familiar with SQL at all.
Test Calendar (605)
A1: SQL Query [ Mode:URI Formatted File:content://com.android.calendar/events Table: Columns:_id, title, description, eventLocation, organizer, dtstart, dtend Query:calendar_id = 4 Selection Parameters: Order By: Output Column Divider: Variable Array:%events Use Root:Off ]A2: Flash [ Text:%events() Long:Off ]
I'm a bit confused...
2) How to discover the calendar ID?
3) How do I write a Profile to watch for changes to a variable?
4) What variable am I watching for?
5) How do I implement the intent, android.intent.action.PROVIDER_CHANGED?
I want just to add that this intent is not "public" and it could not work with different calendar apps. Android has a built-in mechanism to broadcast this kind of information but it's not possible to use it via intents. It requires a specific service.
It could. However since it's not documented it can be removed at any time, in addition it isn't in the broadcast whitelist so it won't be possible to listen to it in Oreo using an implicit receiver, but I don't think Tasker will have problems with it.
> Does this specific service cost $ ?
Cost?? I don't understand. I meant an Android service.
> Is there a way to do this with native Tasker actions/ contexts?
I don't think so, but maybe Pent knows something more :)
> Will Any of your plug-ins help with this issue or is it possible to build such a plug in. This issue has come up in > past with no clear easy solution.
It depends on the goal. CalendarTask has an event to detect calendar changes without using that intent, so it works for any device. The event requires Nougat and you don't need to pay anything to use it, I don't know if you meant something like that with "cost". In the task you need to query the calendar with a get event action and no, you don't need to play with calendar id and SQL :)
It could. However since it's not documented it can be removed at any time, in addition it isn't in the broadcast whitelist so it won't be possible to listen to it in Oreo using an implicit receiver, but I don't think Tasker will have problems with it.
Cost?? I don't understand. I meant an Android service.
> Does this specific service cost $ ?
It depends on the goal.
> Will Any of your plug-ins help with this issue or is it possible to build such a plug in. This issue has come up in > past with no clear easy solution.
CalendarTask has an event to detect calendar changes without using that intent, so it works for any device.
I think we are mixing the things up. The event (and the intent) are used to detect when a new event is added, when deleted or when modified.
I'm not sure OP is asking for that event.
The best thing you can do is to setup an array with events start times and then use a time profile with start time equals to end time. In the task you can pop the array of times. The array can be filled at boot or in the morning. Another alternative would be to setup a silence reminder in the calendar, then catch the notification event.
1-"Calendar Main" triggers on every calendar event then adds that event name to its 'ignore' list so even if it is a all day event it will fire on the next calendar event. If the event is 'not' a all day event it will set a global variable to trigger the 'Calendar Timed Event' profile that will trigger on any timed event.
2- "Calendar Timed Events" will trigger on any Timed (Not all day) events
3- "Calendar All Off" is needed to reset %All_day_array when "All" Calendar events Stop.
Profile: Calender Main (777)
State: Calendar Entry [ Title:%All_day_arr Location:* Description:* Available:Any Calendar:Google:ricpdjrr@gmail.com ]
Enter: Anon (778)
<on>
A1: Anchor
A2: Test App [ Type:Calendar All Day Data:%TIMES Store Result In:%cal_allday Continue Task After Error:On ]
A3: Test App [ Type:Calendar Title Data:%TIMES Store Result In:%cal_title Continue Task After Error:On ]
A4: [X] Flash [ Text:%cal_allday(:) Long:Off ]
A5: For [ Variable:%index Items:1:%cal_title(#) ]
A6: If [ %All_day_arr !~ *%cal_title(%index)* ]
A7: Variable Set [ Name:%All_day_arr To:! Do Maths:Off Append:Off ] If [ %All_day_arr ~R \* ]
A8: Variable Set [ Name:%All_day_arr To:/%cal_title(%index) Do Maths:Off Append:On ]
A9: Variable Set [ Name:%Timed_cal To:/%cal_title(%index) Do Maths:Off Append:On ] If [ %cal_allday(%index) ~ no ]
A10: End If
A11: End For
A12: [X] Flash [ Text:%All_day_arr Long:Off ]
Profile: Calendar All Off (779)
State: Calendar Entry [ Title:* Location:* Description:* Available:Any Calendar:Google:ricpdjrr@gmail.com ]
Enter: Anon (780)
A1: Notify [ Title:Active Events All On %TIME Text: Icon:null Number:0 Permanent:Off Priority:3 ]
Exit: Anon (784)
A1: Notify [ Title:No Active Events All Off %TIME Text: Icon:null Number:0 Permanent:Off Priority:3 ]
A2: Variable Set [ Name:%All_day_arr To:* Do Maths:Off Append:Off ]
Profile: Calendar Timed Events (776)
State: Calendar Entry [ Title:%Timed_cal Location:* Description:* Available:Any Calendar:Google:ricpdjrr@gmail.com ]
Enter: Anon (785)
A1: Notify [ Title:Timed Calendar Event Ran %TIME Text: Icon:null Number:0 Permanent:Off Priority:3 ]
Exit: Anon (786)
A1: Notify [ Title:Timed Events Stopped %TIME Text: Icon:null Number:0 Permanent:Off Priority:3 ]
A2: Variable Clear [ Name:%Timed_cal Pattern Matching:Off ]
A3: Variable Set [ Name:%All_day_arr To:* Do Maths:Off Append:Off ]
I was trying to help but it seems I got I the same trap of mis-explanation.
Abdullah- Thanks for your contributions... I'm not certain how the intent will work to ID new non all-day day events. Could you provide entire Profile/Task descriptions for us to work with.