Revert "do not add notification if application in foreground"

This reverts commit f0b66123f58195ce0ba9508b26ace5d48a4936ae.