Closed ofreyssinet-ledger closed 2 years ago
Thanks for your contribution. To be able to merge in develop branch, you need to:
/generate-screenshots
[ ] if needed, /upgrade-llc
If your PR contains UI related changes, it might be necessary to regenerate screenshots.
If your PR requires an update to the ledger-live-common library,
once the PR is merged on develop on ledger-live-common side,
you need to run /upgrade-llc
to switch back to ledger-live-common@develop here before merging.
TL;DR: build configuration to allow all cleartext HTTP traffic in Android debug builds, allowing devs to easily debug the app running on an emulator with a real nano (using the proxy), and allowing an easy wireless debugging experience.
On Android we need to whitelist IP adresses for which we want to allow cleartext HTTP (and not HTTPS) traffic. This happens in a
network_security_config.xml
resource file.There are several issues with that for developer experience:
ledger-live proxy
, if a dev wants to debug the Android app running in an emulator with a real device, the only way is to use that tool. Because of that whitelist, the dev will have to manually add the IP address given by the proxy CLI.In both cases, the dev has to input an IP address manually in the configuration, rebuild the android app (first pain point), and also make sure to not push these changes to the security config (second pain point).
The solution here is to simply add a
network_security_config.xml
specific to debug builds (debug
buildType) and that configuration will by default allow any cleartext HTTP traffic.⚠️ One small downside of this solution: the debug environment will not reflect how the prod app behaves with HTTP traffic ... (it will not work by default in prod)
@grsoares21 you might be interested
Type
DX improvement
Context
Parts of the app affected / Test plan