fluttercommunity / plus_plugins

Flutter Community Plus Plugins
BSD 3-Clause "New" or "Revised" License
1.62k stars 989 forks source link

[Request]: allow to use Android's intent resolver with share_plus #3269

Open ekuleshov opened 1 month ago

ekuleshov commented 1 month ago

Plugin

share_plus

Use case

Currently the share_plus plugin on Android always forces user to use the Sharesheet UI.

It works in many cases, however it does not allow user to select a default target for a given mimetype and then omit the intent selection for the following calls.

Proposal

It would be great if the share_plus provided an option/flag to use the Intent resolver on Android.

So, the user can select desired app/intent and make it a default selection for the following calls.

miquelbeltran commented 1 month ago

If I am not wrong, you can use android_intent_plus to accomplish the same.

ekuleshov commented 1 month ago

If I am not wrong, you can use android_intent_plus to accomplish the same.

I'd prefer not to drag in another dependency. Also, unlike share_plus that one does not return any result, e.g. not possible to tell if user canceled operation or if intent was selected.

It could be similar to image_picker_android, which uses the following approach. So, useAndroidIntentChooser here and set it to false.

  if (imagePickerImplementation is ImagePickerAndroid) {
    imagePickerImplementation.useAndroidPhotoPicker = true;
  }