Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

ozyl
Copy link

@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
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants