Push notifications are powerful engagement tools for your users as they can be delivered even when your app is not in the active foreground. As a result, there are many cases where it is helpful (or perhaps necessary) to interact with notification events differently depending upon your app's state.
- **Foreground state**: Your app is running, active and visible.
- **Background state**: Your app is still running but is not currently active and visible. The user is usually on the home screen or in another app.
- **Terminated state**: Your app is no longer running, even in the background. The user can initiate this by swiping your app away in the app switcher.
import notificationLifecycle from '/src/fragments/lib/push-notifications/common/interact_with_notifications/notification-lifecycle.mdx';
import notificationReceived from '/src/fragments/lib/push-notifications/common/interact_with_notifications/notification-received.mdx';
import notificationOpened from '/src/fragments/lib/push-notifications/common/interact_with_notifications/notification-opened.mdx';