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