My code:
import RNFS from 'react-native-fs';
const downloadDest = `${RNFS.CachesDirectoryPath}/${(Math.random() * 1000) | 0}.apk`;
const options = {
fromUrl: url,
toFile: downloadDest,
background: true,
};
RNFS.downloadFile().promise.then(res => {
// How to open APK file and install?
})
How do I open an APK file and install it?
I have tried using Linking.openURL (downloadDest)
but that didn't work.