How to pass an email id to be synchronized to create an event calendar in android?

How do I transfer the email id of a calendar that will be synchronized with the creation event via email? I have a counter that shows a list of accounts that will be synchronized, as shown below. Now, as usual, the passage of the title, the description for creating the event in the calendar application, I use the following code.

ContentValues values = new ContentValues(); values.put("calendar_id", 1); values.put("title", title1); values.put("allDay", 0); values.put("dtstart", settime); values.put("dtend", cal.getTimeInMillis()+60*60*1000); values.put("description", desc1); values.put("???????", mail_id); values.put("???????", participant_mail_id); values.put("visibility", 0); values.put("hasAlarm", 1); event = cr.insert(EVENTS_URI, values); 

What should I use to pass the key to enter the email id and member id? Any help is really appreciated. My screenshot is below.

enter image description here

+4
source share
1 answer

How to transfer the identifier of the mail in the calendar that will be synchronized

The event is associated with the calendar "calendar_id". To get "calendar_id", you must query all custom calendars, and then search results for the name that interests you. Here is a tutorial that should help: Working with Android Calendar

Alternatively, you can create an event, and then let the user choose which event the event should be added to: Add calendar event through intent

+1
source

All Articles