vinzscam / react-native-file-viewer

Native file viewer for React Native. Preview any type of file supported by the mobile device.
MIT License
434 stars 102 forks source link

Could not open apk file #159

Open UmarbekSaidov opened 4 months ago

UmarbekSaidov commented 4 months ago

My code:

const apkPath = './src/app.apk';
      await FileViewer.open(apkPath, {
        showOpenWithDialog: true,
        showAppsSuggestions: true,
      });

result:

[Error: Failed to find configured root that contains /src/app.apk]

MukulKumar09 commented 4 months ago

Only absolute paths are accepted. You've given a relative path. And apk support is imperfect. It won't do anything when opening apk. But if there are multiple package installers in your device, it'll ask to choose one, and then you can install the apk.