Gathering detailed insights and metrics for rn-camera-roll
Gathering detailed insights and metrics for rn-camera-roll
Gathering detailed insights and metrics for rn-camera-roll
Gathering detailed insights and metrics for rn-camera-roll
@shovelandsandbox/rn-camera-roll-picker
A camera-roll picker component for react-native
@0610studio/rn-gallery
``` @react-native-camera-roll/camera-roll ```
rn-photo-picker
Plug and play React Native photo picker component for picking photos from camera roll.
@vforvasile/react-native-photos-framework
Fork from https://github.com/olofd/react-native-photos-framework with RN 0.59 issue, removed Android script, lib for IOS only
npm install rn-camera-roll
Typescript
Module System
Node Version
NPM Version
Java (52.7%)
Objective-C (26.2%)
JavaScript (21.1%)
Total Downloads
13,330
Last Day
2
Last Week
7
Last Month
28
Last Year
535
MIT License
111 Stars
32 Commits
19 Forks
5 Watchers
1 Branches
8 Contributors
Updated on Oct 10, 2024
Latest Version
0.0.5
Package Id
rn-camera-roll@0.0.5
Size
5.57 kB
NPM Version
2.14.20
Node Version
4.4.0
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
-41.7%
7
Compared to previous week
Last Month
-28.2%
28
Compared to previous month
Last Year
22.1%
535
Compared to previous year
1
UPDATE:
As of react-native 0.19
, the CameraRoll module is now available on Android too!
Checkout this example of a basic gallery app with infinite scroll:
https://github.com/bamlab/rn-camera-roll/tree/master/example
<img width=300 src=https://raw.githubusercontent.com/bamlab/rn-camera-roll/master/example/screenshot.png />
First, install the package:
npm install rn-camera-roll
Then, follow those instructions:
The Camera Roll iOS API is part of react-native
.
You have to import node_modules/react-native/Libraries/CameraRoll/RCTCameraRoll.xcodeproj
by following the libraries linking instructions.
For react-native >= v0.15, this command will do it automatically:
react-native link rn-camera-roll
For react-native = v0.14 You will have to update them manually:
In android/settings.gradle
, add:
include ':rn-camera-roll'
project(':rn-camera-roll').projectDir = new File(settingsDir, '../node_modules/rn-camera-roll/android')
In android/app/build.gradle
add:
dependencies {
...
compile project(':rn-camera-roll')
}
MainActivity
1package com.example; 2 3import android.app.Activity; 4import android.os.Bundle; 5import android.view.KeyEvent; 6 7import com.facebook.react.LifecycleState; 8import com.facebook.react.ReactInstanceManager; 9import com.facebook.react.ReactRootView; 10import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; 11import com.facebook.react.shell.MainReactPackage; 12import com.facebook.soloader.SoLoader; 13 14// IMPORT HERE 15import fr.bamlab.rncameraroll.CameraRollPackage; 16// --- 17 18public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { 19 20 private ReactInstanceManager mReactInstanceManager; 21 private ReactRootView mReactRootView; 22 23 @Override 24 protected void onCreate(Bundle savedInstanceState) { 25 super.onCreate(savedInstanceState); 26 mReactRootView = new ReactRootView(this); 27 28 mReactInstanceManager = ReactInstanceManager.builder() 29 .setApplication(getApplication()) 30 .setBundleAssetName("index.android.bundle") 31 .setJSMainModuleName("index.android") 32 .addPackage(new MainReactPackage()) 33 34 // REGISTER PACKAGE HERE 35 .addPackage(new CameraRollPackage()) 36 // --- 37 .setUseDeveloperSupport(BuildConfig.DEBUG) 38 .setInitialLifecycleState(LifecycleState.RESUMED) 39 .build(); 40 41 mReactRootView.startReactApplication(mReactInstanceManager, "example", null); 42 43 setContentView(mReactRootView); 44 } 45 46 ...
You can use the getPhotos
API as you would with the iOS API with the after
and the first
params.
You can use both the promise
syntax or the callback
syntax.
1import CameraRoll from 'rn-camera-roll'; 2 3onPhotosFetchedSuccess(data) { 4 const photos = data.edges.map((asset) => { 5 return asset.node.image; 6 }); 7 console.log(photos); 8 /** 9 On Android, this should log something like: 10 [ 11 { 12 "uri": "file:/storage/emulated/0/DCIM/Camera/IMG_20160120_172426830.jpg", 13 "width":3006, 14 "height":5344, 15 "orientation": 90 16 }, 17 { 18 "uri": "file:/storage/emulated/0/DCIM/Camera/IMG_20160116_153526816_TOP.jpg", 19 "width": 5344, 20 "height": 3006, 21 "orientation": 0 22 } 23 ... 24 ] 25 **/ 26} 27 28onPhotosFetchError(err) { 29 // Handle error here 30} 31 32fetchPhotos(count = 10, after) { 33 CameraRoll.getPhotos({ 34 // take the first n photos after given photo uri 35 first: count, 36 // after 37 after: "file:/storage/emulated/0/DCIM/Camera/IMG_20151126_115520477.jpg", 38 }, this.onPhotosFetchedSuccess.bind(this), this.onPhotosFetchError.bind(this)); 39}
No vulnerabilities found.
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 4/25 approved changesets -- score normalized to 1
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
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-06-30
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