react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Linking.sendIntent(action, extras) is insufficient.

Open dcorbin opened this issue 2 years ago • 3 comments

Description

This link (https://developer.android.com/distribute/marketing-tools/linking-to-google-play#android-app) documents the way to send an intent to Google Play. It requires the passing of a URI (data) and setting a package. Neither is currently supported.

The Intent documentation (https://developer.android.com/reference/android/content/Intent#intent-structure) lists the data parameter as a primary piece of information.

The sendIntent method should support both of these.

React Native Version

71.11

Output of npx react-native info

info Fetching system and libraries information... System: OS: macOS 13.4 CPU: (10) arm64 Apple M1 Max Memory: 1.27 GB / 64.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.16.0/bin/yarn npm: 9.6.7 - ~/.nvm/versions/node/v16.16.0/bin/npm Watchman: 2023.04.03.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.12.0 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 Android SDK: API Levels: 33 Build Tools: 30.0.3, 33.0.0 System Images: android-33 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: Flamingo 2022.2.1 Patch 2 Flamingo 2022.2.1 Patch 2 Xcode: 14.3/14E222b - /usr/bin/xcodebuild Languages: Java: 11.0.18 - /Users/dcorbin/.jenv/shims/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.11 => 0.71.11 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

Try to link to a Google Play app or Developer page as documented here. The existing API does not support it.

Snack, code example, screenshot, or link to a repository

  Linking.sendIntent('android.intent.action.VIEW', [ ])

dcorbin avatar Jul 05 '23 12:07 dcorbin

:warning: Add or Reformat Version Info
:information_source: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2

github-actions[bot] avatar Jul 05 '23 12:07 github-actions[bot]

⚠️ Add or Reformat Version Info ℹ️ We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2

Is it not shown above as 0.71.11, 4 lines from the bottom.

dcorbin avatar Jul 05 '23 14:07 dcorbin

I have attempt to create a patch for this, but there's clearly something I've missed on the internal workings of the project. I can build and run rn-tester. But after making my changes there are errors centered around the additional arguments I've added. From what I can tell there something call Prefab that I may need to understand better, but can find little to no documentation about this.

dcorbin avatar Jul 09 '23 00:07 dcorbin

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jan 05 '24 05:01 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jan 12 '24 05:01 github-actions[bot]

The API is not very useful as of today due to the lack of data parameter. Could we reopen this issue?

BasixKOR avatar Jan 15 '24 07:01 BasixKOR