Skip to content

Get absolute local image path for android #26880

@IsmetGlumcevic

Description

@IsmetGlumcevic

Hi ,
I am trying to share image on android. I use react-native-share to share image and react-native-fs to get image path from my local image.
On ios work fine. I get path like 'file://' + RNFS.MainBundlePath + shareimgurl.
On android don't work. I trying with 'file://' + RNFS.DocumentDirectoryPath + shareimgurl, RNFS.ExternalStorageDirectoryPath....
I do not understand how like absolute path for local image. My image is in folder 'slike' in app root.
This is issue react-native-share/react-native-share#593
Thanks.

System:
OS: macOS 10.15
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 28, 29
Build Tools: 28.0.3, 29.0.0
System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.3 => 0.60.3
npmGlobalPackages:
react-native-cli: 2.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: For Stack OverflowA question for Stack Overflow. Applying this label will cause issue to be closed.Resolution: LockedThis issue was locked by the bot.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions