I am trying to access the Google Calendar events of a specific Google account form Android Things 0.6.1.
Unfortunately I cannot use the Android Calendar API because Android Things as no Google account linked to it, like a normal Android device, nor a user interface that can be used to select the account and grant the the permission.
I tried to use the plain Java Calendar API, but on Android Things is failing due to a JVM incompatibility when I try to authenticate:
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.awt.Desktop" on path: DexPathList[[zip file "/system/framework/com.google.android.things.jar", zip file "/data/app/com.leinardi.android.things.deskclock-sFpdt1rVzS8n7goWxN7dFA==/base.apk"],nativeLibraryDirectories=[/data/app/com.leinardi.android.things.deskclock-sFpdt1rVzS8n7goWxN7dFA==/lib/arm, /system/lib, /vendor/lib]]
I have then tried to combine the code from the Google Assistant sample for Android Things with the Calendar API but looks like the Calendar API use a different Credential class from the Assistant sample (com.google.api.client.auth.oauth2.Credential vs com.google.auth.oauth2.UserCredentials).
Is there currently way to use the Calendar API from Android Things?