-
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
Using CalDAV - No widget sync. after calendar sync. #182
Comments
This is CalDAV deficiency: it doesn't broadcast proper notification on update. |
THX! |
Hi @yvolk , this is Marten, the developer of CalDAV-Sync. What broadcast do you mean? AFAIK, there is nothing that a sync adapter needs to send after syncing. If you're talking about ACTION_PROVIDER_CHANGED, that should be sent by the provider itself. Also, we didn't receive any other reports about this. Widget updates work well with other calendar widgets. |
@dmfs Hi Marten, yes we use this filter for notifications on Calendar data changes:
As suggested e.g. here: http://stackoverflow.com/questions/15217723/broadcastreceiver-for-android-calendar-events As I understand the User's problem, after your app have synced events in some calendar provider, that provider doesn't broadcast this intent. |
Here is where the calendar provider sends the broadcast: CalendarProvider2.java line 4578 This method is called (indirectly) when events are inserted, updated or deleted. I'm hesitating to make CalDAV-Sync send this broadcast, because that means on most devices the broadcast is sent twice (which will trigger all listening apps twice and waste precious resources). Also, it feels wrong to send such a broadcast from code that's not a content provider. Lastly, I doubt, that any calendar app or any other sync app sends this broadcast, since that's the job of the content provider. @anthraxn8b What kind of device do you use? |
@dmfs Please read this ticket and relax regarding duplicated broadcast: this intent is already sent (at least by some calendar applications...) even on an item selection... The notification was not well thought by Android developers, and this mistake still causes confusions by developers of related components. BTW, official Android documentation doesn't even mention this intent: http://developer.android.com/guide/topics/providers/calendar-provider.html |
Device: Nexus 4 |
Presuming that @anthraxn8b is running the stock ROM, I'd say that the CalendarProvider most certainly sends the ACTION_PROVIDER_CHANGED broadcast. @anthraxn8b do you know how to use adb? Usually the broadcast is logged to the system log like so (just captured the log on my Nexus 5):
by running |
@dmfs Sorry, but I am no longer using the Nexus 5. This does not mean that I have no Problems related to calendar syncing any longer :-) |
In 2019 we solved the problem with syncing changes by addition to the Tasks app notification intent, sent directly to the ToDo Agenda app. Otherwise notifications are blocked by Android system. |
When CalDAV syncs my calendar the widget is not updated.
The text was updated successfully, but these errors were encountered: