Add BackGround Mode and ForeGround Mode Support