Activity Starter Extension showing error when inserting calendar event

When I try to insert an event to the calendar app using Kodular native Activity Starter, the date for that event is ignored (beginnig and end times, and all the other event elements are passed OK to the calendar app, but even if the event is in a future date, the calendar takes the current date).

If I use the Activity Started extension from pepemont instead, passing exactly the same parameters, it works perfect (all the event elements including the date are passed OK to the calendar app), but my app shows the following error:

java.lang.NoSuchMethodError: No virtual method getOpenAnimType()Ljava/lang/String; in class Lcom/google/appinventor/components/runtime/Form; or its super classes (declaration of ‘com.google.appinventor.components.runtime.Form’ appears in base.apk)

The following blocks show a simple example app that has just two card_view element acting as buttons. When clicking the first one, the native Activity Starter is used to insert a calendar event into the default calendar app. No errors are shown but the date of the calendar event is not passed to the calendar (it takes the current date instead, ignoring the date that’s passed in the arguments).

When clicking the second card_view element, all the arguments, particularly the calendar event date, are passed OK to the default calendar app, but the error indicated above is displayed.

So the extension solves the date issue but introduces a runtime error:

This is the error as it appears in the app:

The project (.aia file) can be found here

What can be done to avoid the app to show that error?

Thanks and best regards.
Sergio.

Can you try replace 2 make a list and using join string instead of them

Thanks Mahmoud, but it’s not working.
Replaced the 2 “make a list” blocks using “join string” and tried again, and now the error is

Runtime Error
Argument to Extras should be a list of pairs

So I rolled everything back as it was before making this change.

1 Like

An extension developer, probably @mahmoud_hooda could update the modified activity starter extension and catch that error…
what pepemont did, see here https://groups.google.com/d/msg/mitappinventortest/IM9yDZDAm-Q/IcxUtvX2BQAJ
and the original Activity starter code can be found in the App Inventor sources

Taifun

2 Likes

I rebuilt the ActivityStarter module as an extension, introducing the changes that pepemont suggested, and it’s working now without any errors. Its called XXActivityStarter and I leave it here just in case it could be of help to anyone, but I want to clarify that I did not test the whole extension features (I tested just the part that was causing the issue, which is inserting a calendar event).

Best regards and thank you very much for your help.

1 Like