B4i Library iEventKit - Calendar events and reminders

iEventKit provides access to the device stored calendar events and reminders.

upload_2017-2-19_17-9-57.png upload_2017-2-19_17-11-29.png

Events and reminders are both stored in the calendar database and are treated in very similar ways.

Steps to access calendar information:
1. Add usage description:
B4X:
'events
#PlistExtra:<key>NSCalendarsUsageDescription</key><string>description here...</string>
'reminders
#PlistExtra:<key>NSRemindersUsageDescription</key><string>description here...</string>
2. Check the current authorization status based on the required items type. If it is AUTHORIZED then you are good to go. If it is NOT_DETERMINED then you need to call RequestAccessReminders or RequestAccessEvents. A permissions dialog will be displayed.
If the user has denied access then the only way to revert it is by uninstalling the app and installing it again or by setting it from the Settings app.

See the two attached examples.
 

Attachments

  • iEventKit.zip
    124.4 KB · Views: 83
  • Reminders.zip
    3 KB · Views: 80
  • CalendarEvents.zip
    3.1 KB · Views: 104
Top