Installations
npm install @hecom-rn/react-native-full-image-picker
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
10.16.0
NPM Version
6.9.0
Score
32
Supply Chain
56.1
Quality
68
Maintenance
25
Vulnerability
93.6
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
gaoxiaosong
Download Statistics
Total Downloads
568
Last Day
2
Last Week
8
Last Month
18
Last Year
121
GitHub Statistics
83 Stars
61 Commits
21 Forks
3 Watching
1 Branches
3 Contributors
Package Meta Information
Latest Version
1.3.1
Package Id
@hecom-rn/react-native-full-image-picker@1.3.1
Unpacked Size
57.35 kB
Size
24.25 kB
File Count
18
NPM Version
6.9.0
Node Version
10.16.0
Total Downloads
Cumulative downloads
Total Downloads
568
Last day
0%
2
Compared to previous day
Last week
100%
8
Compared to previous week
Last month
260%
18
Compared to previous month
Last year
2.5%
121
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
react-native-full-image-picker
It is a react native UI component including a camera view and an album selection view. You can take photos, take video recording or select photo from photo library.
It supports:
- Take photos by camera.
- Video recording.
- Select photos from photo library.
- Safe area for iPhone X.
- Portrait and Landscape mode.
- Multiple selection or capture mode.
- Preview after capture or video recording.
- Maximum count of photos.
ScreenShots
Same UI on Android.
Install
Install by Yarn:
1yarn add react-native-full-image-picker
Install by NPM:
1npm install --save react-native-full-image-picker
NOTICE: This library has no native code for iOS and Android. But you should also install native code of these libraries:
- CameraRoll: Used to get all photos in camera roll or photo library.
- react-native-camera: Used to show camera in view.
- react-native-video: Used to preview the video.
- react-native-fs: Used to copy generated photo or video to a temporary place.
Usage
First import in the file:
1import * as ImagePicker from 'react-native-full-image-picker';
It has three method:
ImagePicker.getCamera(options)
: Take photo from camera. (Camera Mode)ImagePicker.getVideo(options)
: Video recording. (Video Mode)ImagePicker.getAlbum(options)
: Select photo or video from photo library. (Photo Mode)
options
is a object with these settings:
callback: (data: any[]) => void
: Callback method with photo or video array.data
is an uri array of photo or video. Do not useAlert
in this callback method.maxSize?: number
: The maximum number of photo count. Valid in camera or photo library mode.sideType?: RNCamera.Constants.Type
: Side of camera, back or front. Valid in camera or video.pictureOptions?: RNCamera.PictureOptions
: The options of RNCamera.takePictureAsync(PictureOptions)recordingOptions?: RNCamera.RecordingOptions
: The options of RNCamera.recordAsync(RecordingOptions)flashMode?: RNCamera.Constants.FlashMode
: Flash mode. Valid in camera or video.
You can use react-native-general-actionsheet to show ActionSheet
by same API and UI with ActionSheetIOS
.
Change Default Property
You can import page and change defaultProps
to modify settings globally:
1import * as ImagePicker from 'react-native-full-image-picker'; 2 3ImagePicker.XXX.defaultProps.yyy = ...;
The XXX
is the export items of library. Following is the detail.
PhotoModalPage
This is the outter navigator for all modes. You can change these properties of defaultProps
:
Name | Type | Description |
---|---|---|
okLabel | string | OK button text |
cancelLabel | string | Cancel button text |
deleteLabel | string | Delete button text |
useVideoLabel | string | UseVideo button text |
usePhotoLabel | string | UsePhoto button text |
previewLabel | string | Preview button text |
choosePhotoTitle | string | ChoosePhoto page title |
maxSizeChooseAlert | (num: number) => string | Max size limit alert message when choosing photos |
maxSizeTakeAlert | (num: number) => string | Max size limit alert message when taking photos from camera |
supportedOrientations | string[] | Supported orientations. Default is landscape and portrait |
CameraView
This is page for taking photos from camera or recording video. You can change these properties of defaultProps
:
Name | Type | Description |
---|---|---|
maxSize | number | Default max number limit |
sideType | RNCamera.Constants.Type | Camera side type. Default is back |
flashMode | RNCamera.Constants.FlashMode | Flash mode. Default is off |
AlbumListView
This is page for selecting photo from photo library. You can change these properties of defaultProps
:
Name | Type | Description |
---|---|---|
maxSize | number | Default max number limit |
autoConvertPath | boolean | Auto copy photo or not to convert file path to standard file path. Default is false |
assetType | string | Asset type. Please see CameraRoll Docs |
groupTypes | string | Group type. Please see CameraRoll Docs |
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
Found 5/18 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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 17 are checked with a SAST tool
Score
3.3
/10
Last Scanned on 2025-01-27
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