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

Share.Open always return CANCELED

Open Ali72 opened this issue 1 year ago • 0 comments

Steps to reproduce

  1. call Share.Open with a simple message only and set failOnCancel to false
  2. share a simple message only with telegram, IMO, WhatsApp, etc.
  3. return to the app after the share done

Expected behavior

When the user completes sharing, it should return something like the following:

{"dismissedAction": true, "message": "Ok", "success": true}

Actual behavior

When I share a message using the Share.Open function in Telegram, WhatsApp, etc., it always returns the following result if failOnCancel is set to true:

{"dismissedAction": true, "message": "CANCELED", "success": false}

or throws an error if failOnCancel is true, even when the user successfully sends the message and returns to the app.d

Environment

  • React Native version: 0.75.3
  • React Native platform + platform version: Android 11.0

react-native-share

Version: 11.0.4

Ali72 avatar Oct 18 '24 15:10 Ali72