您的位置:首页 > 移动开发 > Android开发

android 调用系统日历

2013-11-13 14:30 351 查看
try {

Intent i =
new Intent();

ComponentName cn =
null;

if (Integer.parseInt(Build.VERSION.SDK) >= 8) {

cn =
new ComponentName("com.android.calendar",

"com.android.calendar.LaunchActivity");

} else {

cn =
new ComponentName("com.google.android.calendar",

"com.android.calendar.LaunchActivity");

}

i.setComponent(cn);

startActivity(i);

} catch (ActivityNotFoundException e) {

// TODO: handle exception

Log.e("ActivityNotFoundException", e.toString());

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: