안드로이드나 ios나 background로 오는 푸시 알림을 누르면 앱이 다시 열리고, 여기서 원하는 동작을 구현하기 위해서는
FirebaseMessaging.onMessageOpenedApp.listen
를 사용하면 된다.
그런데 안드로이드에서만 푸시 알림을 눌렀을 때 아무런 동작을 하지 않는 문제가 있었다.
이 경우, 안드로이드 manifest에 다음을 추가해주면 된다.
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
출처 : https://github.com/firebase/flutterfire/discussions/8273