ComponentName componentName = new ComponentName("com.android.calendar",
"com.android.calendar.LaunchActivity");
if (componentName != null) {
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
// com.android.providers.calendar.CalendarProvider
intent.setFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setComponent(componentName);
startActivity(intent);
} else {
Log.i("", "98979");
}
的logcat返回以下错误:Android的Google日历
ERROR/AndroidRuntime(601): Caused by: android.content.ActivityNotFoundException:
Unable to find explicit activity class{com.android.calendar/com.android.calendar.LaunchActivity}
;
have you declared this activity in your AndroidManifest.xml?
什么是新的日历地址或包?
嗨,你可以编辑你的问题,并正确地格式化代码段吗?这里的堆栈溢出语法参考:http://stackoverflow.com/editing-help – 2009-12-22 21:48:59
请帮助这个线程也 http://stackoverflow.com/questions/37658179/android-calendar-show-continuous-event-that-extends - 用于-2或更多的天 – 2016-06-06 13:01:10