add isApplicationRunInForeground