Problem description:
When clicking on push notifications with deep links in Flutter applications a new MainActivity instance is created instead of reusing the existing one.
Solution:
Add the following attribute to your MainActivity in
android/app/src/main/AndroidManifest.xml:<activity android:name=".MainActivity" android:launchMode="singleTask" ... other attributes ...>
Verification:
After implementing this fix:
1. Send a push notification with a deep link
2. Click on the notification while the app is open
3. Verify that the existing MainActivity is reused
Comments
0 comments
Article is closed for comments.