-
Notifications
You must be signed in to change notification settings - Fork 127
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
No calendar updates in Android 8+ #298
Comments
I am unfortunately experiencing the same behavior on my Pixel 3. |
I don't think that failure to update calendar events is specific to the latest build. Please see #182 "Using CalDAV - No widget sync. after calendar sync" more than 3 years ago with our discussion on a proper way to know, when a calendar was updated (which Android notification to catch...). It has links to different documentation sources... Similar #225 "seems the calendar cannot up to date automatically even enable the tool background running" with a suggestion to introduce auto refresh. As of now I don't know any better fix / workaround than to introduce periodic updates of calendar events. |
Google own (ugly) Calendar widget refreshes instantly. I don't know if this is open source? |
I found code for AOSP/Calendar https://android.googlesource.com/platform/packages/apps/Calendar.git and didn't find any clues at a first sight. @iloveeclipse @haakonhh What Android version has your device? |
Huawei 8 and Nokia 9. |
Quick google search found this: Does it make sense here? I'm far away from Android development but it looks like our issue here. |
@yvolk Google Pixel 3 with Android 9. |
@iloveeclipse @haakonhh I see, so the problem is really with Android 8 / 9 support. |
I looked deeper, read docs ( https://developer.android.com/about/versions/oreo/background#broadcasts ) and see that the "implicit intent" ( action=android.intent.action.PROVIDER_CHANGED ), which our widget is using to update a list of events after any change, is available in Android 8+ in these cases:
So it looks like in order to update the widget, we have to use some workarounds, e.g.:
?! |
When I realized that self-registering on the needed intents works, the fix appeared really easy. As I noticed, the PROVIDER_CHANGED action occurs about 30 seconds after event change in a Calendar. Please try the fix in the open Beta channel here: https://play.google.com/apps/testing/org.andstatus.todoagenda |
OK, now "Refresh" button properly refreshes, and also widget refreshes on lock/unlock. |
Correction: on Huawei (Oreo, custom Calendar app) I see events immediately after creation in the widget. |
On both systems, calendar events created on another system appear only after longer time (~5 minutes?), while the internet calendar.google.com shows changes instantly. Only opening Calendar app and "refresh" from there synchronizes the widget state. It would be also nice if "Refresh" button in the widget would also trigger calendar sync. |
So now we are talking about speeding up syncing/refresh of a Calendar application. I think that this depends on a Calendar app you are using and maybe that Calendar app has some "sync button widget" for this? |
No, I mean that after I'm creating an event, I see this in the widget only after explicit refresh or after locking/unlocking, but the main problem is fixed now. Great! |
@iloveeclipse After adding a new event, could you wait for a while for the widget's update, don't letting your device to go to sleep, and see, when the widget is updated. |
OK, it seems it takes a bit longer on Nokia, somewhat about one minute. Anyway, release that patch! It is great! |
I added corresponding answer to StackOverflow on this: https://stackoverflow.com/a/54273840/297710 |
Recently I measured time between a change in a Google Calendar and corresponding change in the ToDo Agenda Widget: Today on my Android 10 phone with the latest Google calendar:
It looks like the delay depends on the events sync time between my devices. And my device's "Calendar provider" service (component, provided by Android system) receives any updates only when the syncing over the Internet is finished, not immediately after the change was done on the same device. |
I'm using forked new agenda app, and observe that the calendar info seem to be updated once in the day. Means, I see new or deleted or changed appointments only next day OR if I remove the widget and add it again.
This seem to be a regression from the last version of the old app.
I have it on Oreo and Pie, Huawei and Nokia, so it seem to be an app issue.
The text was updated successfully, but these errors were encountered: