Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Save and Google #35

Closed
Tobi2707 opened this issue Aug 23, 2018 · 3 comments
Closed

Data Save and Google #35

Tobi2707 opened this issue Aug 23, 2018 · 3 comments

Comments

@Tobi2707
Copy link

Hello,
i want to include your Calendar in my project. Therefore i tried some of your examples but now i have two questions:

  1. What would be the best way to save the calendar data persistent? Writing to Database oder to a file?

  2. I want to include the Google Calendar in my application. This works and i can log in, but after restart i have to login again and when opening the GoogleCalendarAppView for a second time i get the following error:

java.lang.UnsupportedOperationException: The account has not been authorized yet!

Maybe you have some useful tips for me.

Thank you

@gldiazcardenas
Copy link
Collaborator

Hello,

  1. The calendar framework has a defined model, it is based on Calendar and Entry classes; these classes have the info you might want to persist. Apart from that, the CalendarView has good notification/events support, so every time the user does any action, an event is fired, meaning that you will be able to caught those events (via event handlers) and do whatever you want with them. A glitch might be that there is not explicit saving mechanism implemented, since CalendarFX is pure UI framework, it gets rid of any persisting behavior and focuses only on great graphical user experience.

For Google calendar app, the persistence (synchronization with Google server) is done using the mechanism just described above.

  1. This might be a bug, feel free to raise an issue with all info you could have.

@Tobi2707
Copy link
Author

Okay I understand that this library is only a UI framework, but anyway you have some tips for saving the data into a file.

But more important you can give me help with google authentication. I want to reach that my applications keeps my google data so i only have to log in once. Do you have a example or source code oder maybe tell me useful classes?

Thanks

@dlemmermann
Copy link
Collaborator

For saving you might want to take a look at iCal4j. It is being used by the CalendarFXiCal module.
For the Google issue: that is up for you to figure out. Take a look at what we did inside the CalendarFXGoogle module. We are also no experts in this area, this was only done for experimental and demo purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants