handle different fg/bg notification scenarios