RSS*_*SSS 8 android google-calendar-api
大家好我是android新手.我解析了日历文件.我需要从我的应用程序向Google日历添加事件.我正在使用eclipse ide.在eclipse中如何使用Google日历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);
Run Code Online (Sandbox Code Playgroud)
这里还讨论了如何使用Intent(Froyo)启动Android日历应用程序 此外,这可能无法在某些设备上完美运行,例如endTime不能在HTC野火上运行.
从 ICS 版本开始,有一个用于管理日历数据的官方 API: http://developer.android.com/reference/android/provider/CalendarContract.html
| 归档时间: |
|
| 查看次数: |
17762 次 |
| 最近记录: |