0 0

安卓4.0以上如何调用自带日历5

之前的安卓项目调用系统自带日历好用,sdk2.3.3开发的,现在换成4.2手机不好用了,系统直接崩溃,请问4.0之后如何调用系统自带日历,最好提供参考源码,不胜感激。

2014年7月13日 09:56

1个答案 按时间排序 按投票排序

0 0

Intent i = new Intent();

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

cn = new ComponentName("com.android.calendar", "com.android.calendar.LaunchActivity");
 i.putExtra("beginTime", new Date().getTime()); 
 i.putExtra("endTime", new Date().getTime() + DateUtils.HOUR_IN_MILLIS);
i.setComponent(cn);
startActivity(i);

2014年7月13日 13:05

相关推荐

Global site tag (gtag.js) - Google Analytics