mpcjanssen / simpletask-android

GNU General Public License v3.0
548 stars 128 forks source link

Q/FR: Implement calendar reminders as tasks not dates? #710

Open tomtom opened 7 years ago

tomtom commented 7 years ago

Would it be possible to implement calendar reminders as tasks, not as dates -- I'm not sure if I chose the right English words. Using tasks would have the advantage that you were able to view pending tasks in Google calendar.

Regards

vojtechkral commented 7 years ago

What are "Tasks"?

smichel17 commented 7 years ago

Not sure exactly how they work technically, but they're what OpenTasks uses.

tomtom commented 7 years ago

What are "Tasks"?

The correct English word is "Reminder".

User perspective: https://support.google.com/calendar/answer/6285327?co=GENIE.Platform%3DDesktop&hl=en

smichel17 commented 7 years ago

This seems like it is specific to the Google Calendar app, not a feature of the Android calendar provider?

https://developer.android.com/guide/topics/providers/calendar-provider.html

vojtechkral commented 7 years ago

Hmm, dependency on gapps would be bad...

mpcjanssen commented 7 years ago

dependency on any google api is a no-go.

tomtom commented 7 years ago

Unfortunately I don't know Android from a developer's perspective but don't you already rely on a google api by making tasks with due dates available in google calendars? I was asking if one could use another entry type when adding a notification to a calendar. I have to admit that I have no idea what that implies though.

smichel17 commented 7 years ago

Android is a FLO operating system. Anybody can view, modify, or redistribute the source code. So while Android is primarily developed by Google, they don't exactly own it. If they do something evil in there, and people find out about it, anybody can just go back to before they added that anti-feature and pick up development from there.

Google also releases a bunch of proprietary apps that are not FLO. These include gmail, maps, calendar, play store... These are owned by Google, and the general public has no power to fork them if google did something evil (or, even to know if Google is doing something evil, since we cannot see the source code).

One feature of Android is the Calendar Provider. When you use the Android calendar provider, any app on your device can access the calendar events through the the calendar provider API, which I linked above. So, for example, I use Etar as my calendar app and DAVdroid to sync that calendar to my nextcloud server. That's available on any Android device, regardless of whether it has Google Calendar installed.

Although an unfortunately small number of people are actually aware of this type of issue, many of them choose not to install proprietary Google apps. If Simpletask were to use the Google Calendar API instead of the Android calendar provider, people who run Google-free devices would no longer be able to use that feature of Simpletask (and people who have the Google app installed become more dependent on it), so it's a no-go.

smichel17 commented 7 years ago

That said, there is a thing called Tasks, that's a part of caldav. It's what the Tasks app I linked at the start of the thread uses. I don't know enough about it to assess whether it would be useful for us.

dstrelnikov commented 7 years ago

I came here to ask for the same feature. The option for sync todo-txt entries with a local calendar storage is wonderful! It's maybe killer-feature of this app.

But is it possible to change the sync way? icalendar (ics) format supports either of events and tasks. Can you change entry type from 'event' to 'task' in the calendar storage?

I think it's not require a lot of code but will be very useful!

Sorry for my bad English and thanks =)

vojtechkral commented 7 years ago

I'm still confused as to what "Tasks" are.

If that's a Google Calendar API thing, then that's not an option for reasons stated in comments above.

As for OpenTasks, I've tried that app out and they seem to implement their own notifications. Nothing to do with the calendar as far as I can tell.

If there's another concept of tasks in Android, please let me know, preferably by pointing me to some kind of technical source. For now, I'm closing. Thanks!

dstrelnikov commented 7 years ago

There are old and common open calendar standart called iCalendar (or ical, ics) based on RFC 5545, RFC 5546, RFC 6868, RFC 7529. It is not depends on Android API, Android just provide a possibility to create local RW/RO calendar (such as created by SimpleTask) and add records (events, todos, journals etc.) there.

It's just a simple text file with the special markup like the next expamples. This files can be shared throw an email or for example CalDav server. BEGIN:VCALENDAR VERSION:2.0 PRODID:-//hacksw/handcal//NONSGML v1.0//EN BEGIN:VEVENT UID:uid1@example.com DTSTAMP:19970714T170000Z ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com DTSTART:19970714T170000Z DTEND:19970715T035959Z SUMMARY:Bastille Day Party END:VEVENT END:VCALENDAR

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//ABC Corporation//NONSGML My Product//EN BEGIN:VTODO DTSTAMP:19980130T134500Z SEQUENCE:2 UID:uid4@example.com DUE:19980415T235959 STATUS:NEEDS-ACTION SUMMARY:Submit Income Taxes BEGIN:VALARM ACTION:AUDIO TRIGGER:19980414T120000 ATTACH;FMTTYPE=audio/basic:http://example.com/pub/audio- files/ssbanner.aud REPEAT:4 DURATION:PT1H END:VALARM END:VTODO END:VCALENDAR

On Android every third-party calendar app works with system app called Calendar Storage. Maybe you know it better than me (I'm not an Android Developer).

Maybe it is possible to create calendar records with the type VTODO instead of VEVENT.

See for more information iCalendar Standart Wiki.

Sorry for the limitations of my English, I tried to explain =)

smichel17 commented 7 years ago

I spent some time the other day reading RFC 5545, which is pretty dense but informative if you can skim to the right parts; @aquadon's description is accurate.

However, I don't think it makes much sense to use tasks (VTODO records) instead of events, because that would essentially be the same thing as supporting another backend besides todo.txt, which falls under #617. As far as just using them for reminders, appointments work just as well.

vojtechkral commented 7 years ago

I'm afraid I don't understand the relevance of iCal in the first place. Does AOSP API somehow offer more calendar features through iCal support?

mpcjanssen commented 7 years ago

as I understand it, iCal support would still require an export to iCal and import into some calendar. I doubt this can be automated. Anything out of the AOSP standard API is not really an option.

smichel17 commented 7 years ago

Technically, I believe it is possible, using whatever method opentasks uses.

My remains the same: any iCal support should be as a plugin.

smichel17 commented 7 years ago

@tomtom @aquadon FWIW, I think that calendar applications do a bad job of handling non-event reminders, and picking one (probably Etar) and improving it to be better at that is the third thing on my list of personal projects (work on Simpletask is the second, finishing up work on Red Moon is the first).

vojtechkral commented 7 years ago

Technically, I believe it is possible, using whatever method opentasks uses.

OpenTasks simply uses the AlarmManager and displays a notification at some point in time, that's all. No calendar support AFAIK.

smichel17 commented 7 years ago

Davdroid can sync tasks if opentasks is installed, but maybe it only does so on the remote server.

HeavyThumper commented 6 years ago

There is a difference between "reminders", "tasks", and "events". These definitions are not Google's - this is common use:

Events have a time associated with them, e.g. "Meeting with staff, October 8th, 10am-11am".

Tasks do not have a time - they may have an optional due date.

Reminders - are some form of notification in advance, or at the time, or after the fact.

The calDAV protocol provides for events and reminders - the VTODO extension provides task support. Implementing this would allow direct compatibility and sync with many calendar/task systems.

smichel17 commented 6 years ago

@HeavyThumper I was under the impression that calDAV reminders must be associated with an event; you can't have a standalone reminder. Am I wrong?

Also, while those specs are independent of Google, if there's no API for reading/writing a file to spec, the effort to implement goes way up. The specific api linked earlier is a proprietary Google one.

HeavyThumper commented 6 years ago

