내 앱에서 EXIT 버튼을 클릭하면 스택에있는 내 앱의 모든 활동을 마치고 기본 가정 활동 또는 모든 앱 활동으로 이동합니다. .프로그래밍 방식으로 Android의 기본 홈 화면으로 이동하는 방법은 무엇입니까?
나는 나의 onClick()
에 다음 코드를 작성했습니다 :
Intent intent = new Intent(Intent.CATEGORY_HOME);
startActivity(intent);
그러나 그것은 나에게 로그 캣에서 다음과 같은 오류를 제공합니다 :
03-12 11:22:18.279: ERROR/AndroidRuntime(308): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.category.HOME }
그래서 이것을 달성하기 위해해야 할 일을? 매니페스트에서 일부 구성이 필요하거나 나의 접근 방식이 잘못 되었습니까?
가능한 중복 (http://stackoverflow.com/questions/3724509를/going-to-home-screen-programmatically) –