This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[firebase_messaging] Handle background messages in a kotlin project #2177
Labels
Stale
Issue with no recent activity
type: documentation
Improvements or additions to documentation
type: enhancement
New feature or request
It seems there's no official documentation on handling background messages in a kotlin based project.
Please write documentation for it, there's a lot of confusion around this.
I tried to search similar issues and stumbled upon:
#111
As suggested in that issue, I added the following Application.kt:
I removed configureFlutterEngine from MainActivity.kt (well, until this is solved it's just commented out):
I modified android:name in AndroidManifest.xml:
I added
com.google.firebase:firebase-messaging
toapp/build.gradle
:When trying to build, I got the following error:
I then stumbled upon:
https://stackoverflow.com/a/60531819/5882529
After following it I was finally able to build, but I'm not able to intercept any background message.
I'm testing on Android Emulator: Pixel 3a, Android Q.
That's what I get when I run
flutter doctor -v:
I have IntelliJ IDEA Community Edition installed separately from Android Studio but I'm using Android Studio which does have the Flutter and Dart plugins installed, so that warning can be ignored.
The text was updated successfully, but these errors were encountered: