-
Notifications
You must be signed in to change notification settings - Fork 62
fix: android start up time #2644
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
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
app/android/app/build.gradle
Outdated
* Run Proguard to shrink the Java bytecode in release builds. | ||
*/ | ||
def enableProguardInReleaseBuilds = false | ||
def enableProguardInReleaseBuilds = true |
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.
Able to confirm Person credential flow still works with this turned on?
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.
@bryce-mcmath Proguard does optimization and shrinking for a bundle in Android so I don't think it will impact app functionality. It should be on where possible IMHO.
EDIT: I doubt it will shrinking or optimize our JS code. Just Android native. We have it turned on in BCSC.
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.
Asked this cause a lot of the Android React Native dependency docs required adding certain proguard exclusions to make things work if you had proguard turned on, and our attestation package uses some Android dependencies. Should be fine, just might be worth a test.
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.
@jleach After testing the person credential flow with pro guard enabled it fails at a strange step. The app still initializes and the camera/ QR code scanning seems to work but that person workflow stops at the Connecting to agent...
which is the very first step. Disabling progaurd fixes that issue and does not affect start up time.
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
Signed-off-by: Alfred Rosenthal <alfred.k.rosenthal@gmail.com>
|
Summary of Changes
On some android devices, the bundled js was large enough to cause start up problems, steps taken to reduce bundled js size
app/bundle.gradle
to include proguard, which helps minify android code during buildsmetro.config
to build withmetro-minify-terser
to minify the bundled jsScreenshots, videos, or gifs
this gif was captured with the an apk generated locally with the changes and installed directly onto the phone.
Related Issues
BC-Wallet: 2609
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.
Signed-off-by
line (we use the DCO GitHub app to enforce this)