Does google play modify or optimise the published APK? - android

I know that google play generated an optimized APK for a given App Bundle (aab).
But if one publishes the old format (APK), does google play modify the apk to make it smaller? Does the user download the whole apk on every update?

Yes.
Note from August next year, you will only have to download aab.

Google Play does not make APKs smaller as it isn't designed for that. AAB are the new upload format and Google Play generates APKs from AAB depending on the device (screen density, abi, language etc) as well as bringing many new features such as dynamic modules.
Google Play uses your app bundle to generate and serve optimized APKs for each device configuration, so only the code and resources that are needed for a specific device are downloaded to run your app. You no longer have to build, sign, and manage multiple APKs to optimize support for different devices, and users get smaller, more-optimized downloads.
More information: https://developer.android.com/platform/technology/app-bundle

Related

Android and the AAB format (Android App Bundle): Google says "

Google says here:
Important: In the second half of 2021, new apps will be required to
publish with the Android App Bundle on Google Play. New apps larger
than 150 MB must use either Play Feature Delivery or Play Asset
Delivery.
The most straightforward interpretation of this is:
Apps that are first uploaded on Google Play (and does not already exist there) requires AAB, but already existing apps, even if you release a new version of that app, does not require AAB format
But, it seems odd to me that Google would allow millions of apps to use APK instead of AAB, so I considered if this is what they actually mean:
All new releases, including already existing apps on Google Play, require AAB format
Can someone confirm this for me?
Also, if AAB is not required for existing apps, for how long do they allow APK releases?
All new releases, including already existing apps on Google Play, require AAB format
This is incorrect. As you initially said, the change as stated today only applies to apps that upload an artifact for the first time.
Google has not communicated what the plan is for existing apps.

Use of Build Bundle Option in Android studio 3.2

I want to know what is the use Build Bundle Option in Android studio 3.2
Here is a image
What is App Bundle?
An Android App Bundle is a new upload format that includes all your app’s compiled code and resources, but defers APK generation and signing to Google Play.
Google Play’s new app serving model, called Dynamic Delivery, then uses your app bundle to generate and serve optimized APKs for each user’s device configuration, so they download only the code and resources they need to run your app. You no longer have to build, sign, and manage multiple APKs to support different devices, and users get smaller, more optimized downloads
Uses of App Bundle
Dynamic Delivery :
Dynamic Delivery is Google Play's new app serving model, and it uses your app bundle to generate and serve optimized APKs for each user's device configuration, so they download only the code and resources they need to run your app. For example, user won't need other languages strings if he have set English as his default language.
Dynamic feature modules :
Dynamic feature modules allow you to separate certain features and resources from the base module of your app and include them in your app bundle. Through Dynamic Delivery, users can later download and install those components on demand after they've already installed the base APK of your app. You can use Play Core Library you can download these modules when requested .
On the left: a simple app that includes a base APK (B) and some configuration APKs (C). On the right: a more complex app that includes two dynamic feature APKs (D) and corresponding configuration APKs (C) for download on demand.
No need for having multiple APKs :
The dynamic delivery takes care of the split apk . A fundamental component of Dynamic Delivery is the split APK mechanism available on Android 5.0 (API level 21) and higher. With split APKs Google Play can break up a large app into smaller, discrete packages that are installed on a user's device as required.
optimizing the APK content are based on the following:
Locale
Screen density
CPU architecture
More info can be found here
Smaller Apk size :
As app are broke in smaller parts , that means when user downloads you app it will be of smaller size for him . On average, apps published with app bundles are 20% smaller in size.
Testing App Bundles
After you build your Android App Bundle, you should test how Google Play uses it to generate APKs and how those APKs behave when deployed to a device. There are two ways you should consider testing your app bundle:
Locally using the bundletool command line tool
Through Google Play by uploading your bundle to the Play Console and using the new internal test track.
Sources
Android official documentation
Codelabs
Medium blog post
An Android App Bundle is a file (with the .aab file extension) that you upload to Google Play to support its new app serving model, called Dynamic Delivery. Each bundle includes the compiled code and resources for all of your app's modules and supported device configurations.
Shortly its a new upload format that includes your code and resources but defers APK generation and signing to Google Play.
link
Studio will generate .aab file that will be uploaded on playstore and it will create many different versions of app based on chip architecture, screen size and locale.
Newer customized apk for different devices have smaller download size.
ref
Actually this will help you to reduce the downloadable size from play store
since while user install it will gave only required part of that apk for higher resolution mobile only XXXHDMI folder will download not XXHDMI and XHDMI

