Android Create Calendar Event always as Birthday

后端 未结 3 1229
旧时难觅i
旧时难觅i 2020-12-10 09:01

I have a strange issue when i create a calendar event programmatically its always noted as Birthday Calendar (type) i don\'t have any clue why its noted like that.

M

3条回答
  •  余生分开走
    2020-12-10 09:34

    The question answered below is old please refer to Pkosta's answer which provides more accurate answer ...

    You have to put CalendarId value as 3 instead of 1 which is default birthday calendar. e.g.

     values.Put(CalendarContract.Events.InterfaceConsts.CalendarId, 1);
    

    change it to

    values.Put(CalendarContract.Events.InterfaceConsts.CalendarId, 3);
    

    It solved the same issue for me.

提交回复
热议问题