현재 실행하고 있는 어플리케이션에서 홈키를 이용하고나 다른방법으로 홈으로 이동하려고 할때의
인텐트를 먼저 잡아서 무언가의 이벤트를 처리할려고 합니다.
혹시, 홈으로 이동할적에 인텐트를 현재의 어플리케이션의 인텐트필터나 브로드캐스트에서 잡을수가 있을까요?
100% 후킹은 불가능 한걸로 알고 있습니다.
홈키가 눌려질때 상황은 아래와 같습니다.
Intent intent = new Intent(); intent.setAction("android.intent.action.MAIN"); intent.addCategory("android.intent.category.HOME"); intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_FORWARD_RESULT | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); startActivity(intent);
감사합니다^^
그럼 아래와같은 액션과 카테고리를 감지하는 인텐트필터를써서 우선순위를 높여놓아도
캐치가 불가능한가요? ㅜㅜㅜㅜㅜㅜ
같이 뜨는거죠.. 우선순위를 높게 해서 먼저 뜨게 할 수 는 없습니다.
그래서 홈키를 못막는다는거에요
그럼 홈화면이 눌려져서 내 Activity가 hide 되었다는것은 알수 있나요?
로그인 상태에서 홈화면이 눌려졌을때 로그아웃을 걸고 싶은 경우 입니다.
저도 궁금하네요 ㅜㅜㅜㅜ
로그인 유지
100% 후킹은 불가능 한걸로 알고 있습니다.
홈키가 눌려질때 상황은 아래와 같습니다.
Intent intent = new Intent(); intent.setAction("android.intent.action.MAIN"); intent.addCategory("android.intent.category.HOME"); intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_FORWARD_RESULT | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); startActivity(intent);