offline-calendar
offline-calendar copied to clipboard
Default calendar
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.
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!
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
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.