728x90
I used flutter with FCM and i found FirebaseMessaging.onMessageOpenedApp.listen is only worked app is not terminated.
I seached stackoverflow and i found the answer.
The full story is below.
For the first question:
To view the logs from your app, you can use the 'Logcat' tab in Android Studio or IntelliJ:
For the second question:
If your app is terminated and you want to receive a notification click callback, you should use:
FirebaseMessaging.instance.getInitialMessage().then((message) {
if (message != null) {
// DO YOUR THING HERE
}
});
, because according to the Flutter team's comments for onMessageopenedApp function:
/// If your app is opened via a notification whilst the app is terminated,
/// see [getInitialMessage].
728x90
'개발 > Flutter' 카테고리의 다른 글
Get hash key for Mac, (Facebook , Kakao) (0) | 2022.02.10 |
---|---|
Why we use Key in flutter widget? (0) | 2022.02.10 |
flutter FCM 좋은 글 (0) | 2022.02.02 |
UCG update 문제 (0) | 2022.01.31 |
How to setting Theme of flutter circular Progress Indicator bar Color (0) | 2022.01.31 |