TheAlmightyBob / Calendars

Cross-platform calendar API plugin for Xamarin and Windows
MIT License
101 stars 23 forks source link

Documentation for Android specific calendar functions #74

Open MrPump opened 4 years ago

MrPump commented 4 years ago

Thanks for a great plugin. I have a question regarding the Android specific calendar properties. In the platform notes for Android it says:

Android calendars have additional "account name" and "owner account" properties. By default, this will set those properties for new calendars according to the application package label. However, custom names can be set via the Android implementation class.

Are there any instructions on how to implement this? I looked in the CalendarsTester sample app but couldn't find anything.

TheAlmightyBob commented 4 years ago

That is a fair question, and you're right that there are no examples, but thanks for checking first. :)

I just included this as an advanced "just in case," but never really messed with these properties myself so support isn't great.

I think right now you'd have to just cast CrossCalendars.Current in your Android project code to get access to the Android-specific properties.

e.g., in MainActivity.cs:

(Plugin.Calendars.CrossCalendars.Current as Plugin.Calendars.CalendarsImplementation).AccountName