Newer Version Available
Considerations and Limitations
Device Limitations
CalendarService doesn’t manage calendar and event data itself. Instead, it makes available certain calendar and event data of the underlying platform (Android or iOS) and hardware (phone or other mobile device). While the features provided by CalendarService are the same across both platforms, they’re subject to some platform-specific quirks and minor differences.
- In order for CalendarService to access a calendar and perform associated actions, the account associated with a calendar must be synced to the device and grant the device permission to access the calendar. For example, if a user has an email account synced to their device but has not granted the device access to that account’s calendar, CalendarService won’t be able to interact with that calendar.
- Some devices have other restrictions, such as an employer-managed MDM, that limit access to certain device calendar APIs. Such restrictions can prohibit CalendarService from accessing and interacting with these calendars.
- CalendarService requires the use of the mobile device’s calendar. Your user must grant your app access to the calendar. The exact user experience is governed by the platform. The request happens automatically on first use, and is managed by the device itself, but you should plan for it when designing the user experience of your app.
-
In Android 11 or later, if the user taps “Deny” for permission to access the Contacts app more than once during the app’s lifetime of installation on a device, the user won’t see the system permissions dialog again. Tapping Deny multiple times implicitly chooses the “don’t ask again” option.
In previous versions of Android, users would see the system permissions dialog each time the app requested permission unless the user had previously selected “don’t ask again”. This change in Android 11 discourages repeated requests for permissions that users have chosen to deny.
If the user has denied permission to access the Contacts app and needs to change their permissions to allow access, they can do so in their device’s settings.
Development Considerations
You can certainly develop the user experience for your component on a desktop or laptop development system. But be sure to test calendar and event functionality on the physical devices on which you plan to deploy your Lightning app.
CalendarService Considerations
CalendarService is built on top of mobile operating system and device features. CalendarService’s capabilities therefore depend on Android or iOS features, which are subject to change beyond our control. When mobile operating system features change, the behavior of CalendarService can change without notice.