App bundle (.abb) size is bigger than APK (.apk), should not be the opposite?

The code is practically the same, I just added one class, is it because when the Bundle is installed in a device just a part of it is going to go to that device and its size is going to be lower?
From the docs
Google Play’s Dynamic Delivery uses your Android App Bundle to build
and serve APKs that are optimized for each device configuration. This
results in a smaller app download for end-users by removing unused
code and resources needed for other devices.
So basically apk will be build using Dynamic delivery which will combine only necessary resources and will ensure that the build installed on particular design is optimized. There is no mention that bundle size is smaller, but it ensures that download size for end user will be less.
Also this a good article to refer to.
Mentionig some key points mentioned in it
Step 1: You write all your code for your app in an IDE such as Android Studio or a games engine such as Unity as you normally would.
Step 2: Now, when you’re ready to test or release the app, you build it as an Android App Bundle, Android’s new app publishing
format. You still sign the app so that Google Play can verify it’s
from you.
Step 3: If you haven’t already, you opt in to app signing by Google Play. If you’re releasing a new app, you can do this in a one-click
process when you upload your app. When you opt in, Play designates
the first key you used to sign your app bundle as the upload key.
This is just for security identification purposes and, if you ever
lose it, you can contact Google to verify your identity and reset
it. For existing apps, you need to visit the app signing page in
the Play Console and securely transfer your app signing key to
Google Play. Why do you need to do this? Continue to step 4 to find
out.
Step 4: When you upload your app bundle to Google Play, Play processes it and generates split APKs signed with the app signing
key for every possible device configuration and language that you
support. Split APKs are an Android platform feature introduced in
Android L. As long as each split APK is signed with the same key,
the Android platform will treat them as one app. You can think of a
split APK as ‘part’ of an APK: to run the app, the device treats
all the parts as a single app.
Step 5: When a user installs the app, Play delivers the base split APK (all the code that’s common for every device), the language
split APKs (for the languages the user speaks), and the device
configuration split APKs (for the device’s screen size and the CPU
architecture). This means the device gets just what it needs without
wasted space. For updates to be accepted by the device, every
release’s split APKs must be signed with the same app signing key as
the original app install.

Is it any way to upload new apk to Google Play automatically?

It is possible to upload new apk to Google Play automatically? I mean not for already published apps (that have at least one APK uploaded), but for creating absolutely new application and upload its first apk. There is tools like Publisher API, Fastlane etc, but they are uploading apk's for update already published apps.
This is not possible with current android-publisher API version (all the other tools, including fastlane, are built on top of that).
From documentation:
You can only use this API to make changes to an existing app (that has
at least one APK uploaded); thus, you will have to upload at least one
APK through the Play Console before you can use this API.

Why does my app Size and Current Version "Varies with device" though I only uploaded one APK?

I just uploaded my android app for beta testing for the first time and my friends are able to download it without issue. However I found that in the app page, 'Size' and 'Current Version' shows 'Varies with device' instead of the actual apk size and version..
I've only uploaded only one APK, what gives?
Screenshot below:
If you wish to access my beta testing app page, send me a message with your gmail address in, so I can add you into the beta testing list.
Have you found out the answer yet? Since you have not elected an answer as a correct one, here we go...
Google Play allows you to publish different APKs for your application. Each one targeted to different device configuration. Thus, each APK is an independent version of your application, but they share the same application listing on Google Play and must share the same package name and be signed with the same release key.
Usually Android applications run on most compatible devices with a single APK, by supplying alternative resources for different configurations (e.g., different layouts for different screen sizes) and the Android system selects the appropriate resources for the device at runtime. But in a few cases, however, a single APK is unable to support all device configurations, because alternative resources make the APK file too big (greater than 50MB) or other technical challenges prevent a single APK from working on all devices.
And even though Google doesn't encourage developers to use this "multiple APK" feature, most Google apps use it: Google+, Google Chrome, Gmail, Google Maps, Google Search, Google Play Books, Google Play Movies & TV, Google Translate.
I hope I was helpful.
Check the Artifacts library section of Release Management in Google Play developer console, you should have just one active artifact for the your app release.
My app was on closed track and the latest release wasn't showing until I removed the draft APKs in "Artifact library" and uninstalled the app from all closed test devices.

Categories

Resources