aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 243 forks source link

The launchNotification is null after clicking on a notification if the Android OS has destroyed the activity. #5496

Open tomlocksapps opened 4 days ago

tomlocksapps commented 4 days ago

Description

Hi, I'm trying to implement the Push Notifications API in my app, and I've noticed that it doesn't work properly when the activity is destroyed by the system. This issue can be easily reproduced by enabling the 'Don't keep activities' option in the system settings.

I tested it on both an API 34 emulator and a Samsung S21.

Categories

Steps to Reproduce

  1. Go to System Settings -> System -> Developer options -> enable "Don't keep activities".
  2. Open the app.
  3. Press home button.
  4. Open push message.
  5. Amplify.Notifications.Push.launchNotification is null.

Screenshots

No response

Platforms

Flutter Version

3.24.3

Amplify Flutter Version

2.4.1

Deployment Method

Amplify Gen 2

Schema

No response

Equartey commented 3 days ago

Hi @tomlocksapps, Thank you for submitting this. We will investigate and provide an update when we can.