Closed lucasribolli closed 2 years ago
@lucasribolli @thomassth
One question regarding the event status on Android side.
After adding the EventStatus to the package, I get an error when I try to delete an instance of an event.
Error:
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
It doesn't matter when I try to delete an event completely, only when I try to delete an instance. I got it solved by changing:
values.put(Events.STATUS, getEventStatus(event.eventStatus))
to
var status: Int? = getEventStatus(event.eventStatus)
if (status != null) {
values.put(Events.STATUS, status)
}
(CalendarDelegate.kt 599)
So I guess, if we put the value Status with null, the error occurs, while not putting the Status value at all if null, it works fine.
I am wondering if someone else has experienced this behaviour?
It sounds a no tested scenario and I unfortunately don't get this behavior. Maybe status is like recurrenceRule
that needs to not be null to work as expected. You can make a PR fixing this as seem this property is not released yet. If you prefer, I can do it for you.
I added the fix to another pull request. (Link) It might be in connection with a different recurrence rule implementation.
Android: https://developer.android.com/reference/android/provider/CalendarContract.EventsColumns#STATUS iOS: https://developer.apple.com/documentation/eventkit/ekevent/1507158-status
This property is useful when the organizer provides a confirmation of the meeting to the attendees. There is more information about it in this link
In iOS it seems to be read only. That's the reason I add a platform verification in example, allowing EventStatus edition only in Android. But I am not sure if there is a way to edit the status property in iOS side.
I tested it in both platforms