offline-calendar icon indicating copy to clipboard operation
offline-calendar copied to clipboard

Default calendar

Open mejo- opened this issue 11 years ago • 3 comments

Hi,

thanks a lot for this valuable app. One thing that bothers me is that the first created calendar is always taken as default one for new dates. It would be awesome if one could configure the 'default calendar'. In case that the android calendar app uses always the first calendar from backend in database, switching the order would be needed.

mejo- avatar Sep 09 '14 09:09 mejo-

Hi again,

@dschuermann just wanted to ping you again regarding this issue. Maybe I'm mistaken and there's already some easy way to switch the default calendar? If not, do you intend to implement an option to configure it anytime soon?

Thanks a lot for providing this valuable app!

mejo- avatar Jun 15 '15 07:06 mejo-

I have not tested it, but maybe this value introduced in Android 4.2 could do it: http://developer.android.com/reference/android/provider/CalendarContract.CalendarColumns.html#IS_PRIMARY Currently all calendars have OWNER_ACCOUNT = ACCOUNT_NAME: https://github.com/dschuermann/offline-calendar/blob/master/Offline-Calendar/src/main/java/org/sufficientlysecure/localcalendar/CalendarController.java#L81 thus this value is always 1.

I don't have much time currently but if someone wants to work on it, I am open for pull requests

dschuermann avatar Jun 15 '15 08:06 dschuermann

Thanks for the hint. IS_PRIMARY looks promising. Unfortunately I don't have much experience in Android coding but I'll see whether I find time to look into it.

mejo- avatar Jun 24 '15 15:06 mejo-