-
Notifications
You must be signed in to change notification settings - Fork 375
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
Improve QR Code scan ability #1036
Conversation
…celo-monorepo into rohit-dua/upgrade-qr-code-scan
Codecov Report
@@ Coverage Diff @@
## master #1036 +/- ##
=========================================
+ Coverage 66.06% 66.16% +0.1%
=========================================
Files 261 262 +1
Lines 7564 7610 +46
Branches 437 443 +6
=========================================
+ Hits 4997 5035 +38
- Misses 2471 2478 +7
- Partials 96 97 +1
Continue to review full report at Codecov.
|
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.
Good first pass, please see comments below :)
@@ -129,6 +129,7 @@ android { | |||
testBuildType System.getProperty('testBuildType', 'debug') | |||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |||
resValue "string", "build_config_package", "org.celo.mobile" | |||
missingDimensionStrategy 'react-native-camera', 'mlkit' |
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.
Can we get a rough estimate of how much this mlkit affects the apk size?
Here are the commands to build an apk, from the android
folder:
./gradlew clean
./gradlew bundleReleaseJsAndAssets
./gradlew assembleRelease -x bundleReleaseJsAndAssets
@@ -0,0 +1,117 @@ | |||
import _QRCode from 'qrcode' |
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.
Please add tests for this file.
…celo-monorepo into rohit-dua/upgrade-qr-code-scan
@@ -0,0 +1,21 @@ | |||
import { genMatrix } from 'src/qrcode/QRGen' |
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.
No need for a new file here, merge it with the QRGen.test.tsx file and put it under a separate describe
block.
Also, if a file doesn't contain jsx code, the filename should be just .ts
} | ||
|
||
onBardCodeDetected = (rawData: any) => { | ||
if (rawData.type === BarcodeTypes.QR_CODE && this.state.qrSubmitted === false) { |
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.
Nit: Consider && !this.state.qrSubmitted
packages/mobile/android/build.gradle
Outdated
@@ -43,6 +43,15 @@ allprojects { | |||
flatDir { | |||
dirs celoClientDirectory | |||
} | |||
maven { | |||
url "https://sdks.instabug.com/nexus/repository/instabug-cp" |
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 maven entry looks like a merge conflict, I removed this a few days ago
* master: [Protocol] Fix network id for alfajores in truffle configs (#1211) When resetting and upgrading a VM testnet, new tx-nodes are included in the new instance group (#771) Upload static VM testnet nodes, add stackdriver logging (#750) Revert "Make packages depend on git vesrion (not npm)" (#1201) Make packages depend on git vesrion (not npm) (#1192) [contractkit] Document methods (#1195) [ck] consistent send tx object in kit (#1191) Move docker images to use node v10 (#1183) [ContractKit]Fill more fields before web3 signing (#1133) [codecov]Fix codecov errors (#1147) [Wallet] Add support for address pasting in send input field (#1180) Fix verification pool validation (#1176) Improve QR Code scan ability (#1036) Add CLI commands around identity metadata (#1167) [wallet]Run geth in an infura-like mode (#1108) # Conflicts: # yarn.lock
Description
The QR scan library react-native-camera currently uses an old version 1.9.1. It is upgraded to 2.9.0. Also the function to scan QR codes is changed to the one that uses Google vision API.
The share QR code button downloads the QR code image as png. When viewed in the gallery it is viewed on a black background by default. The QR scanning is inefficient when the QR code is on a black background. Hence a white margin of 10px(each side) is added to the image
Tested
Scan Tested locally
Related issues