Android install and No app associated with this mime type issue
See original GitHub issueHey, Firstly, thanks for your hard work! Ios is working beautifully and can’t wait to get this up on android…
First issue
The readme installation instructions for android number,
Copy android/src/main/res/xml/file_viewer_provider_paths.xml to your project res/xml/ directory
I can’t find that path in my project.
Second, I can’t open a docx on android. I’m assuming due to not completely step four of the installation. But… ` // // const path = // absolute-path-to-my-local-file. FileViewer.open(filePath) .then(() => { console.log(‘success’) // success }) .catch(error => { // error console.log(‘Error viewing document’, error) })
`
I should also note. When attempting to open a PDF, I get a success and can view the document.
I am not using RNFS but RNfetchBlob as it supports more of what I’m doing with streams.
UPDATE: It may appear android just doesn’t support docx. If you can verify this, lets get a PR stating that in the docs to save newbies like me some time 😉. Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:24 (4 by maintainers)
Top GitHub Comments
I solve this issue by adding
<queries> <intent> <action android:name="android.intent.action.VIEW" /> <data android:mimeType="*/*" /> </intent> </queries>
toandroidManifest.xml
and rebuild the app . Also try to install app that read the specific file like csv reader for csv filesHi @thexdd! Sorry, I missed the latest comments on this issue! So, regarding the first point (copying
file_viewer_provider_paths.xml
), this is something old which was required before autolinking was introduced. I don’t think you need to do this anymore. The second issue (No app associated with this mime type
), it could be related to Android devices targeting Android 11+. I’ve recently upgraded the documentation here https://github.com/vinzscam/react-native-file-viewer#extra-step-android-onlyLet me know if this helps! Otherwise feel free to open another issue sharing details about the issueissue, a snippet of your code + information regarding devices or simulators where you are experiencing the issue.