Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Default calendar #32

Open
mejo- opened this issue Sep 9, 2014 · 3 comments
Open

Default calendar #32

mejo- opened this issue Sep 9, 2014 · 3 comments

Comments

@mejo-
Copy link

mejo- commented Sep 9, 2014

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-
Copy link
Author

mejo- commented Jun 15, 2015

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!

@dschuermann
Copy link
Member

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 dschuermann changed the title default calendar Default calendar Jun 15, 2015
@mejo-
Copy link
Author

mejo- commented Jun 24, 2015

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants