Gathering detailed insights and metrics for react-native-file-opener-fix-0x
Gathering detailed insights and metrics for react-native-file-opener-fix-0x
Gathering detailed insights and metrics for react-native-file-opener-fix-0x
Gathering detailed insights and metrics for react-native-file-opener-fix-0x
A React Native module that allows you to open a file (mp3, mp4, pdf, word, excel, dwg etc.) on your device with its default application
npm install react-native-file-opener-fix-0x
Typescript
Module System
Node Version
NPM Version
Java (61.67%)
Objective-C (38.33%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
145 Stars
20 Commits
86 Forks
3 Watchers
1 Branches
4 Contributors
Updated on Apr 14, 2024
Latest Version
0.2.1
Package Id
react-native-file-opener-fix-0x@0.2.1
Unpacked Size
5.11 MB
Size
4.95 MB
File Count
16
NPM Version
6.3.0
Node Version
8.11.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
A React Native module that allows you to open a file (mp3, mp4, pdf, word, excel, dwg etc.) on your device with its default application
iOS | Android |
---|---|
![]() | ![]() |
##iOS
npm install react-native-file-opener --save
Libraries
folder ➜ Add Files to
node_modules
➜ react-native-file-opener
➜ ios
➜ select RNFileOpener.xcodeproj
libRNFileOpener.a
to Build Phases -> Link Binary With Libraries
##Android
npm install react-native-file-opener --save
1// file: android/settings.gradle 2... 3include ':react-native-file-opener' 4project(':react-native-file-opener').projectDir = new File(settingsDir, '../node_modules/react-native-file-opener/android')
1// file: android/app/build.gradle 2... 3dependencies { 4 ... 5 compile project(':react-native-file-opener') 6}
1// file: MainActivity.java 2import com.fileopener.FileOpenerPackage; // <- import 3 4public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { 5 6 ... 7 8 @Override 9 protected void onCreate(Bundle savedInstanceState) { 10 super.onCreate(savedInstanceState); 11 mReactRootView = new ReactRootView(this); 12 13 mReactInstanceManager = ReactInstanceManager.builder() 14 .setApplication(getApplication()) 15 .setBundleAssetName("index.android.bundle") 16 .setJSMainModuleName("index.android") 17 .addPackage(new MainReactPackage()) 18 .addPackage(new FileOpenerPackage()) // <- add package 19 .setUseDeveloperSupport(BuildConfig.DEBUG) 20 .setInitialLifecycleState(LifecycleState.RESUMED) 21 .build(); 22 23 mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null); 24 25 setContentView(mReactRootView); 26 } 27 28 ... 29 30}
1// file: MainActivity.java 2 ... 3import com.fileopener.FileOpenerPackage;//<- import package 4 5public class MainActivity extends ReactActivity { 6 7 /** 8 * A list of packages used by the app. If the app uses additional views 9 * or modules besides the default ones, add more packages here. 10 */ 11 @Override 12 protected List<ReactPackage> getPackages() { 13 return Arrays.<ReactPackage>asList( 14 new MainReactPackage(), //<- Add comma 15 new FileOpenerPackage() //<- Add package 16 ); 17 } 18... 19}
##Usage
1const FileOpener = require('react-native-file-opener');
1const FilePath = ...; // path of the file 2const FileMimeType = ...; // mime type of the file 3FileOpener.open( 4 FilePath, 5 FileMimeType 6).then((msg) => { 7 console.log('success!!') 8},() => { 9 console.log('error!!') 10});
##Usage with react-native-fs
1const RNFS = require('react-native-fs'); 2const FileOpener = require('react-native-file-opener'); 3 4const SavePath = Platform.OS === 'ios' ? RNFS.DocumentDirectoryPath : RNFS.ExternalDirectoryPath; 5const sampleDocFilePath = SavePath + '/sample.doc'; 6 7... 8 9 function openSampleDoc() { 10 FileOpener.open( 11 sampleDocFilePath, 12 'application/msword' 13 ).then(() => { 14 console.log('success!!'); 15 },(e) => { 16 console.log('error!!'); 17 }); 18 19 } 20 21...
##Demo project https://github.com/huangzuizui/react-native-file-opener-demo
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 4/16 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More