Skip to content

feat(share_plus): Add the intent options for the Android platform#3435

Closed
ozyl wants to merge 2 commits into
fluttercommunity:mainfrom
ozyl:android_intent_options
Closed

feat(share_plus): Add the intent options for the Android platform#3435
ozyl wants to merge 2 commits into
fluttercommunity:mainfrom
ozyl:android_intent_options

Conversation

@ozyl
Copy link
Copy Markdown

@ozyl ozyl commented Jan 18, 2025

Description

  • android_intent_plus does not support sharing pictures (Maybe in the future)
  • share_plusdoes not support sharing to target app on android (This PR)

This PR enables share_plus to support sharing of specified applications on Android.

Platform-Specific Features

Use PlatformOptions to configure platform features.

Android

Supports fine-grained configuration of intent in Android. You can use AndroidIntentOptions to specify the app to share.

  Share.share('check out my website https://example.com', platformOptions:PlatformOptions(
    androidIntentOptions: AndroidIntentOptions(
    	packageName: 'com.example.app',
    	componentName: "com.example.app.ShareActivity",
    	flags: [
    	  AndroidIntentFlag.FLAG_ACTIVITY_CLEAR_TOP,
    	  AndroidIntentFlag.FLAG_ACTIVITY_NEW_TASK,
    	]
  ));

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@miquelbeltran
Copy link
Copy Markdown
Member

I am sorry to say that we already have a big refactor of share_plus under review here: #3404

Please, before taking the time creating big PRs, write a proposal and share it with the maintainers.

I will have to close this PR at the moment. You can incorporate the changes to the new API in #3403, but please before write a proposal somewhere (any existing ticket or create a new one).

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants