GithubHelp home page GithubHelp logo

Documentation / Support Request about ical4j HOT 6 OPEN

ical4j avatar ical4j commented on May 25, 2024
Documentation / Support Request

from ical4j.

Comments (6)

benfortuna avatar benfortuna commented on May 25, 2024

Do you have a sample calendar file to demonstrate the issue? ical4j should only create XComponents/XProperties when it can't identify an appropriate factory.

from ical4j.

rfc2822 avatar rfc2822 commented on May 25, 2024

(Have created a new issue for that, see #43)

from ical4j.

benfortuna avatar benfortuna commented on May 25, 2024

Since the last release (ical4j-2.0-alpha1) I have refactored the registration of factories to reduce code duplication and make it a bit more extensible. To do this I am using the java.util.ServiceLoader, which relies on resource files in the META-INF/services directory.

I suspect what is happening is that the META-INF/services folder isn't being packaged into the APK, and so the factories aren't being registered properly. This would explain why all the components are XComponents and properties are XProperties. I found a bug report on the ApkBuilder that strips the META-INF directory, which may be the cause depending on how you are building the APK:

https://code.google.com/p/android/issues/detail?id=59658

I haven't tried to build an APK from the latest ical4j code so I may be off the mark, but it sounds like the Gradle based build doesn't have this issue. Would you be able to confirm whether the META-INF/services directory is being packaged into your APK?

from ical4j.

FredFirestone avatar FredFirestone commented on May 25, 2024

Thank's for your efforts, you seem to have hit the issue: My apk does indeed not have the META-INF/services directory.
I've likely not used gradle, so you may be right that Gradle based builds would not have this issue. Thanks again for getting to the bottom of this.

from ical4j.

pxg0 avatar pxg0 commented on May 25, 2024

I am in the same situation. I am trying to parse the iCal below and am encountering the same problems with XProperties and XComponents. Ideally, I was hoping to be able to get 'EST' after the iCal is parsed. I tried adding the files manually, zipping the apk and resigning it, but android does not like the apk. I am using 2.0.1 beta jar. Any ideas/works-arounds would be appreciated.

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Eastern Time
BEGIN:STANDARD
DTSTART:20131101T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:Standard Time
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20130301T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:Daylight Savings Time
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;CN="A B";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:[email protected]
ORGANIZER;CN="A C":MAILTO:[email protected]
DTSTART;TZID="Eastern Time":20150813T200453
DTEND;TZID="Eastern Time":20150813T201953
LOCATION:https://blackberry.webex.com/blackberry
TRANSP:OPAQUE
SEQUENCE:1439510693
UID:f9e4688f-4e92-405a-943a-a611ea8d8692
DTSTAMP:20150814T000453Z
DESCRIPTION:\nJOIN WEBEX MEETING\n
SUMMARY:test1
PRIORITY:5
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

from ical4j.

benfortuna avatar benfortuna commented on May 25, 2024

I still don't have a solution for this, as I haven't had time to experiment with Android. Here is some more info about the issue and what other devs are trying (some successfully it seems):

http://stackoverflow.com/questions/5760607/using-serviceloader-on-android

from ical4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.