/**
* Process가 실행중인지 여부 확인.
* @param context, packageName
* @return true/false
*/
public static boolean isRunningProcess(Context context, String packageName) {
boolean isRunning = false;
ActivityManager actMng = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> list = actMng.getRunningAppProcesses();
for(RunningAppProcessInfo rap : list)
{
if(rap.processName.equals(packageName))
{
isRunning = true;
break;
}
}
return isRunning;
}