I'm getting a lot of how to signup for Google Apps when googling for this.
I've made a CalendarView. I have a listview which shows times in the day that have been taken or are available. When you select a date and time, you create an appointment at that time.
How can I sync with Google Calendar to show that my app has made an appointment at that time? I need to send data to Google I know, but what and how?
Try this code to add an event to the calendar using Intents
Calendar cal = Calendar.getInstance();
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", cal.getTimeInMillis());
intent.putExtra("allDay", true);
intent.putExtra("rrule", "FREQ=YEARLY");
intent.putExtra("endTime", cal.getTimeInMillis()+60*60*1000);
intent.putExtra("title", "A Test Event from android app");
startActivity(intent);
More details: Adding time and date to google calendar via intent
Good luck
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.