Open mohit-varma opened 2 years ago
The plugin does not control the share dialog, only opens it.
I am not sure if there may be a way to dismiss the dialog from Flutter side, but that's not supported at the moment.
Changing this to feature request.
Okay, thanks
Any updates on this? @miquelbeltran
So the notification is from the app that is already opened? I would not expect the pushed ViewController to pop, as the underlying flutter application could handle the click and change its appearance. As for manually closing the share dialogue, we could attempt to instruct the controller to dismiss, using dismissViewControllerAnimated:completion:
on UIViewController
. I am not sure if this would work though.
I had to close programmatically the share intent on iOS for a project. I successfully implemented a Share.close()
method that works great on iOS. My work is here. Not opening any PR because it supports only iOS for the moment. I might take some time to check what we can do on Android.
@Pierre-Monier I think we can do an exception in this case. Feel free to open the PR and we can take a look. Also, the same logic should work on the macOS implementation, no?
Yes it should work on macOS too, but I haven't tried it. I will make a PR then
Sadly, it doesn't work on macOS
I have made some research on Android, sadly it is not possible. We need either root access or an Accessibility service with the related permission to accomplish that. Those solutions are clearly hacky, and I think it should not be merged in this repository.
Platform
iPad 15.6.1
Plugin
share_plus
Version
4.1.0
Flutter SDK
2.10.1
Steps to reproduce
Hi, The share plus dialog is not being closed in case one. Suppose I opened the share plus dialog and sent a push notification on my mobile, after clicking on the notification share plus dialog should dismiss. it is not being closed.
Code Sample
No response
Logs
Flutter Doctor