luochuang1 / enh

Automatically exported from code.google.com/p/enh
0 stars 0 forks source link

Force Close when attempting to edit calendar entry #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Loading the ics file causes a force close of the calendar application.  
However the entry is inserted in the calendar. 
2. Editing the ensuing calendar causes a force close.  However you can delete 
it. 

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Version 1.5 on Android 2.2.1

Please provide any additional information below.

Original issue reported on code.google.com by roger.th...@gmail.com on 29 Dec 2010 at 8:17

GoogleCodeExporter commented 9 years ago
I have found the cause of this bug and the fix. 

Force close occurs because events in the new version of calendar require a 
timezone and icsbot does not add one if it is specified with TZID in the ics 
file. Adding the following code at line 248 in IcsBotViewActivity will fix the 
problem:

// timezone
String timezone = IcsUtils.getFirstPropertyText(event, "TZID");
if (TextUtils.isEmpty(timezone)) {
    toastAndLog("Can't import an event with no timezone");
    return false;
}
values.put(EVENT_TIMEZONE, timezone);

I would submit a patch however I have changed a lot of other code in this file 
for my project so it wouldn't help ;)

Code was tested on 2.3.3 and 2.2.1 devices

Original comment by roflharr...@gmail.com on 20 Mar 2011 at 7:53

GoogleCodeExporter commented 9 years ago
Where do I find this file? How can I locate line 248 when I do?

Original comment by roger.th...@gmail.com on 20 Mar 2011 at 8:26

GoogleCodeExporter commented 9 years ago
Oh, its in the source code. 
Elliot needs to modify 
http://code.google.com/p/enh/source/browse/trunk/ics-bot/src/org/jessies/icsbot/
IcsBotViewActivity.java and recompile the application.

Original comment by sam.henw...@gmail.com on 20 Mar 2011 at 8:30

GoogleCodeExporter commented 9 years ago
Apparently it was more complicated than I thought and the above code is no good 
in circumstances where the timezone is specified in the event start/end time.

I have made this work in my project(in a hacky way). I will try to find time to 
icsbot and make a patch for Elliott's consideration :)

Original comment by roflharr...@gmail.com on 20 Mar 2011 at 10:42

GoogleCodeExporter commented 9 years ago
Great app. Get FC's as described above though. 

I can add that once synched, the entry CAN be opened and modified on PC's 
Google Agenda. Also, once synched the entry can be opened and modified on the 
android device (HTC Desire, rooted, Gingerbread (Oxygen ROM)) too.
Am sure that Eliott and Roflharrison (Android Agenda Widget is great btw. 
Purchased it and could go without it) working together will be able to solve 
this issue in no time.

Original comment by litenin...@gmail.com on 29 Mar 2011 at 8:54

GoogleCodeExporter commented 9 years ago
IcsBot is dead.

Original comment by elliott....@gmail.com on 5 Nov 2012 at 2:04