Share the external path between two react native apps

47 views Asked by At

I have two React-Native apps. One acts as a React native server app (using react-native-http-bridge-refurbished) and the other one is a normal react native app for playing videos (react-native-video). In my server app I stored videos, audios images and json files in that app's externalpath (/storage/emulated/0/Android/data/myserverapp/files/). I want to share this external path between these two apps For playing the video which is located in the 1st app's external path.

I'm new to React. I spent weeks trying to solve this problem. But I am not able to solve it. Can anyone help me?

I want to access the server app's external path (/storage/emulated/0/Android/data/myserverapp/files/) on the react native app. I have played the video in react native like this

<Video
 source={{ uri: 'file:///storage/emulated/0/Android/data/myserverapp/files/Nebula_1669715843667'}}
 style={styles.video}
 resizeMode='stretch'
 repeat
 onError={(err) => console.log(err)}
 onLoad={() => console.log('load')}
 onBuffer={() => console.log('bufffer')}
/>

It does not play the videos in that path.If change the file:///storage/emulated/0/Android/data/myreactnativeapp/files/Nebula_1669715843667. It's working fine. But i want to play the videos in that myserverapp path.

0

There are 0 answers