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

Link sharing on Android doesn't work #25

Open
harryaswan opened this issue Jul 11, 2019 · 1 comment
Open

Link sharing on Android doesn't work #25

harryaswan opened this issue Jul 11, 2019 · 1 comment

Comments

@harryaswan
Copy link

harryaswan commented Jul 11, 2019

When on Android if you try to share a link on the Story view, it will not work.

From what I can tell it is due to the way the RN Share API is being used, by only passing through the title and url properties. The url property only works on iOS but doesn't work on Android.

On Android I believe it is the message property that should be used.

@harryaswan
Copy link
Author

harryaswan commented Jul 11, 2019

Having issues getting the prepush tests to run correctly by my proposal is something like this:

src/screens/story/components/Header.tsx:102

share(url: string) {
    const shareOptions = {
      title: this.props.item.title,
    };

    if (Platform.OS === 'ios') {
      shareOptions.url = url;
    } else {
      shareOptions.message = url;
    }

    Share.share(shareOptions);
  }

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

No branches or pull requests

1 participant