You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
@ljbade The only advantage of this is reduced .apk size. Its no longer an issue on Android (since apk size limit has been doubled). Why do we want to change this if curl implementation does not have any bugs?
Why do we want to change this if curl implementation does not have any bugs?
@mb12 The big reason is as you mentioned, a reduced .aar and .apk sizes. Not having to compile it for N ABI really helps keep things svelte. Another reason is to use more platform specific implementations (in this case Java for Android) as it is more accessible to developers.
For future reference, by replacing curl with OkHttp the Mapbox Android Library .aar file goes from ~11 MB to ~7.8 MB.
Mapbox Android SDK 2.2.0 with curl
Mapbox Android SDK 2.3.0-SNAPSHOT with OkHttp replacing curl
The size of OkHttp and it's dependency Okio combine to be about ~375 KB so that the net result is a ~2.825 MB overall decrease in size by replacing curl with OkHttp.
Activity
ljbade commentedon Oct 29, 2015
We will need to perform extended testing over a period of time as #2400 was a rare and hard to reproduce reliably.
Perhaps a Sirius build with this change included will provide the confidence needed.
ljbade commentedon Oct 29, 2015
Simply switching
config.mkto the Android HTTP implementation, reveals bit rot inhttp_request_android.cppdue to refactors.mb12 commentedon Oct 29, 2015
@ljbade The only advantage of this is reduced .apk size. Its no longer an issue on Android (since apk size limit has been doubled). Why do we want to change this if curl implementation does not have any bugs?
ljbade commentedon Oct 29, 2015
After fixing the compile errors, the OkHTTP stack is working again. So far I have not been able to reproduce #2400 but more testing is needed.
[android] Bring back OkHTTP
bleege commentedon Oct 30, 2015
@mb12 The big reason is as you mentioned, a reduced
.aarand.apksizes. Not having to compile it forNABI really helps keep things svelte. Another reason is to use more platform specific implementations (in this case Java for Android) as it is more accessible to developers.bleege commentedon Nov 9, 2015
For future reference, by replacing curl with OkHttp the Mapbox Android Library .aar file goes from ~11 MB to ~7.8 MB.
Mapbox Android SDK 2.2.0 with curl
Mapbox Android SDK 2.3.0-SNAPSHOT with OkHttp replacing curl
The size of OkHttp and it's dependency Okio combine to be about ~375 KB so that the net result is a ~2.825 MB overall decrease in size by replacing curl with OkHttp.
OkHttp Library
Okio Library