android - 如何在 android 中使用谷歌日历 api?

标签 android google-calendar-api

大家好,我是安卓新手。我解析了日历文件。我需要从我的应用程序向 Google 日历添加事件。我正在使用 Eclipse IDE。在eclipse 中如何使用Google calendar api?使用日历 API 需要任何 jar 文件吗?

最佳答案

使用这段代码:

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);

也在这里讨论How to launch Android Calendar application using Intent (Froyo) 此外,这在某些设备上可能无法完美运行,例如 endTime 无法在 HTC wildfire 上运行。

关于android - 如何在 android 中使用谷歌日历 api?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2987610/

相关文章:

android - 应用程序崩溃后清除状态栏中的通知

android - Facebook 帐户工具包使用电话重新发送代码

ios - Google 日历 API iOS 快速入门

javascript - 谷歌脚本: How to get Recurring Events from Google Calendar?

google-calendar-api - 谷歌日历 API 集成

javascript - 在公共(public)日历中插入事件时,Google 日历 API 返回错误 401 'login required'

google-calendar-api - 如何在 Google 日历 URL 中添加提醒提醒时间

android - 插入AssetImage之后随机出现 “lost connection to device”

android - Jacoco - 如何在 jacoco Android gradle 中排除继承的类

另一个类的android xml按钮调用方法