receive_sharing_intent icon indicating copy to clipboard operation
receive_sharing_intent copied to clipboard

[Android 15] SEND intent opens a new Instance of the app, ignoring activity launch mode “singleTask”

Open DinkoPetrovTinqin opened this issue 1 year ago • 3 comments

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:

  1. Device: Google Pixel physical devices
  2. Android version: 15
  3. SEND intent initiated from: Files (the default file explorer)
  4. Flutter version: 3.27.4
  5. receive_share_intent version: 1.8.1
  6. 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

DinkoPetrovTinqin avatar Mar 04 '25 11:03 DinkoPetrovTinqin

Facing the same issue. Hope it will be fixed soon.

fabianbrandscheid avatar Mar 07 '25 12:03 fabianbrandscheid

Guys I am facing same issue in debug mode but when i installed release apk , it is working as single instance.

hungryrahul avatar Mar 25 '25 09:03 hungryrahul

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.

TheOneWithTheBraid avatar Jun 21 '25 11:06 TheOneWithTheBraid