Calendar-PhoneGap-Plugin
Calendar-PhoneGap-Plugin copied to clipboard
createEvent not working on Android version 10 and above.
I am adding reminder events using the plugin with createEvent method.It works fine below android version 10 but this does not work on android version 10 and above. And createEventInteractively works fine on all android version. Kindly help and thank you.
I'm having a similar experience.
With createEventWithOptions
i get no errors, but a number in return.
On my phone (Pixel XL, Android 10 build QP1A.191005.007.A3) it doesn't add anything to the calendar, but it still succeeds.
On my friends phone (Samsung Galaxy S10+, Android 10 build QP1A.190711.020.G975FXXS3BSL4), the event is created and added to the calendar
Did you find any solution on this? Please let me know..
I had to carry on :/ , as it is working on other devices, but currently not mine.
Same issue, Android 11, xiaomi MI9...
I have done some tests and it seems that the problem mostly occurs on google devices but it does not necessarily depend on the android version. I have tested the following devices:
device | Android version | works |
---|---|---|
Pixel 3 XL | 10 | no |
Pixel | 10 | no |
Nexus 5X | 8.1.0 | no |
Samsung Galaxy J3 | 8 | yes |
Samsung Galaxy S9 | 10 | yes |
If adding an entry in the calendar fails, I have the following error in the logs:
2020-03-05 10:21:01.487 9904-9972/? E/SyncLog: EventHandler::InsertEvent: Forbidden Entity[ id=199 calendar_id=1 calendar_sync_id=-2003879218 mutators=other ]
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "calendar",
"message": "You need to have writer access to this calendar.",
"reason": "requiredAccessLevel"
}
],
"message": "You need to have writer access to this calendar."
}
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(PG:1150)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(PG:401)
at com.google.api.client.http.HttpRequest.execute(PG:1067)
at com.google.android.syncadapters.calendar.CalendarRequestExecutor.execute(PG:1499)
at com.google.android.syncadapters.calendar.EventHandler.sendEntityToServer(PG:470)
at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.sendEntityToServer$ar$ds(PG:3769)
at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.processLocalChangesForHandler(PG:13716)
at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.performSync(PG:11076)
at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.onPerformLoggedSync(PG:10688)
at com.android.emailcommon.syncadapter.LoggingThreadedSyncAdapter.onPerformSync(PG:47)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)
2020-03-05 10:21:01.494 9864-9976/? W/ContentResolver: Failed to get type for: content://com.android.calendar (Unknown URL content://com.android.calendar)
Still no working solution?
Same issue on Android 12. With createEventWithOptions I get no errors, but a number in return. I don't have Google Calendar.