react-native-file-viewer | Native file viewer for React Native | iOS library

 by   vinzscam Java Version: 2.1.5 License: MIT

kandi X-RAY | react-native-file-viewer Summary

kandi X-RAY | react-native-file-viewer Summary

react-native-file-viewer is a Java library typically used in Mobile, iOS, React Native applications. react-native-file-viewer has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However react-native-file-viewer build file is not available. You can install using 'npm i react-native-file-viewer' or download it from GitHub, npm.

Native file viewer for React Native. Preview any type of file supported by the mobile device.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              react-native-file-viewer has a low active ecosystem.
              It has 381 star(s) with 88 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 19 open issues and 84 have been closed. On average issues are closed in 183 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of react-native-file-viewer is 2.1.5

            kandi-Quality Quality

              react-native-file-viewer has 0 bugs and 0 code smells.

            kandi-Security Security

              react-native-file-viewer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              react-native-file-viewer code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              react-native-file-viewer is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              react-native-file-viewer releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              react-native-file-viewer has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 167 lines of code, 9 functions and 10 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed react-native-file-viewer and discovered the below as its top functions. This is intended to give you an instant insight into react-native-file-viewer implemented functionality, and help decide if they suit your requirements.
            • Opens a new file
            • Emit an event
            • Create JS modules
            • Creates native file views
            • Create view managers
            Get all kandi verified functions for this library.

            react-native-file-viewer Key Features

            No Key Features are available at this moment for react-native-file-viewer.

            react-native-file-viewer Examples and Code Snippets

            No Code Snippets are available at this moment for react-native-file-viewer.

            Community Discussions

            QUESTION

            How to save downloaded files and view in File app using React Native in iOS?
            Asked 2020-May-27 at 11:13

            I am using react-native-fs to download files from server and save them. Once they are downloaded I am using react-native-file-viewer to open them. This process totally works fine: I am able to download and open it in the viewer, but I am not able to save the file in the File application from the viewer, though I can save in iCloud but not in the iPhone. The downloaded file is stored in a place like

            ...

            ANSWER

            Answered 2020-May-27 at 11:13

            The below code downloads the file and opens it. In case the file already exists it will directly open it.

            Source https://stackoverflow.com/questions/55146640

            QUESTION

            How to open a pdf from my flatlist in react-native?
            Asked 2019-Sep-10 at 19:54

            Im trying to pick a file (pdf-file) from a module called react-native-file-picker. This works ok, and gaves me name, type, path and uri.

            After this, i display the name of the document that i picked in a flatlist.

            Now, what i want is to "onPress" of the item in the flatlist, open the document with some pdf viewer or something like that.

            I've already tried to use other modules like react-native-view-pdf and react-native-pdf and react-native-pdf-view but i cant access the state of my uri with either of them.

            The last one that i used it was react-native-file-viewer and doesn't work very well because it doesn't open the item on press.

            This is my actual code.

            ...

            ANSWER

            Answered 2019-Sep-10 at 17:09

            Try to change the event handler from

            Source https://stackoverflow.com/questions/57874757

            QUESTION

            React Native app crash: Unable to load script from assets 'index.android.bundle'
            Asked 2019-Aug-08 at 11:41

            I'm getting a crash on startup when running a React Native app on device, on release mode (debug mode works fine). The main error seems to be:

            AndroidRuntime: java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. Make sure your bundle is packaged correctly or you're running a packager server.

            I've found various threads about this error but there are about old versions and none of the solutions provided was working.

            The log is as follow:

            ...

            ANSWER

            Answered 2018-Nov-29 at 12:15

            You don't specify which version of react-native you're using. I had the same issue with 0.57.3, and the other answers put me on the right track: there was a bug in the android build system with android gradle plugin version 3.2, which was solved in 0.57.5 (changelog).

            The bugfix is here and is very simple to manually integrate if you don't want to upgrade RN.

            Source https://stackoverflow.com/questions/52805490

            QUESTION

            com.google.android.gms:play-services-base compile and runtime collision in react native
            Asked 2019-Jul-22 at 17:25

            i have a problem with my react native project. when i trying to build the project (in android, windows 10, android emulator), i facing an error about collision between compile time version and runtime version of play-service-base.

            I'm using:

            ...

            ANSWER

            Answered 2019-Jul-22 at 17:25

            This comment on github provides the answer to your question

            A dependency (react-native-device-info in this case) was using the latest version of one of its dependencies instead of a fixed/pinned version. When a new version of google services was released yesterday, it caused the build to pull in the new version for device-info, thereby causing the conflict with other dependencies that correctly pin the version they need.

            Source https://stackoverflow.com/questions/57063945

            QUESTION

            java.lang.ClassNotFoundException: Didn't find class ".MainActivity" on path: DexPathList react-native
            Asked 2018-Sep-15 at 11:44

            I am writing a mobile app using react-native. Even though I did not touch any native side of my code, App started to be stopped just after running. I did some changes in react native components, but I did not use anything new. I debugged it in Android studio and here is the error:

            ...

            ANSWER

            Answered 2018-Sep-15 at 11:44

            Guys one of my project's collaborators deleted package name in MainActivity.java class. It was awful. DO NOT EVER DELETE package name. Adding it again resolved it.

            Source https://stackoverflow.com/questions/52328017

            QUESTION

            react-native-file-viewer don't work in my app
            Asked 2017-Dec-20 at 09:38

            i try to use react-native-file-viewer for view à pdf file in my app. I have import the lib like this : import FileViewer from 'react-native-file-viewer';

            And i had make à function :

            ...

            ANSWER

            Answered 2017-Dec-20 at 09:38

            I'm personnaly using react-native-pdf-view for android and a webView for ios, you can also use a google doc trick to read pdf in android webView but it requires a connection (more info here)

            Source https://stackoverflow.com/questions/47902264

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install react-native-file-viewer

            If your app is targeting Android 11 (API level 30) or newer, the following extra step is required, as described in Declaring package visibility needs and Package visibility in Android 11. If your app targets Android 11 or higher and needs to interact with apps other than the ones that are visible automatically, add the element in your app's manifest file. Within the element, specify the other apps by package name, by intent signature, or by provider authority, as described in the following sections. For example, if you know upfront that your app is supposed to open PDF files, the following lines should be added to your AndroidManifest.xml. IMPORTANT: Try to be as granular as possible when defining your own queries. This might affect your Play Store approval, as mentioned in Package visibility filtering on Android. If you publish your app on Google Play, your app's use of this permission is subject to approval based on an upcoming policy.
            Add the following to your Podfile:. Follow the instructions in the 'Linking Libraries' documentation on the react-native-windows GitHub repo. For the first step of adding the project to the Visual Studio solution file, the path to the project should be ../node_modules/react-native-file-viewer/windows/RNFileViewer/RNFileViewer.csproj.
            In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]
            Go to node_modules ➜ react-native-file-viewer and add RNFileViewer.xcodeproj
            In XCode, in the project navigator, select your project. Add libRNFileViewer.a to your project's Build Phases ➜ Link Binary With Libraries
            Run your project (Cmd+R)
            Open up android/app/src/main/java/[...]/MainApplication.java
            Add import com.vinzscam.reactnativefileviewer.RNFileViewerPackage; to the imports at the top of the file
            Add new RNFileViewerPackage() to the list returned by the getPackages() method
            Append the following lines to android/settings.gradle: include ':react-native-file-viewer' project(':react-native-file-viewer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-file-viewer/android')
            Insert the following lines inside the dependencies block in android/app/build.gradle: compile project(':react-native-file-viewer')
            Locate react-native-file-viewer inside node_modules folder and copy android/src/main/res/xml/file_viewer_provider_paths.xml to your project res/xml/ directory
            Add the following lines to AndroidManifest.xml between the main <application></application> tag: ... <application> ... <provider android:name="com.vinzscam.reactnativefileviewer.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_viewer_provider_paths" /> </provider> </application> ....
            No function about file downloading has been implemented in this package. Use react-native-fs or any similar library for this purpose.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i react-native-file-viewer

          • CLONE
          • HTTPS

            https://github.com/vinzscam/react-native-file-viewer.git

          • CLI

            gh repo clone vinzscam/react-native-file-viewer

          • sshUrl

            git@github.com:vinzscam/react-native-file-viewer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link