Calendar/Dates synchronization. Research of implementation options.

Acceptance criteria:

  1. The mobile application must be able to sync course events with the phone's calendar.

  2. Any changes to the event dates in the course should be automatically reflected in the phone's calendar.

  3. The synchronization of events should ideally continue even if the user signs out or uninstalls the application, through a webCal subscription.

  4. The app should offer an intuitive and user-friendly interface for managing calendar synchronization settings.

  5. The app should not share or use calendar data for any purpose other than synchronization.

 

Researched mobile applications:
edx.org. Calendar feature
Coursera. Calendar feature
Udemy. Calendar feature
Khan Academy. Calendar feature

1. Manual synchronization (Coursera flow).

Flow:

  1. A user initiates the process by pressing the sync button.

  2. An iCal file with the course dates is created by the API.

  3. The application requests the system to launch the URL linked to the generated iCal file.

  4. The system identifies the file type and navigates the user to the calendar app.

  5. The calendar app adds events from the .ics file to the user's calendar.

Pros:
- Compatible with both iOS and Android.
- Implementation is straightforward and quick.

Cons:
- If the course date is changed, the old events are saved in the calendar.

2. Subscription to the interactive events calendar (webcal).

https://en.wikipedia.org/wiki/Webcal

iOS system popup for adding subscription calendar

Flow:

  1. A user initiates the process by pressing the sync button.

  2. API generates a webcal:// URL that leads to the iCal file.

  3. The application requests the system to launch the URL with webcal:// schema linked to the generated iCal file.

  4. The system identifies the file type and navigates the user to the calendar app.

  5. The calendar app subscribes to the calendar and shows it events.

Pros:
- The server manages the dates and web calendar, ensuring that users always have access to the most recent events, even if they log out from the app.
- User can configure calendar color and easily hide/delete all events or unsubscribe.

Cons:

- Android OS doesn’t support webcal:// schema and ignores all URL

3. Android workaround.
Subscription to the interactive events calendar via deep link to the calendar app (webcal).

Flow:

  1. A user initiates the process by pressing the sync button.

  2. API generates a webcal:// URL that leads to the iCal file.

  3. The application checks what calendar apps are installed on the user’s phone and builds a deep link URL to the calendar app. (https://calendar.google.com/calendar?cid=WEBCALURL)

  4. The system navigates the user to the calendar app.

  5. The calendar app subscribes to the calendar and shows it events.

Cons:
- Android displays a success message, but in reality, it doesn't subscribe to the calendar.

4. Android workaround.
Subscription to the interactive events calendar through the calendar website (webcal).

Flow:

  1. A user initiates the process by pressing the sync button.

  2. API generates a webcal:// URL that leads to the iCal file.

  3. The application checks what calendar apps are installed on the user’s phone and builds a link URL to the calendar site. (https://calendar.google.com/calendar/u/0/r?cid=WEBCALURL)

  4. The system navigates the user to the web browser.

  5. A user subscribes to the calendar on the website.

Cons:

The web calendar doesn't automatically integrate with the user's calendar app.
Users must manually go to settings and enable synchronization to view events in their calendar.

It works, but it's not user-friendly.

5. Synchronization via mobile OS calendar APIs.

https://developer.apple.com/documentation/eventkit
https://developer.android.com/guide/topics/providers/calendar-provider

Flow:

  1. A user initiates the process by pressing the sync button.

  2. The app fetches course dates from the API.

  3. The app generates a calendar using the course name within the phone's system calendar app and populates this newly created calendar with course dates as events with reminders.
    Subsequently, the app saves the calendar and event IDs in the database for potential future updates as needed.

  4. The app periodically verifies course dates and updates the events in the calendar as necessary.

Pros:
- Compatible with both iOS and Android.
- User can configure calendar color and easily hide/delete all events or unsubscribe.

Cons:

  • If the user logs out or deletes the application, the synchronization of events stops.