大家好,我是安卓新手。我解析了日历文件。我需要从我的应用程序向 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/