如何使用 Intent (Froyo) 启动 Android 日历应用程序 [英] How to launch Android Calendar application using Intent (Froyo)

查看:21
本文介绍了如何使用 Intent (Froyo) 启动 Android 日历应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从一个安卓应用程序打开日历应用程序.当我在网上搜索时,我得到的只是使用意图创建新事件.我可以找到打开联系人和图库等的意图.

I want to open up the Calendar application from an android application. When i searched online, all i got is to create new events using intent. I could find Intents to open Contacts and Gallery etc.

是否可以将日历启动到特定的一周或一天?如果可能的话,有人可以帮我解决一下.

Is it possible to launch the Calendar to a specific week or day? If possible, could someone please help me with it.

提前致谢.

推荐答案

Intent intent = new Intent(Intent.ACTION_EDIT);  
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", "Some title");
intent.putExtra("description", "Some description");
intent.putExtra("beginTime", eventStartInMillis);
intent.putExtra("endTime", eventEndInMillis);
startActivity(intent);

这篇关于如何使用 Intent (Froyo) 启动 Android 日历应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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