如何使用意图通话日历在我的应用程序? [英] How to Call Calendar in my Application using Intents?

查看:80
本文介绍了如何使用意图通话日历在我的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何调用的日历在我使用的应用意图?

How to Call Calendar in my Application using Intents?

推荐答案

您需要一个意图,看起来是这样的:

You need an Intent that looks something like this:

Intent calendarIntent = new Intent(Intent.ACTION_EDIT);  
calendarIntent.setType("vnd.android.cursor.item/event");
calendarIntent.putExtra("title", "Title");
calendarIntent.putExtra("beginTime", startTimeMillis);
calendarIntent.putExtra("endTime", endTimeMillis);
calendarIntent.putExtra("description", "Description");

然后可以通过调用该启动:

You can then start it by calling this:

startActivity(calendarIntent);

这篇关于如何使用意图通话日历在我的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