-
Notifications
You must be signed in to change notification settings - Fork 98
feat(android): implement QR code scanner #1124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
android/app/src/camera/java/com/microsoft/reacttestapp/camera/QRCodeScannerFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/camera/java/com/microsoft/reacttestapp/camera/QRCodeScannerFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/camera/java/com/microsoft/reacttestapp/camera/QRCodeScannerFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/camera/java/com/microsoft/reacttestapp/camera/QRCodeScannerFragment.kt
Outdated
Show resolved
Hide resolved
dffdf92 to
370b72c
Compare
| if (project.ext.react.enableCamera) { | ||
| main.java.srcDirs += "src/camera/java" | ||
| } else { | ||
| main.java.srcDirs += "src/no-camera/java" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty cool tbh :D
kelset
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
managed to test it via the virtual camera in Android emulator, and overall it works well 👍
one small thing, that probably needs to be tested separately for both iOS and Android is to handle gracefully when the url is not a metro bundler one. In my first test I generated a random url and the app just crashes. Would be nice to error out, maybe with a "hey this url is not a valid metro instance, try again" or something.
But it's probably something that both iOS and Android need to be coded for, so it can be done as a follow up PR
370b72c to
5357a81
Compare
|
Description
Implements the QR code scanner feature that has existed on iOS for some time.
Resolves #1146.
Platforms affected
Test plan
CameraX + ML Kit adds about 4-5 MBs to the installed app size. Make sure that if single app mode is enabled, we don't get that size bump.