[Flutter] 안드로이드 background에서 푸시 알림(notification) 눌렀을 때 동작하지 않을 경우 해결방법

Kim Gaeun·2023년 2월 8일
0

Flutter

목록 보기
4/5
post-thumbnail

안드로이드나 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

profile
Flutter로 앱개발하고 있어요! iOS도 공부하고 있습니다.

0개의 댓글