This works and the Caledar is displayed.
When attempt to add a new event, I receive a notification:
"No calendars" and I must Add an account.
Screenshot attached.
How can I utilise the Android Calendar in my app without having an account setup?
How do I remove the "PC Sync"?
Yes, when I run it and select "Settings" I get the following error:
B4X:
LogCat connected to: 0123456789ABCDEF
--------- beginning of system--------- beginning of main
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
-1
Error occurred on line: 126 (Main)
android.content.ActivityNotFoundException: Unable to find explicit activity class {ed.smith.calendar.example/de.amberhome.objects.preferenceactivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1788)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
at android.app.Activity.startActivityForResult(Activity.java:3810)
at android.app.Activity.startActivityForResult(Activity.java:3761)
at android.app.Activity.startActivity(Activity.java:4091)
at android.app.Activity.startActivity(Activity.java:4059)
at anywheresoftware.b4a.keywords.Common.StartActivity(Common.java:698)
at ed.smith.calendar.example.main._settings_click(main.java:712)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:703)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at ed.smith.calendar.example.main$B4AMenuItemsClickListener.onMenuItemClick(main.java:191)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:147)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:909)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:899)
at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:468)
at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:129)
at android.view.View$PerformClick.run(View.java:20262)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
** Activity (main) Pause, UserClosed = true **