• quiQUA

Google I/O 2019 takeaways Chapter II: Build & Release

We talked about the Testing related takeaways from this year’s I/O event in the previous blog. We ended with a promise to follow up with Build and Release related announcements, and here we are. We try to portray a succinct summary of these talks in this chapter. Let’s see them topic by topic :

Customisable delivery and easy sharing of test builds

A plethora of new features were announced with respect to app bundles :

  1. In-app updates: 2 flavours for in-app updates were announced. Immediate and Flexible. With Immediate, the user is given a notification for a new update and on acceptance, Google Play manages the UX and the flow. With Flexible, once the user accepts for the update, the control is returned back to the application and Play notifies the application on update completion. The app has full control over the flow.

  2. Conditional delivery: With this, the developer can specify the conditions under which a feature would be delivered as part of app installation and which feature would be left out. You can set conditional delivery for modules based on 3 factors — Geolocation (country), minSDKVersion and device feature (eg: VR headset support)

  3. On-Demand delivery: You can now install or remove modules on demand. For example, you can now remove the on-boarding flow once the user has been on-boarded to the application. Vice-versa, you can install the on-boarding module if the need be.

  4. Asset delivery for games: Introduction of asset packs. Now you can create multiple asset packs and choose to ship only certain assets with your game. This allows to reduce the size of your app and provide assets on a need basis.

  5. Internal App Sharing : Now you can share app bundles with your test/dev team directly. With Internal App sharing, you can upload your app bundle to Play, which would then generate a shareable link that can be propagated across the team. With this link, you can install the app on your device and perform testing.  This test bundle is served and hosted by Play and is not a part of the release track. The uploader doesn’t have to be a Play console member. The app is signed with a test certificate. A unique version isn’t required. You can give your custom version.

Google Play

Apart from the new features mentioned above, a few other enhancements to Google Play have been made.

  1. In addition to efficiency and modularity, the Android App Bundle also now offers increased security with the launch of app signing key upgrade for new installs. With this feature, you can upgrade the cryptographic strength of your signing key for new installs and their updates on Google Play. Many developers sign their apps with keys generated a long time ago, and this new feature is the only backwards-compatible way to increase their strength.

  2. Core Metrics Refresh: To better understand your churn, including data on returning users, automatic change analysis, metric benchmarking.

  3. Change in average rating calculation: More weight would be given to most recent ratings. This would be available by August.

  4. Auto-suggest for replies to reviews: This is an extension from Gmail’s auto-suggestions.

Features to help your business grow

  1. There would be custom listing by install state under 3 categories — Not installed, Uninstalled, Currently installed. You can target custom messages according to these categories.

  2. Additionally, there will be custom listing pages for Pre-registration and Pre-registration rewards, which let you incentivise players for signing up for notifications prior to the launch.

  3. Early access to a ‘Subscribe and Install’ feature.

Tools to optimise app size and boost installs

  1. Improved uninstall wizard: Smart suggestions based on app size and usage will be provided.

  2. Optimised installs: Play has now reduced new installs size by 10% and up-to 85% for app updates.

  3. Optimised native library (coming soon): Game engines are common among app games. So a base common native library would be provided on which your app specific assets can be added thus reducing apk size.

  4. Peer-to-peer transfers: Quite a few apks get shared via P2P applications among users. However, apk shared over P2P is not authenticated by the play store. New Play API announced which these P2P app developers can integrate. With this, the compatibility for apk shared would be checked.

  5. Data at no cost (coming soon): Ongoing tie-ups with mobile operators to provide access to PlayStore without any data cost incurred.

  6. Update in existing bundle tool: Now you can measure apk download size and the actual size on the device post install by a customisable statistics page in Play console.

  7. Devices with low free storage (coming soon): Metrics for uninstalls on devices due to low free storage. Also, analysis of devices with low storage on which your app is currently installed.

  8. Analysis of app size over time.App size breakdown by its contents.

  9. Suggestions for optimisations for app bundles.

Improving app performance by benchmarking

Jetpack Benchmark Library was introduced. This is our personal favourite. It is currently in alpha stage. It measures code performance and is integrated with Android Studio. It supports Kotlin as well as Java. With Studio 3.5, you can create benchmark modules in your project.

There’s a Gradle plugin for the same. The plugin helps you to pull benchmark reports when you run gradlew. Along with that, there are some Gradle tasks added for CPU clock stability. The test runner has some baked-in tricks to stabilise benchmarks.

There is addition for proguard rules as well. The template supplies pre-configured proguard rules. The idea is to mimic production behaviour and that’s why they bundle these rules along. Keeping that in mind, they are providing detailed logs with apt warnings. Say you run in debug mode. This defeats the purpose of benchmarking as it is expected to work slow in debug mode. Hence the flashy warning in logs which running benchmarking.

The benchmarking module is written to account for ramp-up period as well. In short, benchmark spins loop for minimum 250ms and starts measuring only once the performance of the app stabilises.

The module also has an API to lower the max CPU clock to prevent CPU throttling to prevent inconsistencies due to device OS functioning.

You can watch the complete talk on how to get started with your first benchmark test.

Improving build time execution with Gradle

There were a couple of talks on how to improve your android builds with Gradle. I recommend you to watch the talks for deeper understanding. Here, let’s see the highlights of the talks.

  1. R classes will directly be compiled to class file now. The intermediate Java file will not be generated.

  2. Workers: New API called workers introduced. It allows for safe, parallel and asynchronous execution. You can get the detailed working here.

  3. Faster artifact transform APIs: It is used for dexing and enables caching of pre-dexed libraries.

  4. Lazy task configuration: It helps you to configure only the required tasks at build time.

  5. Incremental Annotations processing: Implementation of the ability to have incremental compilation even when there is annotation processor on class pass. This is supported for Kotlin as well.

  6. Improvement in sync inside studio: Dependency resolution is only done once after you load the project in studio.

  7. Apply changes: This enables you to make small edits and deploy while keeping your app in state. It no longer modifies your apk during builds.

  8. Improved build output window: UI and Parser has been improved to better highlight the cause of your failure.

  9. Build speed attribution (coming soon): The idea is to provide clear information about Gradle plugins and tasks causing the build to slow down.

Well, this is it. We have tried to cover all test and release related talks. The summary just paints a brief picture and we recommend that you check out each of these talks individually for deeper analysis. You can check out our previous blog to see the Test related announcements.

Despite our best efforts, we might have missed out on some points here and there(the chances of that happening is 1 in 14,000,605). If we did hit that possibility AND you happen to notice it (that would indeed be the mother of all possibilities), let us know in the comments below and we would include the same in the blog.

  • quiqua
  • quiQUA Blog
  • quiquaInfotech
  • quiqua

2019 quiQUA Infotech Private Limited