I mean that we have to know when application is in background or foreground. Based on that ```NotificationManager``` decides which type of notification will be displayed.

We can't assume that application is in FG or BG only by ```onPause()``` and ```onResume()``` methods because they can't tell us if whole application is closed or only an activity