Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何向日历添加提醒详细信息-Android_Android_Calendar_Android Calendar_Reminders - Fatal编程技术网

如何向日历添加提醒详细信息-Android

如何向日历添加提醒详细信息-Android,android,calendar,android-calendar,reminders,Android,Calendar,Android Calendar,Reminders,我是Android的新手,我需要一些帮助为我的应用程序设置日历。日历是我应用程序中的四个部分之一。其他包括设置提醒。现在我需要的是,我希望这些提醒在日历上显示在特定的一天。例如,如果我在2014年5月4日设置了提醒,则5月4日的日历应显示此提醒 准确地说,它应该类似于“我的家庭作业”中显示的日历 当我们点击一个日期时,日历下应该有一个消息列表,显示当天所有提醒的设置 (来源:)您可以使用android intent调用calender的默认日历意图。使用下面的代码 Intent inten

我是Android的新手,我需要一些帮助为我的应用程序设置日历。日历是我应用程序中的四个部分之一。其他包括设置提醒。现在我需要的是,我希望这些提醒在日历上显示在特定的一天。例如,如果我在2014年5月4日设置了提醒,则5月4日的日历应显示此提醒

  • 准确地说,它应该类似于“我的家庭作业”中显示的日历

  • 当我们点击一个日期时,日历下应该有一个消息列表,显示当天所有提醒的设置



(来源:)

您可以使用android intent调用calender的默认日历意图。使用下面的代码

Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
intent.setType("vnd.android.cursor.item/event");
startActivity(intent);
您也可以在本示例中使用putExtra

intent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, startTime);
intent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME,endTime);
intent.putExtra(CalendarContract.EXTRA_EVENT_ALL_DAY, true);
intent.putExtra(Events.TITLE, "Addy's Birthday");
intent.putExtra(Events.DESCRIPTION, "This is a sample description");
intent.putExtra(Events.EVENT_LOCATION, "My Guest House");
希望这有帮助