5 ms·
> Even though you can make your app bigger, it doesn’t always mean you should. I'm glad they included and expanded on this point. I used to be stuck on a ginge
by cooper12 11y ago
> Even though you can make your app bigger, it doesn’t always mean you should.
I'm glad they included and expanded on this point. I used to be stuck on a gingerbread device that wouldn't let me install anything larger than a megabyte due to storage issues. I was always grateful to devs who kept their APK sizes in the kilobytes. Now I have a Nexus 5 and install 30MB+ APK's without hesitation because that seems to be the status quo. Does anyone know why most apps these days are so bloated in size? Is it all the frameworks and libraries we use?
- Tepix 11y agoWhatever it is, iOS is also affected. I think the main cause is the addition of various screen resolutions which results in large graphics being needed in multiple variants. Then there's 32bit and 64bit code. But that is an issue that will hopefully be resolved soon.
- iainmerrick 11y agoApple at least are finally trying to address this, with their new "app slicing" feature. It's just surprising it's taken so long.
- creshal 11y ago> Is it all the frameworks and libraries we use? It's one part. The other is graphical assets: You have to provide them in half a dozen DPI versions (vector graphics are still hit or miss), with nowadays ridiculous densities (QHD on 5"? Oh come on). That's a lot of essentially wasted data.
- salman89 11y agoGoogle Play supports splitting APKs on density. Its a little bit more work but can cut down the binary size if you have significant assets.
- creshal 11y ago> Its a little bit more work That's probably the understatement of the day. The Play developer console is such a pain in the ass to work with that I'd rather not.
- RyanZAG 11y agoAgreed, it's terrible. It's amazing there is no plugin for Gradle that does it all for you, including splitting the app for different dpi and arch. Is there a way and it just isn't publicized? AFAIK Google Play does have an API..
- bane 11y agoWell, they should just be doing it for you on the back-end. In fact, all you should have to do is upload an APK with all high-res assets and google should downsample them as appropriate for the downloading device. But they don't so...
- rugbydev 11y agoWhile a technical, low effort solution would be desirable, Google modifying a package after signing is not a desirable solution.
- bane 11y agoWell, your signing of the package would just be a signature to Google that it was indeed you who uploaded it. Google would then sign the new packages as themselves and the Play store could only download and install Google signed packages.
- RyanZAG 11y agoAndroid package security (who can send intents to who) is based off of signatures and it's not really possible or desirable to change that. However, a build script to handle it all for you during upload would be a great way to solve it. The API for this seems to lack the features that you would need though [1]. It doesn't appear to let you upload apps for only certain devices - unless you would specify it in the manifest of the app somehow? Also amusing - the API says "Do not supply a request body with this method", yet obviously you'd have to supply a request body - the app itself! I have a feeling this is not a well-used API. [1] https://developers.google.com/android-publisher/api-ref/edits/apks/upload https://developers.google.com/android-publisher/api-ref/edit...
- yoklov 11y agoFor games its mostly binaries (textures, models, sounds, etc). Dunno about anything else, but 100MB is not a lot of asset space these days, and 30MB is approaching game jam sizes.
- iainmerrick 11y agoFor apps that use native code, you typically ship a "fat binary" with ARMv5, ARMv7 and x86 binaries. Maybe even ARM64 and x64 for the adventurous. Also the set of stable native APIs on Android is pretty small, so you typically include lots of frameworks and libraries directly into your APK, yeah. It seems like apps written in Java have less of an excuse -- no fat binary needed and the system APIs are much richer. But maybe people tend to use a lot of frameworks there too. Also, graphics can take up a surprising amount of space in normal apps, not just games, if you ship variants for all the different screen sizes. On iOS, for example, you include a startup image for each screen size / orientation. That could be a dozen or so full-screen images! And screens are massive these days. Modern "flat" UI images ought to compress much better, though... Overall, I don't think it's just bloat, there is some justification. But I bet most apps could fairly easily be made significantly smaller.
- userbinator 11y agoFor apps that use native code, you typically ship a "fat binary" with ARMv5, ARMv7 and x86 binaries. Maybe even ARM64 and x64 for the adventurous. It's not as if one of the major use-cases is to copy APKs between devices with different architectures and have them work easily, and I'm pretty sure it should be possible to implement something that detects which one the device is before downloading, so how did this situation occur? On iOS, for example, you include a startup image for each screen size / orientation. That could be a dozen or so full-screen images! Unless the images are truly very different (and I don't see why they would be), isn't it possible to just include the highest resolution images and resize if necessary? Modern "flat" UI images ought to compress much better, though... If anything, "flat" UI means there shouldn't be a need to store much in the way of imagery - they can be procedurally generated very compactly in the code itself, or stored in some sort of vector format (even better) - but then again, I've seen people use huge solid colour bitmap images for UI elements in other (desktop) apps. Libraries/frameworks are slightly more tricky but once again, there already is a solution: identify them as dependencies by something like a hash, and don't download if they already exist. You may end up with multiple versions of the same "module", but at least you won't get multiple copies of the exact same one. I'm really astounded that such wasteful practices are prevalant in the mobile device world, where bandwidth and storage are far more constrained than for desktops. It's almost as if they deliberately chose the most bloated way to do everything...
- mtgx 11y agoWell if your phone comes with a 1440p resolution, you should expect graphics to match that, too, which means much larger file sizes by default.