Top 12 Ways to Reduce Android App Size During App Development Lifecycle
You’re reading this because… You’re an Android app developer who hates to see phones running out of space. You’re a patron of the 150 MP threshold Google Play Store puts on app download. You’re tired of developing mammoth sized APK files that hardly get installed. Let’s admit it: large size apps are storage-hoggers and downright nuisance. Users cannot do without them, nor can they get rid of them. They live in a constant love-hate relation with these apps – praising their rich graphics and smooth navigability, but cursing their sheer size at the end of the day. And, because human needs are insatiable, they cannot help dreaming about ways to have more apps in their devices without compromising on quality or overtaxing the phone storage. Beyond doubt, mobile devices have come of age with larger storage spaces. It has increased from a mere 16 GB 5 years ago to massive 256 GB. But, along with them, app sizes have grown, too. Android users worldwide would unanimously agree to the fact that the largest chunk of their phone storage belongs to apps, which mercilessly gorge on data, RAM and most importantly, battery life. Although there is cloud support for photos, videos, music, and other files, there is only so much a phone can take before it begins slogging and hanging. Size is a Major Problem in the Realm of App Development Don’t take our word for it. If we go by Google’s statistics, nearly 90% of mobile devices on this planet run on Android. The global user base is capped at 2.7 billion and the total number of apps available on Play Store is 2.8 million. Adding to this, Google says if the size of an app is more than 150 MB (earlier 100 MB), chances are its installation is going to be lowered by 30%. For every 6 MB expansion in size, the install conversion rate could drop by 1%. Android App developers should get all worked up about this matter because 70% users now consider the size of the app before installing it. And it’s no secret that an app that exists without considerable downloads is as good as non-existent. The Question is Why Large Size Apps Exist in the First Place? Modern-day apps have been puffed up because of three primary reasons: Highly growing feature sets Increasing UX expectations Support for a wide range of screen sizes and densities Hardly ever do these apps function efficiently. Beyond affecting the storage capacity and memory of mobile devices, they also increase data consumption. We can only imagine the woeful situation where a user relies on primitive Internet connectivity. Thankfully, Google has a Way Out! Even the tech giant is emphasizing on creating smaller apps and giving out tools for developers to make it happen. Its publishing platform, the Android App Bundle, enables users to install apps without re-downloading vital elements which are already present in other apps on Play Store, thus minimizing size. This is much like not having to buy utensils every time because you want to cook a certain recipe; the ingredients are just enough. Google believes the platform can reduce app size by as much as 35%. This is pretty huge. Shrunken sizes will also mean quicker development time and TTM. Long story short, users will have more apps to look forward to without overwhelming their phone storage. All a developer needs to do is upload the app as an Android App Bundle with all compiled codes and resources, and watch the platform defer APK generation as well as signing to Google Play. This is followed by the app serving model, Dynamic Delivery using the codes and resources to generate APKs optimized in harmony with the varying device configurations and then, serving it to users for download. The need to create multiple APKs and structure them to support different devices is dismissed. In return, users receive device-specific smaller versions of the app that can be downloaded without killing space. But, There’s More to Downsizing Android Apps The Android App Bundle cannot be the only key, can it? There has to be some collective effort from the developer fraternity as well to make sure Android apps do not eat up too much space on mobile devices. But, before we proceed, here’s what you need to know about the APK file structure: An APK is a ZIP archive that contains everything your app looks and works like. It comprises Resources like Images and fonts with compiled code as Dex files. An APK contains directories, which include the following: META-INF/ with CERT.SF and CERT.RSA signature files, and a MANIFEST.MF manifest file. assets/ with all assets retrievable using AssetManager objects. res/ with all resources that are not a part of resources.arsc. lib/ with a complied code for the software layer. Subdirectories: armeabi-v7a, arm64-v8a, x86, x86_64, and mips. It contains files, which include the following: AndroidManifest.xml which is always present, no matter what. resources.arsc with all compiled resources and configurations of res/values/ folder. classes.dex with all classes compiled in DEX file format. Top 12 Ways to Reduce Apps Size During the Development Life Cycle Image Optimization Image size can be conveniently reduced without diluting the resolution. For instance, .jpg and .png images can be converted to .webp web image format to downsize apps without compromising the quality. The .webp format offers lossy compression like .jpg and transparency like .png. In short, it has the best of both the worlds. There are a number of tools available for such conversion. Tools such as guetzli and packjpg suit .jpg file compression best while pngcrush, and zopflipng befit .png files. This apart, designers can implement vector graphics to create simple resolution-independent images that don’t crib for space.These are available in Android as VectorDrawable objects and enable a 100-byte file to generate images sharp and screen-sized. It is known that some images can do without static resources. The framework is more than enough to draw such images dynamically at runtime. Yes, using Vector Drawables objects
Top 12 Ways to Reduce Android App Size During App Development Lifecycle Read More »