ÇöÀç ½ÇÇàÁßÀÎ ACTIVITY¸¦ ¾Ë¾Æ¿À´Â ÇÔ¼ö |
|
|
![](icon/private_name/1.gif) |
8³â Àü |
private boolean isActivityTop(){
ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
List<RunningTaskInfo> info;
info = activityManager.getRunningTasks(1); //Å×½ºÅ©Áß ¸Ç ÃÖ»óÀ§¿¡¼ ½ÇÇàµÇ´Â Å×½ºÅ©¸¦ °¡Á®¿Å
if(info.get(0).topActivity.getClassName().equals(InCallScreen.this.getClass().getName())) {
return true;
} else {
return false;
}
}
ÇöÀç ½ÇÇàÁßÀÎ ÃÖ»óÀ§¿¡ ÀÖ´Â Activity¸¦ ¾Ë¾Æ ¿Ã ¼ö ÀÖ´Ù.
»¡°£»ö¿¡ Activity ¸íÀ» ¹Ù²ã ÁÖ¸é µÊ
A -> Screen off
À§ °°Àº »óȲ¿¡¼µµ A ¶ó´Â Activity´Â ÃÖ»óÀ§¿¡ ÀÖ°Ô µÈ´Ù.
A -> home Screen
A -> B
À§ °°Àº »óȲ¿¡´Â A´Â ÃÖ»óÀ§¿¡¼ ¹Ð·Á³ª ¹ö¸®°Ô µÈ´Ù. |
|
̵̧ : 272 |
̵̧
¸ñ·Ï
|
|