Android Question GoogleCalendarClient - requests only work with internet connectivity

DaOel

Member
Licensed User
Longtime User
Hello,

a few month ago I switched Calendar APIs from an old unofficial library (Calendar2) to GoogleCalendarClient v0.2
Now my users complain that they can not syncronize their appointments (which is a critical part of my app) if they have no Internet. Indeed google console confirms a steady decline in the number of users of my app.

Is there a way to make GoogleCalendarClient work without Internet? Or is there even a newer library for managing google calendar events? The google calendar is such an important element that I am a bit suprised that there are so few posts regarding it.
 

DonManfred

Expert
Licensed User
Longtime User
If you are talking about this lib: The Lib itself only works with the ContentResolver running on the Device.
Is there is a need for Internet then the Android Content-Resolver (or any other Android component) requires it.

There is nothing i can do about this. At least i donĀ“t know what needs to be done. GoogleCalenderClient is just an Experiment trying to set Calendarentries. There is no newer Version of it though.
 
Upvote 0

DaOel

Member
Licensed User
Longtime User
yes that's the underlying lib.
Basically I used the wmCalendar class:
which utilizes this lib.

So first of all, I will try to find out which component causes the need for internet.
 
Upvote 0

DaOel

Member
Licensed User
Longtime User
I just tried wmCalendar without Internet and it seems to work. So basically it seems the problem is in my code ... šŸ˜¬

-edit- its a bit more complicated. It turns out for my use case I indeed need internet :(

So my use case:
The user creates an appointment with third party app google calendar.
User returns to my app and wants to reference this appointment.
Now if the user has no internet, wmCalender delivers a list of appointment, however this event that was just created is not contained! ...
So basically there is internet connection needed for Google Calendar to upload the appointment. Once it is uploaded Google Calendar can also provide this event offline.

This sounds weird but I just tested it ... :rolleyes:
 
Last edited:
Upvote 0

MicroDrie

Well-Known Member
Licensed User
So basically there is internet connection needed for Google Calendar to upload the appointment. Once it is uploaded Google Calendar can also provide this event offline.
This does not sound strange for one master with many servant relationships. If you're lucky, a servant's appointment made off-line is temporarily saved and sent to the master who in turn can send it to all other on-line servants when your servant comes on-line. If such a mechanism does not exist, or if it is not set up that way, an appointment made offline will be discarded.

Incidentally, the Google Apps Script Quickstart refers to

/**
* Lists 10 upcoming events in the user's calendar.
* @see https://developers.google.com/calendar/api/v3/reference/events/list
*/
Maybe you are using an old library version with problems already solved in the newer version.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Maybe you are using an old library version with problems already solved in the newer version.
The "Library" he is using (i am talking only about GoogleCalendarClient) is just using the Content-Resolver available on the Device runng the Client.
There is no direct REST Api involved here.
 
Upvote 1

DaOel

Member
Licensed User
Longtime User
For the task of creating a new appointment I switched to this Library by Alexander Stolte:

Especially the dayview is very comparable to the Google Calendar.

As mentioned in other Threads, Google Calendar is a monster. I am not suprised about this 'weird' behaviour.
Even worse I believe it came out of no where as it worked before.

Also they changed the behaviour in their 'Google Calendar' app as well. You have to click 2 times on refresh and then it will show the latest updates. A few months ago it was syncronized simply right away with not even having to press refresh once.

I still do the syncronization with google calendar, but for displaying the events I use the Lib mentioned above.
 
Last edited:
Upvote 0
Top