I need to generate iCal string from appointments fetched from device. Is there any library that is supported on Windows Phone 7 to generate iCal from appointments?
I tried DDay.iCal, but it does not work with Windows Phone 7.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There isn’t a library specific for Windows Phone 7 I’ve come across, but it shouldn’t be too difficult to write your own classes to generate iCal files, since iCal is just text, after all. The RFC is quite a dense read, but using some online references like this one and looking at some example iCal files should be enough to get started. Take this example iCal file from wikipedia, for example:
So note you BEGIN and END a VCALENDAR, and a VEVENT within them, which has some required fields (like the UID). The only thing to note is that the specification requires lines longer than 75 octets to be broken up, so you can use this method from this stack overflow question for fields with long text:
The function basically escapes all required escape characters, and inserts a linefeed/space every 74 characters.
Good luck, have fun! 🙂