Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
react-native-share App crashing after trying to share Android

I'm trying to use react-native-share to share a QR code on my react native app, unfortunately once I press the send button to share the image the app crashes and sometimes the share is completed sometimes it isn't. I'm not sure were this error might be happening. Opening the share is slower than usual. This is the function were I make the share:

async ShareQR(media) {
    var base64Data = "data:image/png;base64," + media
    const title = "App"

    const shareOptions = {
        url: base64Data,
        title: title,
        message: 'App'
    }
    try {
        const res = await Share.open(shareOptions, function(e) {
            console.log(e)
        })
        console.log(res)
    } catch (err) {
        console.log("This error", err)
    }
}

I have tried the promise and the async await implementations and it gives me the same error. I'm using RN version 0.68.1 and react-native-share 7.6.6 Some images in case I'm not being clear enough:

Share options

gmail share

after send button pressed

Any help would be greatly appreciated!!! Thanks!!

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Note: If your application requires the ability to share base64 files on Android, you need to add

<!-- required for react-native-share base64 sharing -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

to your application's AndroidManifest.xml file as per the example project.

Saw it on the official documentation:

https://react-native-share.github.io/react-native-share/docs/install

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!