[Q] Issue with CalendarContract and event sync - Android Q&A, Help & Troubleshooting

I'm not sure if this is the correct place to ask this, but I'm having some trouble finding the best place to post it...
I am trying to write a calendar sync app to sync with a third party calendar server. The app will sync with the Android system using CalendarContract. I have the app working and in most cases, it works flawlessly. However, in some cases, it fails and when it does, events from the sync'd calendar completely fail to show up on the standard Google Android calendar app. I haven't been able to find the common link yet as to what causes the failure, but once an event is added that breaks the calendar all events from that calendar fail to show up in the calendar app. I am still able to query the CalendarContract and all events show up in my debug logs as well as in the CalendarDebugger database export, they just don't display on the calendar.
Note that, when using aCalendar (https://play.google.com/store/apps/details?id=org.withouthat.acalendar) the events all display properly, so I believe the issue is in how the Calendar App specifically is querying and/or rendering my events.
Anyone have any ideas where I might start working on troubleshooting? The problem is, the calendar app doesn't provide any debugging feedback whatsoever in the event loading process. I've looked through all of my events on the failing calendar, and there are only 6 and I'm not seeing anything that strikes me as invalid. My server side calendar only produces a JSON feed. So I can look at the JSON feed and the SQLITE.db file that the android calendar app exports, and they both look identical so I'm pretty sure I'm getting through the SyncAdapter stages successfully...
I have tried this on the following devices and have the same issue on all of them:
HTC Rezound (Stock HTC Sense ROM with ICS 4.0.3)
Motorola XOOM (Stock ROM with ICS 4.1.2)
HTC Droid DNA (Stock HTC Sense ROM with JB 4.2.2)
Nexus 7 (1st edition, stock ROM with KK 4.4)
Nexus 10 (Stock ROM with KK 4.4)
As you can see, I am pretty much running the gamut of API levels that support the CalendarContract, so this does not appear to be a device specific, manufacturer specific, or API-level specific problem.
Thank you for your help!!

Related

[Q] New calendar event sync failure

gday,
GT-P7510 running android 3.1 kernel 2.6.36.3 starburst 8.8.UEKMB rom
calendar events created by third party apps such as Jorte will not sync (upload) to google calendar.
Have tried several different 3rd party apps (e.g. pure cal) with same result.
Calendar events created on the web calendar will percolate through to tablet calendar, events modified on tablet will go through to google, also events created on the stock calendar application sync up to google, also events created on tablet with 3rd party app will appear in stock calendar on tablet.
It is just events created with 3rd party apps (jorte, purecal) that never percolate through to google calendar online (and then to other device).
I started trying to fix this on unrooted stock tablet, now rooted running starburst rom. Online (in a forum for business cal i think) there is some suggestion that samsung calendar has produced a similar problem in froyo 2.2, but thats the only hint for cause/solution I can find online.
any advice? its ugly using stock calendar for event creation and jorte for everything else.
Please use the Q&A Forum for questions Thanks
Moving to Q&A

Google Calendar Sync on ICS Problems - Known Issue

Tried to search if everyone was aware of this problem. Don't see any references, so posting in hopes it would help others.
If you just flashed one of the awesome ICS ROMs out there and getting constant FC with the error "Google Calendar Sync Has Stopped", you may be experiencing what I have. Note: This doesn't seem to affect all ICS ROMs as I didnt have this issue with Seraphim, but I'm on Objection right now and this is exactly what is going on with my Calendar.
I've been troubleshooting, installing/uninstalling system apks, finding workarounds and have had no luck figuring this one out. At first I thought it was just an exchange issue (another problem i wont get into). But after searching the web it looks to be a known issue with "Recurring Event" and the ICS sync engine. Because I had problems with Exchange Sync on my device, I ended up syncing my Exchange Calendar with Google using a third party app (gSyncit), so I have multiple recurring meetings in my Google Calendar.
Here is an excerpt from 'ISTAR' in a google groups thread:
"The problem appears when you have eventfull calendars, with repeating events. It looks like not all of them are able to be processed with Android sync daemon. Here is the threat discussing that issue: http://code.google.com/p/android/issues/detail?id=23175 Depending from your calendar there could be 1 or more events bothering that app. So you have to identify them and recreate it or if you got unlucky: refrain from using such pattern.
The easiest way to identify the wrecker is 1) to install log reading app, e.g. aLogcat from Market, 2) Go Setting->Accounts->Google->UnCheck/Check Calendar wait for the error "google calendar sync has stopped" 3) run to aLogcat, pause and scroll to the red lines, saying something like "error in recurring pattern =MO TU WE, etc." The error text can vary depending from the nature of your problem. 4) Try to identify which one is bad event and remove it from all calendars. 5) Resync and go to step 1 if error appears again. After 2-3 iteration you should vanish all your malicious events.
And I don't think google will fix it fast. The problem is being known since December 11, and still in progress.
Good luck!"​
I confirmed this by following his steps and removed all my recurring events one-by-one until Calendar synced successfully without the FC.
Since I haven't been able to get Exchange sync or Google Calendar Sync to work with my work email. I've resorted to using Touchdown as the solution, until this is fixed or until I find a better workaround.
Hopefully someone finds this helpful, or can provide me with a solution.
No issues with calendar sync on that Rom here....recurring events and new events sync fine.
Which version of the Rom are you using
Sent from my SAMSUNG-SGH-I717 using XDA
im on the newest objection 2. seems that this is only affecting a handful of people (only two others on the dev thread has mentioned it). it could possibly be a way that google calendar saves exchange items in its database and unable to process it on the device. dont know. frustrating. ive also tried taking the seraphim calendar apk and dropping it in with no luck. so im stumped.
this is the only issue from making my device perfect with objection which i think is the cleanest cooked up rom
It definitely could be an exchange issue.
I do not use exchange so have no way of testing
There's an app for it
I had this issue after updating my Galaxy Note to ICS 4.0.3. Calendar sync caused forced close and no data was synced. Bought an app called CalenGoo for less than EUR5 after confirming with the very helpful dev that it is not reliant on the defective ICS sync engine. Got everything up and running in seconds!
Deleting recurring events (weekly meetings with colleagues etc) is simply not something anyone who uses their Google calendar for anything serious is going to do. And again no guarantee that adding the meetings again would not just cause the same problem. Rather buy a phone that works.
Also tried deleting my corporate google account from the phone and re-adding it (my personal account synced just fine). Not intrigued to factory reset the phone and restore all apps and lose their settings etc. while there is no guarantee that it would do any good.
It is ridiculous that Google/Samsung would release this kind of defective crap, and makes you think what else might be wrong with ICS if QA is this bad.
Fixed my issue!
Hi,
Thanks for sharing this information!
I use gSyncIt to sync from Outlook to Google, then Google Calendar Sync to sync from Google to an Asus Transformer TF101. It worked fine until I upgraded from Honeycomb to ICS and my main calendar failed to sync from that point on, with the dreaded "Sorry" message.
I followed the tips in the first post and discovered I had only one problematic recurring calendar entry. It used this Outlook pattern:
Weekly repeat, Mondays to Fridays only, started July 16, finished August 10​
When I deleted it the sync worked OK. When I recreated it using this:
Daily repeat, weekdays only, started July 16, finished August 10​it still didn't work. Mind you gSyncIt could be representing both of these patterns the same way in Google Calendar.
In the end I recreated the repeating calendar entry as 4 separate week long repeating events and it synced fine to Google and through to ICS.
So if you are running into this bug my suggestion would be to check for any daily recurring events that run longer than a week but exclude some days of the week (especially weekends). I have lots of other daily, weekly and monthly recurring events but this is the only one that had that pattern (and the only one that killed the syncing process).
Thanks,
Matt
OP - thanks for the info, been experiencing this since I've upgraded my Galaxy Note to ICS.
One thing to add upon the info on this thread -- it seems to me that when accessing, via the Google Calendar website, the events that cause the crashes, they seem to show a message "This event has a recurrence rule that cannot be edited in Google Calendar" next to the "Repeat:" checkbox of the event.
This might be easier to detect for you than searching the logs. Of course, you still have to go over all of your reoccurring events to find the offending ones.
sagie said:
OP - thanks for the info, been experiencing this since I've upgraded my Galaxy Note to ICS.
One thing to add upon the info on this thread -- it seems to me that when accessing, via the Google Calendar website, the events that cause the crashes, they seem to show a message "This event has a recurrence rule that cannot be edited in Google Calendar" next to the "Repeat:" checkbox of the event.
This might be easier to detect for you than searching the logs. Of course, you still have to go over all of your reoccurring events to find the offending ones.
Click to expand...
Click to collapse
thanks for showing a way out.. fishing for those offending entries...
Simple mistake maybe
Hi folks I thought I had this same problem as well but found out there was a simple solution. If the duplicate events have a different colour tab on the lefthand side it means they are coming from different calendar feeds and to stop this happening I just clicked on the drop down menu next to 'Calendar' top left of screen and unchecked everything apart from my Gmail email address & UK Holidays.
After that everything went back to normal ... simple mistake or just me?
galaxytab1 said:
thanks for showing a way out.. fishing for those offending entries...
Click to expand...
Click to collapse
There was one offending monthly reminder about my Evernote subscription, deleted the series, sync working now. Happy!
I have only Google Calendar (3 agendas thouhg - personal, professional, birthdays) and after I upgraded my Defy to ICS (Nightly build of 2012.05.29, Kernel CM9) I cannot sync Calendar anymore. Try out different Gapps, always cleaning/wiping cache/dalvik, but nothing seems to solve the problem. Not sure what else I could try. Has anyone find a solution/workaround?

[Q] New calendar items show as meeting requests in Outlook

I have a Verizon Galaxy S3 running Cyanogenmod 10, and I am connected to an Exchange 2010 Server. (Although this problem existed with the stock ROM as well.) When I create a new appointment on my calendar from the phone, it shows as a meeting request instead of a "normal" calendar item. It wouldn't be too much of a problem, except for when I try to edit an entry in Outlook it will say "You are changing details for a meeting on your calendar and you are not the meeting organizer."
Has anyone else experienced this? This problem did not exist on my Samsung Captivate running CM9.
Thanks!
Yes, same problem for me.
When you use the S-planner (Samsung's calender) it's all good.
But with CM10 or even with Google's own calender app on a Sammy ROM one is not able to edit all the calender items except the ones which are meeting requests.
This also means that when you delete a calender item which was created by the Google calendar you get a e-mail saying the organizer deleted the calendar item.
Very annoying!
Update on this: it seems that the problem is the Exchange server together with Android. No problem on a iPhone or Nokia.
Already found out that there is one update which is responsible for this. Just have to figure out which.
Sent from my GT-I9300 using xda app-developers app

[AndroidTV] Exchange Email +/ Calendar Option

I'm attempting to build a meeting room display with a RPi3 that will go outside the doors in our office. All I want them to do is show a calendar linked to our O365 meeting room calendars (i've converted these from room accounts to regular user accounts with a login already).
I've tested numerous options via raspbian, Chromium via the browser and so far Android TV+ sideloading a calendar app seems to be the most fluid. There's a few snags im stuck on that i'd love some input on:
Current issue of focus:
Getting exchange running and sync/push working for the calendar info.
- I've sideloaded multiple Calendar apps (Etar, Sunrise, Outlook, Business Cal 2, Cal+) and about 50% of them wont load, which is fine.
- Sunrise is so far the most aesthetically pleasing one but MS is ending support for it, and it didn't seem to pull the calendar information through via push. It's the only calendar app that has had built in 'add account' options.
- Most of the apps seem to only work via locally added accounts, so my next step is to get that running on AndroidTV
- I've installed the 'Email' and 'ExchangeServices' apps and they're semi-functional but it looks like i may need to sideload two '.odex' files in EmalGoogle.Odex and Exchange2Google.Odex
Can anyone confirm this process sounds rightand if /system/apps is where the .odex files need to be placed? I've found said files on another XDA thread.
The second issue of focus, once the above is done and working is:
- Getting Android TV to rotate to portrait from Landscape (although this might be doable from the monitor itself?)
- Not go to sleep or fade the screen
- Pixel shift maybe?
I assume this bit is doable, but i've only done it via linux command line for raspbian and chromium, not android or android TV
Any input, theories, alternative ideas or solutions are welcome

How to change default app for calendar

I've flashed my i9300 with new rom (MM 6.0). I've used "nano" openGAAPS.
For calendar and reminders I'm using "business calendar" app from store and after flashing I have problem with editing reminders: the problem is that when I choose a reminder to edit, the edit panel is one from google calendar (only gives me date and time change) but I would like that edit panel is from business calendar so that I have other options to change (such as how long before given time the reminder will sound itself (ex. 15min before, 1h before and so on)
so, is there way, and how, to force that my default app for changing reminders is business calendar?
also one additional problem: in business calendar app I can see all the calendars I'm using. So problem is that google has synced my phone with gmail account and drawn all the calendars from my account. So basicly i have 6 calendars: 4 from gmail account, 1 "my calendar" (i think that's the default business calendar calendar) and 1 local calendar that is "my calendar" that I'm using. I can only delete that "my calendar" and others can't be deleted from business app (but I don't need them and i would like to delete them) so I would like to have only 1 calendar - "my calendar"
yelp?
If you read the reviews of the app.. It's the app causing it.
Beamed in by telepathy.
shivadow said:
If you read the reviews of the app.. It's the app causing it.
Click to expand...
Click to collapse
It can't be app... It worked like charm before flashing.
I choosed on purpose the lowest possible gaaps package to avoid google calendar bloatware and it stills high-jacks my calendar...
gesaugen said:
It can't be app... It worked like charm before flashing.
I choosed on purpose the lowest possible gaaps package to avoid google calendar bloatware and it stills high-jacks my calendar...
Click to expand...
Click to collapse
Umm.. Allow me to elaborate..
Each and every version of android is completely different from the last. You can see the android version from its API. Newer API's need updated apps as the code is different and optimised from the previous version so the way the app "calls" to the API is different and the older apps cannot take advantage of it.
Couple that with brand and model differences, the way the API calls the hardware will be different and optimised and older apps will not be able to take advantage of it.
And you can take into account that you phone was never made to run anything higher than 4.x, the API will struggle to communicate with any part of the phone software or hardware. OEM code is illegal to use in custom roms so it all has to be totally written from scratch, of which the app will not know about and will not be able to take advantage... You get it..
If you want complete compatibility then you need to buy a newer phone with native support for the new API's.
I hope this clarifies roughly why you are experiencing issues with an otherwise known to be good app. Basically the app and rom are to blame, more likely the rom itself.
Beamed in by telepathy.
shivadow, thnx for answer.
also I've discovered what is the problem: the copied calendar isn't compatible to new OS so business calendar tries it's best to read event as "whole day" and it redirects editing of the events to the google calendar. The new events that are added to the local calendar which is default calendar of BC can be edited normally.
So I'm copying manually events that are important so that I can delete copied calendar...
also one strange thing is that copied calendar has messed up reminder starting time of events: if an event is set to begin at 19h, it sounds alarm at 7h. the other day it sounded the alarm at 00h and it was set to start that day at 12h...
Like I said, compatibility issues with the api..
Beamed in by telepathy.

Categories

Resources