[Android 15] SEND intent opens a new Instance of the app, ignoring activity launch mode “singleTask”
A new instance of the app is opened when I try to share a file with Android File Explorer, no matter that the launch mode of the main activity is set to “singleTask”.
Preconditions:
- Device: Google Pixel physical devices
- Android version: 15
- SEND intent initiated from: Files (the default file explorer)
- Flutter version: 3.27.4
- receive_share_intent version: 1.8.1
- Kotlin version: 1.9.22
Steps to reproduce:
- Start the application that will receive the intent
- Navigate through the screens, or make some changes
- Minimize the app using the device hardware button
- Open “Files” and select an image or other file type
- Press the share button from the top right of the screen
- Choose the minimized app
Result: A new instance of the app is opened, and the intent data is lost
Expected: The minimized app should be opened and the intent data should be received in the .getMediaStream().listen method
Did someone have the same problem? Thanks in advance
Facing the same issue. Hope it will be fixed soon.
Guys I am facing same issue in debug mode but when i installed release apk , it is working as single instance.
Yes, facing the same behavior. This is really a deal breaker when dealing with code relying on singleTask, such as databases or OIDC token rotation.