Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Calendars

ANSWERED

I'm adding calendar support to my watch, and noticed something odd today.  There was an event that had "Holi" as the title.  Digging in, it came from calendar "US Holidays" that comes from "Subscribed Calendars" source.  I don't know where "Subscribed Calendars" is coming from... is there any way to figure that out?  There is another source named "Other" that I am not sure about either.  

 

Is there a way to surface the available sources/calendars to the user (through settings or something) and let them pick which ones show up in the watch/app?

 

Thanks

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Yeah, the Agenda app does this:

 

Get a list of all calendar sources

Save those to settingsStorage

Let the user select specific calendar IDs and save those to settingsStorage

Filter events by the selected calendars.

 

calendars
        .searchSources()
        .then((sources) => {
            console.log(`permission -> ${me.permissions.granted('access_calendar')}`);
            console.log("received sources")
            sources.forEach((source) => {
                console.log(`Source with title: ${source.title} and id: ${source.id}`)
            })
        })

 

 

View best answer in original post

Best Answer
3 REPLIES 3

Yeah, the Agenda app does this:

 

Get a list of all calendar sources

Save those to settingsStorage

Let the user select specific calendar IDs and save those to settingsStorage

Filter events by the selected calendars.

 

calendars
        .searchSources()
        .then((sources) => {
            console.log(`permission -> ${me.permissions.granted('access_calendar')}`);
            console.log("received sources")
            sources.forEach((source) => {
                console.log(`Source with title: ${source.title} and id: ${source.id}`)
            })
        })

 

 

Best Answer

Nice idea, thanks!

Best Answer
0 Votes

Hello Jon,

How we can display dynamicaly all sources on the settings page please?

 

Best regards,

Mike

Best Answer
0 Votes