Search code examples
androidandroid-studioapk-expansion-files

Do i need to import the Zip library?


My app's size(built with Android Studio) is more than 100MB so according to Google's documentation, I need to use the APK Expansion file libraries and services.I've implemented the market_licensing and the downloader libraries, however, I am not sure if I need to import the ZIP library so I need some help with that. What's causing my app to be this large are some jpg images and I plan to include all of those in my main expansion file. Do I need to put those into a .zip file and include the zip library or is there any other way?


Solution

  • There is no such thing as a "Zip library". Zip file reading is included in the Android OS (documentation).

    Furthermore, you can make OBB files any format you want, they don't have to be Zips. This is why the name is OBB (Opaque Binary Blob). Google doesn't know the content, it is Opaque to Google Play so you can use any file format you want.

    Finally, if your app is growing larger than 100Mb it is much better to shrink your app than add OBB support. Have you considered using a better image compression format, maybe WebP? See this article.