I think there was a basic misunderstanding early in this thread - which is why I commented. "Tasks", like entries for SimpleTask, are not "reminders". So there is no need/desire (as far as I'm concerned) for "standalone reminders" - just implementing tasks with their associated reminders.

The calendar provider API for Google would indeed be proprietary - what I (and perhaps others) are hoping for is to leverage the VTODO extension of the calDAV spec which many servers support. In particular Nextcloud is what I'm going for.

mpcjanssen commented 6 years ago

@HeavyThumper would that mean that you:

  1. want to sync all your todos with Nextcloud tasks (which is indeed a different backend)
  2. or sync only tasks with due dates or threshold dates with nextcloud (which would mean extending the calendar syncing part).

NB both of them are very unlikely to be added soon because of the effort required, I could definitely see the value in 1. though (because I have a Nextcloud server myself)

EDIT: This should probably be made into a separate issue, because this is different from Google tasks

HeavyThumper commented 6 years ago

I do indeed mean option 1. But using the calDAV & TODO extensions aren't Nextcloud specific - so there's "extra" value.

-- Daniel On October 22, 2018 1:47:17 AM Mark Janssen notifications@github.com wrote:

@HeavyThumper would that mean that you:

want to sync all your todos with Nextcloud tasks (which is indeed a different backend) or sync only tasks with due dates or threshold dates with nextcloud (which would mean extending the calendar syncing part).

NB both of them are very unlikely to be added soon because of the effort required, I could definitely see the value in 1. though (because I have a Nextcloud server myself)

EDIT: This should probably be made into a separate issue, because this is different from Google tasks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mpcjanssen commented 6 years ago

@HeavyThumper problem with using backends which are not todo.txt based is that there is a mismatch in the core task representation. So adding backends like this runs into problems like the fact that todo.txt doesn't support subtasks. I have a similar problem with making a taskwarrior based backend and the best way is really to make a UI similar to simpletask on a completely rewritten task data model. Trying to force these different backends in the todo.txt format will never work really seamlessly.

tomtom commented 5 years ago

I don't know if I fully explained my motivation for this FR. When adding an event to the calendar, the event's notification disappears after some time with no trace. On the other hand, google calendar shows all open reminders.

smichel17 commented 5 years ago

@tomtom Try the Calendar Notifications App to make calendar reminders sticky.

vinniec commented 3 years ago

Today I tried your application and I wanted to do three things: 1) congratulate you because among all the ones I tried it is the one that seemed to me better designed (I notice it from the speed of task input) (but to be correct also secuso to-do list and super-productivity are really good) 2) report that the links on the github page to the playstore are broken 3) ask for the calendar functionality, but for good practice I did the search in the issues before and I found this page. I saw that the autosynchronization has been implemented. At least not with google calendar nor with simple calendar, but then I tried Etar! it is automatically synchronized with simple task, I don't know if they did it or you did it, but it was a good job. Now I just have to check if it automatically plays alarms or not, I hope so, otherwise I will open an issue on their page :D

smichel17 commented 3 years ago
  1. This is due to #1102

  2. Simpletask (ST) creates a local (on your phone only) that is stored in the Android calendar provider, which is then accessible to all apps. When I checked last (a year or two ago), Simple Calendar used its own built-in calendar storage system instead of the Android calendar provider, which is why it does not see the ST calendar — this is a fault of Simple Calendar, not ST. I'm not sure about Google Calendar since I have never used it but I would guess it is the same reason.

aubreyz commented 3 years ago

Here is a bit of information about the Google Calendar issue. I have due dates set to show up on my Calendar. They show up just fine in Google Calendar. However you should check a) that they are set to show on the calendar in ST (check both due or threshold dates or one of them) b) That in Google calendar the simpletask calendar is set to show and c) I found that if I have two versions of ST installed (I use both cloud and cloudless as were available) - it shows only one ST (probably the last one where calendar checkbox was toggled) so might now show what you expect for that reason. Only choose one installation to use for calendar.

vinniec commented 3 years ago

thanks to both of you for the answer, @aubreyz : at a certain point (after resetting the applications) I couldn't see the dates on Etar anymore, so the point a) was fundamental :P As far as gcalendar is concerned, probably I had to better check point b) but I don't like google to put the nose in my appointments, so I disabled the default calendar even if it has the monthly view widget that I like and that Etar doesn't have (but it has it in the application). @smikel17 it's sad that simple calendar doesn't see this "android calendar provider" because aesthetically I like it morer than Etar