question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Unable to share files on the internal storage

See original GitHub issue

Steps to reproduce

I’m using react-native-fs to download files to the local internal storage. Using such a file with a file:// url works great on iOS but fails on Android. Looks like the filepath is being tampered with and Android is unable to find the file.

URL from react-native-fs file:///data/user/0/com.myapp/files/myapp/art/invitation.jpg

Error Failed to find configured root that contains /data/data/com.myapp/files/myapp/art/invitation.jpg

Environment

  • React Native version: 0.57.8
  • React Native platform + platform version: Android 8.0

react-native-share

Version: 1.1.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anastelycommented, Dec 18, 2019

@a-koka hey, can you give an explanation this code what do exactly and what’s the difference between it and in the documentation. Thanks in advance


<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path path="Download/" name="myExternalImages" />
    <files-path path="myInternalDir/" name="myInternalImages" />
</paths>
1reaction
anshuul-kaicommented, Jan 22, 2019

Done! #432

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] Unable to share files on the internal storage #431
I'm using react-native-fs to download files to the local internal storage. Using such a file with a file:// url works great on iOS...
Read more >
Unable to Attach File Android, What to Do - Tenorshare
From the main menu, navigate to “Settings”, and tap on “Apps”. Select the messaging app you use, select “Storage”, tap on “Clear Cache”...
Read more >
Share files & links with Android devices near you
With Nearby Share, you can immediately send and receive files from devices close to your location. Turn sharing on or off On your...
Read more >
Storage updates in Android 11 - Android Developers
Access to data directories on internal storage ... shared storage access can follow the best practices for sharing media files and sharing non-media...
Read more >
Create and Share a File from Internal Storage - Stack Overflow
My goal is to create a XML file on internal storage and then send it through the share Intent. ... File outFile =...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found