feat: Upload universal APK rather than AAB to Google Play#556
feat: Upload universal APK rather than AAB to Google Play#556gmaclennan wants to merge 1 commit intodevelopfrom
Conversation
This results in a larger install size, but with the advantage that all users have all ABIs (CPU architectures) available for sharing p2p updates
|
Qs that might shed some light on this:
|
From this Stackoverflow post, the answer seems to be that x86 phones are very rare.
I don't imagine anyone is using a chrome book at this time, not even sure it will work. Chromebooks don't normally have a GPS, so not sure how useful it would be. I would imagine that anyone with a chromebook or laptop is more likely to have access to internet than someone with a phone.
I checked our actual sizes:
I think we need to consider future users who would be downloading via a (paid) cellular data connection. Many users in countries where Mapeo is used will not have easy access to wifi at home, and will rely on cellular data. Android guidelines used to consider 100Mb as too big to download over cellular (not sure if that has changed) and apps for low-powered devices are targeted for 10 MB. Mapeo is big because we are bundling the Node binary, and this unfortunately got a bit bigger in Node v12. Node and LevelDB binaries are replicated for each arch.
Some popular apps:
My conclusion: supporting p2p updates for x86 devices comes at too great a cost (APK size, both in terms of download size and space on phone) for the majority of users who will not benefit from it. Therefore: have a separate APK for x86/64 devices, so anyone on a x86 device would need to offline update with another x86 device, or use the internet. |
Currently we upload an
.aabbundle to Google Play Store, and the Play Store then generates separate APKs for each architecture (arm7, arm64, x86, x64), which reduces the download size for people installing from the Play Store.Unfortunately for p2p updates, this means that each device only has the code (APK) for its own architecture, so an arm7 device would not be able to share an update with an arm64 device.
This PR changes the Google Play Store upload to use a "Universal" APK, which should ensure that users installing from the Play Store receive an APK that supports all architectures. Unfortunately this means that the install/download size is about 3-4 times as big, but with the flexibility of offline p2p updates.
Question: Should we perhaps separate 2 APKs: arm7 + arm64 in one, and x86 + x64 in the other? Very few phones run on Intel (although it is more common for Chromebooks). This would mean that if someone with an Intel device installs from the Play Store, they would not be able to share a p2p update with an Arm device, and vice-versa. But an Arm7 device would be able to share with an Arm64 device.