chrsep / Kingfish

Portal for Binusmaya v0.3 and up
http://goo.gl/oqjjUE
GNU General Public License v3.0
26 stars 10 forks source link

Google Calendar Integration #11

Open chrsep opened 7 years ago

chrsep commented 7 years ago

There have been a lot of request for the ability to export the schedule data into Google Calendar, I have looked into this in the past but haven't got the time to implement it yet.

Possible Implementation

One of the hard thing to do in adding this is keeping the Google Calendar in sync with the schedule from binusmaya. To do this, every time Portal updates its schedule, it have to track which schedule actually changes so that it can update or add the relevant records on the calendar.

I am not really sure that my current implementation of updating the data (emptying the database and reinsert every data at each update) will suffice for this, unless realm could see the difference in the database before and after a transaction.

We probably also needs to implement a service that updates Portal's schedule every day, since people using Google Calendar would probably open Portal and update the data less often.

I am thinking in using the calendar api from android to achieve this, but I am not yet familiar with this api so I am not really sure if that's gonna work.

In Summary

To implement this we need to:

  1. Keep track of schedule changes on every update
  2. Implement a service to update Portal every day
  3. Save the data to calendar and keep track of all records pushed to calendar (for updating and in case user wants to remove all of it)

There probably exist a better way to do this, this is just my current idea of how to implement this.

cviali commented 5 years ago

Binus already implemented calendar integration through Office 365's Outlook, and students could sync them to Google Calendar through Outlook if they want it that way.

Possible implementation through Portal is either using their way to sync the calendar in Binusmaya from Outlook to Google Calendar, or automate the process of what I mentioned above, which requires some authentication i.e. Microsoft account + specified Google account.