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

Emails not working on Android devices

Open brendandestefano opened this issue 7 years ago • 2 comments

Describe the bug Tapping on mailto links on Android device is not opening mail apps. Working fine on iOS devices.

To Reproduce Steps to reproduce the behavior:

  1. Click on mailto:[email protected]
  2. See blank screen

Expected behavior Open default mail app or show mail app choices

Screenshots Screenshot_20190416-110528

Smartphone (please complete the following information):

  • Device: Pixel 2
  • OS: Android Version 9
  • Browser: Default
  • Version: react-native-hyperlink 0.0.14

brendandestefano avatar Apr 16 '19 15:04 brendandestefano

I'm seeing this on iOS with linkDefault as well. It does nothing.

alburdette619 avatar May 02 '19 19:05 alburdette619

Setting the following props worked for me on both platforms;

    onPress={url => Linking.openURL(url)}
    linkText={url =>
      url.includes('mailto:') ? url.replace('mailto:', '') : url
    }

alburdette619 avatar May 02 '19 20:05 alburdette619