rparkins999 / CalendarTrigger

Android app to trigger actions on calendar events
GNU General Public License v3.0
13 stars 6 forks source link

Feature request: distinguish all-day events #16

Open sm8ps opened 6 years ago

sm8ps commented 6 years ago

Thank you for this nice app! I like the simplicity of the work-flow a lot. In my calendars I have some all-day events that should be treated differently than the others. For instance, when I work on an all-day project, I add 'WORK project' as all-day event and this should not trigger any action by itself. For a meeting I add 'WORK meeting' with a certain duration. This event should then be recognized for muting the phone. Selecting events by calendar and event name does not allow for distinguishing between the two. Or am I overlooking something? Cheers!

rparkins999 commented 6 years ago

There are several ways to distinguish work projects from work meetings. For a start, the event name and description tests are for a string contained in the name, so you could check for "meeting". Also meetings have attendees (which CalendarTrigger can check for) while projects presumably don't. Meetings are presumably public (which CalendarTrigger can also check for) since other people attend them, and projects could be private unless you need other people to be able to see what you're working on.

I generally find it convenient to add a particular tag to the events which I want to be in particular class to specify actions for CalendarTrigger. For example all of the concert halls and theatres that I go to have (Restore_on_leave) appended after the address, which CalendarTrigger looks for in the event location field and for such events it mutes the ringer and then uses the phone's GPS to work out when I have left the venue and so it can unmute the ringer again.

Currently there is no explicit check for all day events, because I haven't needed one. If none of the above suggestions works for you, I'll add it to the list of things that I might put in if and when I have time. Alternatively you can of course write the code yourself and submit a pull request.

sm8ps commented 6 years ago

Thanks for the hints and the encouragement about participating in the coding! Unfortunately, I do not get by with Android programming at all, not even in a hackish fashion. Your suggestions make good sense. However, I am struggling with some more involved cases than the two exemplary cases mentioned and I must admit that my handling of events has been quite simplistic so far. I do not manage attendees but simply keep my own schedule where all events are of identical type. I have never used private events yet but that seems like a good start. I shall see how I can adapt my scheduling habits to make them compatible with the logic of this app. Nevertheless I think it would be a useful feature to have for anyone. So if it is as simple as I picture it then it would be great to have it. Thanks for your consideration and again many thanks for sharing this app!

rparkins999 commented 5 years ago

Actually there is a check for all-day events: it ignores them. This is because CalendarTrigger takes action driven by the start or end of an event, which aren't meaningful for all day events.