Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruiseki committed Feb 28, 2024
1 parent 5881eef commit 790b111
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ newArchEnabled=false
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true

# MLKit Vision Barcode Scanning API
VisionCamera_enableCodeScanner=true
10 changes: 10 additions & 0 deletions src/screens/imager/Imager.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { useCodeScanner } from 'react-native-vision-camera'

const codeScanner = useCodeScanner({
codeTypes: ['qr', 'ean-13'],
onCodeScanned: (codes) => {
console.log(`Scanned ${codes.length} codes!`)
}
})

return <Camera {...props} codeScanner={codeScanner} />

0 comments on commit 790b111

Please sign in to comment.