
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-native-qr-code-scanner-lite
Advanced tools
Simple QR code scanner. If you only use camera in your project to scan QR codes, this package probably suits you well. There is no need to install any additional packages, like huge camera libraries.
npm install react-native-qr-code-scanner-lite
android/app/src/main/AndroidManifest.xml
:<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Add this -->
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
<!-- … -->
</manifest>
<key>NSCameraUsageDescription</key>
<string>This app uses camera to scan qr codes.</string>
cd ios && pod install
Camera permission is a runtime permission. So you need to ask a user for a permission to use camera. you can import permission related utilities from useCameraPermission hook.
import { useCameraPermission } from "react-native-qr-code-scanner-lite";
const App = () => {
<!-- … -->
const { isGranted, checkPermission, requestPermission } =
useCameraPermission();
<!-- … -->
};
import { QrCodeScanner, useQrCodeScanner, useCameraPermission } from "react-native-qr-code-scanner-lite";
const App = () => {
useCameraPermission(); // or const { isGranted, checkPermission, requestPermission } =
// useCameraPermission();
const { scannerRef, resumeScan, pauseScan } = useQrCodeScanner();
const onQrCodeScanned = useCallback(({ nativeEvent }) => {
// Do something with qr code data
}, []);
const onError = useCallback(({ nativeEvent }) => {
// Handle error
}, []);
return (
<View>
<QrCodeScanner
scannerRef={scannerRef}
onQrCodeScanned={onQrCodeScanned}
onError={onError}
/>
<Button title={'resume'} onPress={resumeScan} />
<Button title={'pause'} onPress={pauseScan} />
</View>
);
};
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
QR code scanner
The npm package react-native-qr-code-scanner-lite receives a total of 0 weekly downloads. As such, react-native-qr-code-scanner-lite popularity was classified as not popular.
We found that react-native-qr-code-scanner-lite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.