Author Archives: Android Developers

#WeArePlay | Meet Steven from Indonesia. More stories from around the world.

Posted by Leticia Lago, Developer Marketing

As we bid farewell to 2023, we're excited to unveil our last #WeArePlay blog post of the year. From Lisbon to Dubai, let’s meet the creators behind the game-changing apps supporting communities, bringing innovation and joy to people.



We’re starting off in Indonesia, where Steven remembers his pocket money quickly running out while traveling around rural areas of Indonesia with his parents. Struck by how much more expensive food items were in the villages compared to Jakarta, he was inspired to create Super, providing more affordable goods outside the capital. The app allows shop owners to buy items stored locally and supply them to their communities at lower prices. It's helped boost the hyperlocal supply chain and raise living standards for rural populations. Steven is keen to point out that “it’s not just about entrepreneurship”, but “social impact”. He hopes to take Super even further and improve economic distribution across the whole of rural Indonesia.


ALT TEXT

Next, we’re crossing the Java Sea to Singapore, where twin brothers – and marathon runners – Jeromy and Kenny decided to turn their passion for self-care into a journaling app. On Journey, people can log their daily thoughts and work towards their mental health and self-improvement goals using prompts. With the guidance of coaches, they can practice gratitude, record their ambitions, and learn about mindfulness and building self-confidence. “People tell us it helps them find time to invest in themselves and dedicate space to self-care”, says Jeromy. In the future, the pair want to bring in additional coaches to support even more people to achieve their wellness goals.


ALT TEXT

Now we’re landing in the Middle East where former kindergarten friends Chris and Rene decided to use their experience being expats in Dubai to create a platform for connecting disparate communities across the city. On Hayi حي, locals can share information with their neighbors, find help within the community and connect with those living nearby. “Community is at the heart of everything we do and our goal is to have a positive effect”, says Chris. They’re currently working on creating groups for art and sport enthusiasts to encourage residents to bond over their interests. The pair are also dedicated to sustainability and plan on launching environmental projects, such as wide-scale city clean-ups.


ALT TEXT

And finally, we’re off to Europe where Lisbon-based university chums Rita, João and Martim saw unexpected success. Initially, the trio created a recipe-sharing platform, SaveCook. When they launched its accompaniment, Super Save, however, which compared prices of recipe ingredients across different supermarkets, it exploded in popularity. With rising inflation, people were hugely thankful to the founders “for providing a major service” at such a crucial time. Next, they’re working on a barcode scanner that tells shoppers where they can buy cheaper versions of products “to help people save as much as they can.”

Discover more founder stories from across the globe in the #WeArePlay collection.



How useful did you find this blog post?

Leverage Gemini in your Android apps

Posted by Dave Burke, VP of Engineering

Last week we unveiled our most capable foundation model, Gemini. Gemini is multimodal – it can accept both text and image inputs. We introduced a way for Android developers to leverage our smallest model Gemini Nano, on-device. This is available on select devices through AICore, a system service that handles model management, runtimes, safety features and more, simplifying the work for developers. And today, we're introducing new ways for Android developers to access the Gemini Pro model – which runs off-device, in Google's data centers.

App development with Gemini Pro

Gemini Pro is accessible via the Gemini API, and it’s our best model for scaling across a wide range of text and image reasoning tasks. To simplify integrating Gemini Pro, you can use the Google AI SDK, a client SDK for Android. This SDK enables direct integration from Android apps and removes the need for developers to build and manage their own backend infrastructure, reducing development costs and improving velocity.

Google AI Studio provides a streamlined way for developers to integrate the Gemini Pro model, craft prompts, create API keys, and effortlessly transform ideas into AI apps. Once you have developed your prompt in Google AI Studio, you can simply click on the “Get code” action to generate a Kotlin code snippet, and start integrating Gemini today using the Google AI SDK for Android.

ALT TEXT
Generate Kotlin code for the Gemini API in Google AI Studio

We are also making it easier for developers to use the Gemini API directly in the latest preview version of Android Studio. We’re introducing a new project template for developers to get started with the Google AI SDK for Android right away. You’ll benefit from Android Studio’s enhanced code completion and lint checkers, helping with API keys and security.

ALT TEXT
New Project template for AI in Android Studio

To leverage the new template in Android Studio, start a new project through File > New > New Project and pick the Gemini API starter template. This template provides a pre-configured project with the necessary code to use the Gemini API. After choosing a project name and location, you will be prompted to generate an API key in Google AI Studio, and asked to enter it in Android Studio. Android Studio will automatically set up the project for you with the Gemini API connection, simplifying your workflow.

Alternatively, you can import the generative AI code sample and set it up in Android Studio through File > New > Import Sample, and searching for "Generative AI Sample".

Get started building AI-powered features and Android apps using Gemini Pro.

Faster Rust Toolchains for Android

Posted by Chris Wailes - Senior Software Engineer

The performance, safety, and developer productivity provided by Rust has led to rapid adoption in the Android Platform. Since slower build times are a concern when using Rust, particularly within a massive project like Android, we've worked to ship the fastest version of the Rust toolchain that we can. To do this we leverage multiple forms of profiling and optimization, as well as tuning C/C++, linker, and Rust flags. Much of what I’m about to describe is similar to the build process for the official releases of the Rust toolchain, but tailored for the specific needs of the Android codebase. I hope that this post will be generally informative and, if you are a maintainer of a Rust toolchain, may make your life easier.

Android’s Compilers

While Android is certainly not unique in its need for a performant cross-compiling toolchain this fact, combined with the large number of daily Android build invocations, means that we must carefully balance tradeoffs between the time it takes to build a toolchain, the toolchain’s size, and the produced compiler’s performance.

Our Build Process

To be clear, the optimizations listed below are also present in the versions of rustc that are obtained using rustup. What differentiates the Android toolchain from the official releases, besides the provenance, are the cross-compilation targets available and the codebase used for profiling. All performance numbers listed below are the time it takes to build the Rust components of an Android image and may not be reflective of the speedup when compiling other codebases with our toolchain.

Codegen Units (CGU1)

When Rust compiles a crate it will break it into some number of code generation units. Each independent chunk of code is generated and optimized concurrently and then later re-combined. This approach allows LLVM to process each code generation unit separately and improves compile time but can reduce the performance of the generated code. Some of this performance can be recovered via the use of Link Time Optimization (LTO), but this isn’t guaranteed to achieve the same performance as if the crate were compiled in a single codegen unit.

To expose as many opportunities for optimization as possible and ensure reproducible builds we add the -C codegen-units=1 option to the RUSTFLAGS environment variable. This reduces the size of the toolchain by ~5.5% while increasing performance by ~1.8%.

Be aware that setting this option will slow down the time it takes to build the toolchain by ~2x (measured on our workstations).

GC Sections

Many projects, including the Rust toolchain, have functions, classes, or even entire namespaces that are not needed in certain contexts. The safest and easiest option is to leave these code objects in the final product. This will increase code size and may decrease performance (due to caching and layout issues), but it should never produce a miscompiled or mislinked binary.

It is possible, however, to ask the linker to remove code objects that aren’t transitively referenced from the main()function using the --gc-sections linker argument. The linker can only operate on a section-basis, so, if any object in a section is referenced, the entire section must be retained. This is why it is also common to pass the -ffunction-sections and -fdata-sections options to the compiler or code generation backend. This will ensure that each code object is given an independent section, thus allowing the linker’s garbage collection pass to collect objects individually.

This is one of the first optimizations we implemented and, at the time, it produced significant size savings (on the order of 100s of MiBs). However, most of these gains have been subsumed by those made from setting -C codegen-units=1 when they are used in combination and there is now no difference between the two produced toolchains in size or performance. However, due to the extra overhead, we do not always use CGU1 when building the toolchain. When testing for correctness the final speed of the compiler is less important and, as such, we allow the toolchain to be built with the default number of codegen units. In these situations we still run section GC during linking as it yields some performance and size benefits at a very low cost.

Link-Time Optimization (LTO)

A compiler can only optimize the functions and data it can see. Building a library or executable from independent object files or libraries can speed up compilation but at the cost of optimizations that depend on information that’s only available when the final binary is assembled. Link-Time Optimization gives the compiler another opportunity to analyze and modify the binary during linking.

For the Android Rust toolchain we perform thin LTO on both the C++ code in LLVM and the Rust code that makes up the Rust compiler and tools. Because the IR emitted by our clang might be a different version than the IR emitted by rustc we can’t perform cross-language LTO or statically link against libLLVM. The performance gains from using an LTO optimized shared library are greater than those from using a non-LTO optimized static library however, so we’ve opted to use shared linking.

Using CGU1, GC sections, and LTO produces a speedup of ~7.7% and size improvement of ~5.4% over the baseline. This works out to a speedup of ~6% over the previous stage in the pipeline due solely to LTO.

Profile-Guided Optimization (PGO)

Command line arguments, environment variables, and the contents of files can all influence how a program executes. Some blocks of code might be used frequently while other branches and functions may only be used when an error occurs. By profiling an application as it executes we can collect data on how often these code blocks are executed. This data can then be used to guide optimizations when recompiling the program.

We use instrumented binaries to collect profiles from both building the Rust toolchain itself and from building the Rust components of Android images for x86_64, aarch64, and riscv64. These four profiles are then combined and the toolchain is recompiled with profile-guided optimizations.

As a result, the toolchain achieves a ~19.8% speedup and 5.3% reduction in size over the baseline compiler. This is a 13.2% speedup over the previous stage in the compiler.

BOLT: Binary Optimization and Layout Tool

Even with LTO enabled the linker is still in control of the layout of the final binary. Because it isn’t being guided by any profiling information the linker might accidentally place a function that is frequently called (hot) next to a function that is rarely called (cold). When the hot function is later called all functions on the same memory page will be loaded. The cold functions are now taking up space that could be allocated to other hot functions, thus forcing the additional pages that do contain these functions to be loaded.

BOLT mitigates this problem by using an additional set of layout-focused profiling information to re-organize functions and data. For the purposes of speeding up rustc we profiled libLLVM, libstd, and librustc_driver, which are the compiler’s main dependencies. These libraries are then BOLT optimized using the following options:

--peepholes=all
--data=<path-to-profile>
--reorder-blocks=ext-tsp
–-reorder-functions=hfsort
--split-functions
--split-all-cold
--split-eh
--dyno-stats

Any additional libraries matching lib/*.so are optimized without profiles using only --peepholes=all.

Applying BOLT to our toolchain produces a speedup over the baseline compiler of ~24.7% at a size increase of ~10.9%. This is a speedup of ~6.1% over the PGOed compiler without BOLT.

If you are interested in using BOLT in your own project/build I offer these two bits of advice: 1) you’ll need to emit additional relocation information into your binaries using the -Wl,--emit-relocs linker argument and 2) use the same input library when invoking BOLT to produce the instrumented and the optimized versions.

Conclusion

Graph of normalized size and duration comparison between Toolchain size and Android Rust build time

Optimizations

Speedup vs Baseline
Monolithic 1.8%
Mono + GC Sections

1.9%
Mono + GC + LTO 7.7%
Mono + GC + LTO + PGO 19.8%

Mono + GC + LTO + PGO + BOLT

24.7%

By compiling as a single code generation unit, garbage collecting our data objects, performing both link-time and profile-guided optimizations, and leveraging the BOLT tool we were able to speed up the time it takes to compile the Rust components of Android by 24.8%. For every 50k Android builds per day run in our CI infrastructure we save ~10K hours of serial execution.

Our industry is not one to stand still and there will surely be another tool and another set of profiles in need of collecting in the near future. Until then we’ll continue making incremental improvements in search of additional performance. Happy coding!

KSP2 Preview: Kotlin K2 and Standalone Source Generator

Posted by Ting-Yuan Huang – Software Engineer, and Jiaxiang Chen – Software Engineer

The Kotlin Symbol Processing (KSP) tool provides a high-level API for doing meta-programming in Kotlin. Many tools have been built on KSP, enabling Kotlin code to be generated at compile time. For example, Jetpack Room uses KSP to generate code for accessing the database, based on an interface provided by the developer, like:

@Dao
interface UserDao {
    @Query("SELECT * FROM user")
    fun getAll(): List<User>
}

KSP provides the API to the Kotlin code so that Room in this case can generate the actual implementation of that interface. While KSP has become a core foundation for meta-programing in Kotlin, its current implementation has some gaps which we are aiming to resolve with a new KSP2 architecture. This blog details those architectural changes and the impact for plugins built on KSP.

In addition, KSP2 has preview support for:

    • The new Kotlin compiler (code-named K2)
    • A new standalone source generator that provides more flexibility and features than the current Kotlin compiler plugin

After getting feedback on the new architecture and continuing to address gaps we will work towards releasing KSP 2.0 where these changes will be the default.

Enabling the KSP2 Preview

The new preview changes can be enabled in KSP 1.0.14 or newer using a flag in gradle.properties:

ksp.useKSP2=true

Note: You might need to enlarge the heap size of the Gradle daemon now that KSP and processors run in the Gradle daemon instead of the Kotlin compiler’s daemon (which has larger default heap size), e.g. org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=1024m

KSP2 and K2

Internally KSP2 uses the Beta Kotlin K2 compiler (which will be the default compiler in Kotlin 2.0). You can use KSP2 before switching your Kotlin compiler to K2 (via the languageVersion setting) but if you want to use K2 for compiling your code, check out: Try the K2 compiler in your Android projects.

Standalone Source Generator

KSP1 is implemented as a Kotlin 1.x compiler plugin. Running KSP requires running the compiler and specifying KSP and its plugin options. In Gradle, KSP’s tasks are customized compilation tasks, which dispatch real work to KotlinCompileDaemon by default. This makes debugging and testing somewhat difficult, because KotlinCompileDaemon runs in its own process, outside of Gradle.

In KSP2, the implementation can be thought of as a library with a main entry point. Build systems and tools can call KSP with this entry point, without setting up the compiler. This makes it very easy to call KSP programmatically and is very useful especially for debugging and testing. With KSP2 you can set breakpoints in KSP processors without having to perform any other / irregular setup tasks to enable debugging.

Everything becomes much easier because KSP2 now controls its lifecycle and can be called as a standalone program or programmatically, like:

val kspConfig = KSPJvmConfig.Builder().apply {
  // All configurations happen here.
}.build()
val exitCode = KotlinSymbolProcessing(kspConfig, listOfProcessors, kspLoggerImpl).execute()

KSP2 API Behavior Changes

With the new implementation, it is also a great opportunity to introduce some refinements in the API behavior so that developers building on KSP will be more productive, have better debuggability and error recovery. For example, when resolving Map<String, NonExistentType>, KSP1 simply returns an error type. In KSP2, Map<String, ErrorType> will be returned instead. Here is a list of the current API behavior changes we plan on making in KSP2:

    1. Resolve implicit type from function call: val error = mutableMapOf<String, NonExistType>()
      KSP1: The whole type will be an error type due to failed type resolution
      KSP2: It will successfully resolve the container type, and for the non-existent type in the type argument, it will correctly report errors on the specific type argument.
    2. Unbounded type parameter
      KSP1: No bounds
      KSP2: An upper bound of Any? is always inserted for consistency
    3. Resolving references to type aliases in function types and annotations
      KSP1: Expanded to the underlying, non-alias type
      KSP2: Not expanded, like uses in other places.
    4. Fully qualified names
      KSP1: Constructors have FQN if the constructor is from source, but not if the constructor is from a library.
      KSP2: Constructors do not have FQN
    5. Type arguments of inner types
      KSP1: Inner types has arguments from outer types
      KSP2: Inner types has no arguments from outer types
    6. Type arguments of star projections
      KSP1: Star projections have type arguments that are expanded to the effective variances according to the declaration sites.
      KSP2: No expansion. Star projections have nulls in their type arguments.
    7. Variance of Java Array
      KSP1: Java Array has a invariant upper bound
      KSP2: Java Array has a covariant upper bound
    8. Enum entries
      KSP1: An enum entry has its own subtype with a supertype of the enum class (incorrect behavior from language point of view)
      KSP2: An enum entry's type is the type of the enclosing enum class
    9. Multi-override scenario

      For example
      interface GrandBaseInterface1 {
          fun foo(): Unit
      }
      
      interface GrandBaseInterface2 {
          fun foo(): Unit
      }
      
      interface BaseInterface1 : GrandBaseInterface1 {
      }
      
      interface BaseInterface2 : GrandBaseInterface2 {
      }
      
      class OverrideOrder1 : BaseInterface1, GrandBaseInterface2 {
          override fun foo() = TODO()
      }
      class OverrideOrder2 : BaseInterface2, GrandBaseInterface1 {
          override fun foo() = TODO()
      }
      

      KSP1:
      Find overridden symbols in BFS order, first super type found on direct super type list that contains overridden symbol is returned For the example, KSP will say OverrideOrder1.foo() overrides GrandBaseInterface2.foo() and OverrideOrder2.foo() overrides GrandBaseInterface1.foo()
      KSP2:
      DFS order, first super type found overridden symbols (with recursive super type look up) in direct super type list is returned.
      For the example, KSP will say OverrideOrder1.foo() overrides GrandBaseInterface1.foo() and OverrideOrder2.foo() overrides GrandBaseInterface2.foo()
    10. Java modifier
      KSP1: Transient/volatile fields are final by default
      KSP2: Transient/volatile fields are open by default
    11. Type annotations
      KSP1: Type annotations on a type argument is only reflected on the type argument symbol
      KSP2: Type annotations on a type argument now present in the resolved type as well
    12. vararg parameters
      KSP1: Considered an Array type
      KSP2: Not considered an Array type
    13. Synthesized members of Enums
      KSP1: values and valueOf are missing if the enum is defined in Kotlin sources
      KSP2: values and valueOf are always present
    14. Synthesized members of data classes
      KSP1: componentN and copy are missing if the data class is defined in Kotlin sources
      KSP2: componentN and copy are always present

New Multiplatform Processing Scheme

When it comes to the processing scheme, i.e. what sources are processed when, the principle of KSP is to be consistent with the build's existing compilation scheme. In other words, what the compiler sees is what processors see, plus the source code that is generated by processors.

What processors see Kotlin compiler see

ClassA.kt, UtilB.kt, InterfaceC.kt ... ClassA.kt, UtilB.kt, InterfaceC.kt ... + GeneratedFromA.kt, ...

In KSP1's current compilation scheme, common / shared source sets are processed and compiled multiple times, with each target. For example, commonMain is processed and compiled 3 times in the following project layout. Being able to process all the sources from dependencies is convenient with one exception: Processors don’t see the sources generated from commonMain when processing jvmMain and jsMain. Everything must be re-processed and that can be inefficient.

Flow diagram illustrating sources generated from jvmMain and jsMain processing to commonMain

tasks

inputs

outputs

kspKotlinCommonMainMetadata

commonMain

generatedCommon

kspKotlinJvm

commonMain, jvmMain

generatedCommonJvm

kspKotlinJs

commonMain, jsMain

generatedCommonJs

compileKotlinCommonMainMetadata

commonaMain, generatedCommon

common.klib

compileKotlinJvm

commonMain, jvmMain, generatedCommonJvm

app.jar

compileKotlinJs

commonMain, jsMain, generatedCommonJs

main.js

In KSP2, we plan to add an experimental mode that tries to align to how source sets are compiled in K2 better. All sources can be processed only once with the available new processing scheme:

tasks

inputs

outputs

Resolvable but not available in 

getAllFiles / 

getSymbolsWithAnnotation

kspKotlinCommonMainMetadata

commonMain

generatedCommon


kspKotlinJvm

jvmMain

generatedJvm

commonMain, generatedCommon

kspKotlinJs

jsMain

generatedJs

commonaMain, generatedCommon

compileKotlinCommonMainMetadata

commonaMain, generatedCommon

common.klib


compileKotlinJvm

commonMain, jvmMain, generatedCommon, generatedJvm

app.jar


compileKotlinJs

commonMain, jsMain, generatedCommon, generatedJs

main.js


Please note that Kotlin 2.0 is still in beta and the compilation model is subject to change. Please let us know how this works for you and give us feedback.

KSP2 Preview Feedback

KSP2 is in preview but there is still more work to be done before a stable release. We hope these new features will ultimately help you be more productive when using KSP! Please provide us with your feedback so we can make these improvements awesome as they progress towards being stable.

A New Foundation for AI on Android

Posted by Dave Burke, VP of Engineering

Foundation Models learn from a diverse range of data sources to produce AI systems capable of adapting to a wide range of tasks, instead of being trained for a single narrow use case. Today, we announced Gemini, our most capable model yet. Gemini was designed for flexibility, so it can run on everything from data centers to mobile devices. It's been optimized for three different sizes: Ultra, Pro and Nano.

Gemini Nano, optimized for mobile

Gemini Nano, our most efficient model built for on-device tasks, runs directly on mobile silicon, opening support for a range of important use cases. Running on-device enables features where the data should not leave the device, such as suggesting replies to messages in an end-to-end encrypted messaging app. It also enables consistent experiences with deterministic latency, so features are always available even when there’s no network.

Gemini Nano is distilled down from the larger Gemini models and specifically optimized to run on mobile silicon accelerators. Gemini Nano enables powerful capabilities such as high quality text summarization, contextual smart replies, and advanced proofreading and grammar correction. For example, the enhanced language understanding of Gemini Nano enables the Pixel 8 Pro to concisely summarize content in the Recorder app, even when the phone’s network connection is offline.

Moving image of Gemini Nano being used in the Recorder app on a Pixel 8 Pro device
Pixel 8 Pro using Gemini Nano in the Recorder app to summarize meeting audio, even without a network connection.

Gemini Nano is starting to power Smart Reply in Gboard on Pixel 8 Pro, ready to be enabled in settings as a developer preview. Available now to try with WhatsApp and coming to more apps next year, the on-device AI model saves you time by suggesting high-quality responses with conversational awareness1.

Moving image of WhatsApp’s use of Smart Reply in Gboard using Gemini Nano on Pixel 8 Pro device
Smart Reply in Gboard within WhatsApp using Gemini Nano on Pixel 8 Pro.

Android AICore, a new system service for on-device foundation models

Android AICore is a new system service in Android 14 that provides easy access to Gemini Nano. AICore handles model management, runtimes, safety features and more, simplifying the work for you to incorporate AI into your apps.

AICore is private by design, following the example of Android’s Private Compute Core with isolation from the network via open-source APIs, providing transparency and auditability. As part of our efforts to build and deploy AI responsibly, we also built dedicated safety features to make it safer and more inclusive for everyone.

AICore architechture
AICore manages model, runtime and safety features.

AICore enables Low Rank Adaptation (LoRA) fine tuning with Gemini Nano. This powerful concept enables app developers to create small LoRA adapters based on their own training data. The LoRA adapter is loaded by AICore, resulting in a powerful large language model fine tuned for the app’s own use-cases.

AICore takes advantage of new ML hardware like the latest Google Tensor TPU and NPUs in flagship Qualcomm Technologies, Samsung S.LSI and MediaTek silicon. AICore and Gemini Nano are rolling out to Pixel 8 Pro, with more devices and silicon partners to be announced in the coming months.

Build with Gemini

We're excited to bring together state-of-the-art AI research with easy-to-use tools and APIs for Android developers to build with Gemini on-device. If you are interested in building apps using Gemini Nano and AICore, please sign up for our Early Access Program.


1 Available globally, only using the United States English keyboard language. Read more for details.

Virtual Machine as a core Android Primitive

Posted by Sandeep Patil – Principal Software Engineer, and Irene Ang – Product Manager

The Android Virtualization Framework (AVF) will be available on upcoming select Android 14 devices. The AVF, first introduced in Android 13 on Pixel devices, provides new capabilities for platform developers working on privileged applications.

With AVF, we are more broadly supporting virtualization to Android. Virtualization is widely used and deployed to isolate workloads and operating systems from each other. It enables efficient scaling of infrastructure, testing environments, legacy software compatibility, creating virtual desktops and much more.

With AVF virtual machines become a core construct of the Android operating system, similar to the way Android utilizes Linux processes. Developers have the flexibility to choose the level of isolation for a virtual machine:

    • One-way isolation: Android (the host) can control and inspect the contents of the VM. These are most commonly used for sandboxing and separation, enabling multiple operating systems to run on the same machine / device, with one operating system host (Android) controlling and watching over all others.
    • Two-way isolation (Isolated VM): Android (the host) and the virtual machine (the guest) are completely isolated from each other. Developers who deal with or store sensitive data may benefit from an isolated virtual machine. An isolated virtual machine has a two-way barrier, where neither the host (Android) nor the VM have access to each other, except via explicitly-agreed-upon communication channels. This has 2 main properties:
  1. The workload and data inside the VM is inaccessible (confidential) from the host (Android).
  2. Even if Android is compromised all the way up to (and including) the host kernel, the isolated VM remains uncompromised.

Benefits of AVF

Isolation

With an isolated VM, developers now have an alternative to Trustzone for use cases that need isolation from Android without escalated privilege.

Portability

Virtual machines and the applications running inside them are far more portable than trusted applets. For example, a Linux-based virtual machine with a Linux-application payload will work on all devices that support AVF. This means that developers can build an application once and deploy it everywhere. VMs also make porting of existing Linux based applications seamless and easy, compared to porting into a Trustzone operating system.

Performance

AVF is designed to be lightweight, efficient and flexible. Virtual machines can:

    • be as small as a single C program and as big as an entire operating system depending on the developer’s need;
    • be persistent or intermittent;
    • grow in memory or shrink depending on the overall system health; and
    • honor Android’s scheduler hints and low-memory warnings.

Extensibility

AVF is designed with developers in mind. Virtual machines can be customized to meet specific use-case needs. Developers can deploy any VM payload as long as it conforms to certain boot and communication protocols specified by AVF.

In addition to bringing the power of virtualization to Android and enabling all the possibilities of virtual desktops, sandboxing, AVF’s use of isolated virtual machines can benefit the following common Android use cases (and many more):

    • Biometrics: By deploying biometric trusted applets in an isolated virtual machine, developers will have the isolation guarantee, access to more compute power for biometric algorithms, easy updatability regardless of the Trustzone operating system, and a more streamlined deployment.
    • DRM: Widevine enables streaming DRM on Android devices. Once deployed in an isolated Virtual Machine, updates to Widevine become much easier across Android devices, regardless of the details of the various Trustzone operating systems being deployed on those devices.

AVF Usage

AVF provides easy APIs to query the device’s ability to create virtual machines and their supported types, and to set up secure communication channels with these virtual machines from applications and services that create them.

For example, to check for the availability of the AVF APIs, and of isolated and regular VM:

VirtualMachineManager manager =
     (VirtualMachineManager)context.
          getSystemService(VirtualMachineManager.class);
if (manager == null) {
    // AVF not supported
} else {
    int capabilities = manager.getCapabilities();
    if ((capabilities & CAPABILITY_PROTECTED_VM) != 0) {
        // protected VM is supported
    }
    if ((capabilities & CAPABILITY_NON_PROTECTED_VM) != 0) {
        // non protected VM is supported
    }
}

Please find additional documentation on AVF and its APIs here.

AVF Components

AVF Component architecture

AVF consists of the framework APIs, the hypervisor, and the Virtual Machine Manager. The hypervisor guarantees virtual machines (including Android) are isolated from each other, much like how the Linux kernel does it for processes. The AVF hypervisor (pKVM), however, does that with a significantly smaller (~50x) code base compared to the Linux kernel.

The Hypervisor (pKVM)

The hypervisor is focused on open source availability, security, device assignment to VMs and security by isolation between virtual machines. It has a small attack surface that meets a higher security assurance level. AVF APIs and features are fully supported by the protected KVM hypervisor (pKVM).

pKVM is built on top of the industry standard Kernel-based Virtual Machine (KVM) in Linux. It means all existing operating systems and workloads that rely on KVM-based virtual machines can work seamlessly on Android devices with pKVM.

Virtual Machine Manager (crosvm)

crosvm, a Rust-based Virtual Machine Manager (VMM), provides the glue between the hypervisor and the AVF framework. It is responsible for creating, managing and destroying virtual machines. In addition, it provides an abstraction layer across multiple hypervisor implementations.

Isolated Virtual Machines

Isolated virtual machines are invisible to Android i.e. any process running in Android cannot inspect, see, tamper with the content of such a virtual machine. This guarantee is provided by the hypervisor.

Virtual Machines

Virtual machines are the same as isolated VMs, except they are accessible to Android processes with the right permissions and privilege.

Microdroid

Microdroid is a trimmed down Android OS package that is created to serve as a template for starting a virtual machine (VM). It provides developers with a familiar environment to build and run their workloads in a VM. Microdroid uses familiar Android tools and libraries, such as Bionic, Binder IPC and keystore support.

Virtualization Service

VirtualizationService manages all guest VMs, isolated or otherwise. It does so, primarily by managing instances of crosvm. It also exposes an AIDL API, which system services or privileged apps can use to start, monitor, and stop VMs.

RpcBinder

RpcBinder is an all-new backend developed for the Android Interface Definition Language (AIDL). RpcBinder enables communication to and from virtual machines using the existing binder wire protocol. This means:

  1. Developers can write interfaces to virtual machines using the language and infrastructure they are already familiar with - AIDL.
  2. Simply continue using existing AIDL interfaces even if the binder endpoint moves into a virtual machine.

What’s new in Android 14?

Android 14, not only makes AVF available on more devices, it also provides a new toolkit to enable building more with AVF and its components:

    • Android System API for AVF 
Privileged applications can now use VMs for executing their critical workload needing isolation; 

    • Hypervisor DevEx toolkit 
Added tracing capability, improved debuggability and monitoring capabilities to provide insights and assist platform developers in developing inside Isolated VMs; 

    • Hypervisor Vendor Modules 
With vendor module extensions, our partners can customize Google’s hypervisor (pKVM) to meet their specific need and differentiate themselves; 

    • System Health Improvements 
With Android 14, a microdroid based VM boots 2 times faster compared to Android 13 while using half the memory.

The rest of the AVF framework makes virtualization easy to use by Android services and apps. For example by abstracting inter-VM communication using AIDL as a transport layer, managing the VM lifecycle or how VMs are created.

Where can you start?

The AVF is only for developers of privileged applications and platform developers. TheAndroid Virtualization Framework overview provides a high level guidance on the detailed components of AVF. If you’re an Android Platform developer, try creating a Virtual Machine today and contact us at android-kvm if you have any questions.

Android Studio Hedgehog is stable

Posted by Sandhya Mohan, Product Manager

Today, we are thrilled to announce the stable release of Android Studio Hedgehog 🦔 : The official IDE for building Android apps!

In this Android Studio release, we have upgraded the IntelliJ platform to 2023.1, with features designed to improve app performance and battery life, make it easier to upgrade applications to the latest Android version, and make it faster to develop using Jetpack Compose. Read on to learn more about how Android Studio Hedgehog can help supercharge your developer productivity.

App performance

Android vitals in App Quality Insights

In addition to helping you investigate crash reports for apps instrumented with the Firebase Crashlytics SDK, App Quality Insights now also includes Android vitals data from Google Play Console. With Android vitals, you can see crash reports for any app you publish to the Google Play Store without requiring additional instrumentation in your app. You can view Android vitals issues, filter them, and see crash insights from Play to quickly understand and resolve the cause of a crash, and jump from stack trace to code all from the App Quality Insights tool window. Learn more.

Note: If you don't have permission to view your app in the Play Console, request that the app admin share read-only access to only app quality information, by clicking Users and permissions > View app quality information (read-only) in the Play Console.

Screengrab of Android Vitals data in App Quality Insights
Android Vitals data in App Quality Insights

Power Profiler

The new Power Profiler shows power consumption on devices. It segments the power consumption information by subsystems called "Power Rails". This helps you visualize the correlation between power consumed and the actions occurring in your app. This approach of directly measuring power consumption differs from the legacy Energy Profiler, which only used a model to estimate energy consumption.

By understanding this information, you can potentially identify and fix power consumption issues in your app by running A/B tests to compare the power consumption of different algorithms, features or even different versions of your app.

Apps which are optimized for lower power consumption lead to an improved battery and thermal performance, eventually leading to an improved end user experience. Power Rails data is available on Pixel 6+ devices running Android 10+.

Example of power consumption in different power rails.
Example of power consumption in different power rails.

Coding productivity

Target Android 14 using Android SDK Upgrade Assistant

The SDK Upgrade Assistant provides a step by step wizard flow to help developers through targetSdkVersion upgrades. It pulls documentation directly into the IDE, saving you time and effort.

Android Studio Hedgehog adds support for upgrading projects to Android 14 (API Level 34). We’ve also added additional relevance filters so that unnecessary steps are removed — and in some cases, the upgrade assistant will pinpoint exactly where in code the changes need to be made.

Screengrab of Android SDK Upgrade Assistant
Android SDK Upgrade Assistant

New UI updates

In the Giraffe release, we launched a new UI for the IDE. This reimagined theme reduces visual complexity and provides easier access to essential features, resulting in a more modern and clean look and feel. We’ve listened to your feedback and, in Hedgehog, we’ve added updates for compact mode, vertical and horizontal splitting, and project tabs for Mac OS. If you have not yet tried the new UI, we encourage you to do so.

Screengrab of Compact mode in the New UI
Compact mode in the New UI

Device mirroring

You can now mirror your physical Android device in the Running Devices window in Android Studio. While mirroring your device's display directly via ADB over USB or Wi-FI to Android Studio, you can execute common actions such as starting and interacting with apps, rotating the screen, folding and unfolding the phone, changing the volume, and more – directly from within Android Studio. Learn more.

Moving image demonstrating device mirroring in the running devices window
Device Mirroring in the Running Devices window

Embedded Layout Inspector

You now have the option to run the Layout Inspector directly in the Running Devices tool window while running your app on an embedded virtual device or mirrored physical device. This opt-in feature significantly improves performance of Layout Inspector, conserves screen real estate, helps organize your UI debugging workflow in a single tool window, and improves speed while inspecting your layout. In embedded mode, you can show a view hierarchy, inspect the properties of each view, navigate to code using “deep inspect” mode, and access other common Layout Inspector features. Enable it through Settings > Experimental > Layout Inspector

Screengrab showing Embedded Layout Inspector
Embedded Layout Inspector

Live Edit updated manual mode shortcut

Live Edit has a new default shortcut for manual mode for: Control+\ (Command+\ for macOS). Manual mode is helpful in situations where you want to have precise control over when updates are deployed to the running application. For more information, see the video clip in Live Edit for Jetpack Compose.

Compose tools

Compose Preview’s Gallery Mode

Gallery mode is a new mode in Compose Preview that lets you focus on one Preview at a time to conserve rendering resources. Use Gallery mode when iterating on UI and switch to other modes (Grid or List) when you need to see UI variants.

Moving image of Compose Preview's Gallery Mode
Compose Preview’s Gallery Mode

Compose State information in Debugger

When setting a breakpoint on a Composable function, the debugger now lists the parameters of the composable and their state, so you can more easily identify what changes might have caused unexpected recompositions.

Screengrab of Compose State information in Debugger
Compose State information in Debugger

Compose Multipreview templates

Android Studio Hedgehog includes support for the latest annotations added by the Compose Multipreview API, allowing developers to render common layout scenarios side-by-side while working with the Compose Preview.

The new annotations added include: @PreviewScreenSizes, @PreviewFontScales, @PreviewLightDark, and @PreviewDynamicColors

Screengrab of Compose Multipreview templates
Compose Multipreview templates

Build tools

New macro to specify JDK path

A new macro, #GRADLE_LOCAL_JAVA_HOME, makes it safer and easier to specify the Java* home path used for the Gradle daemon (background process) execution for your project by referencing your .gradle/config.properties file. This reduces errors related to incompatible Gradle and project JDK versions, since there is now a single source of truth for your Gradle JDK selection.

Starting with Android Studio Hedgehog, new projects will use #GRADLE_LOCAL_JAVA_HOME by default. Existing projects will automatically be migrated to the new macro after a successful sync, unless you're already using a macro like #JAVA_HOME.

[Windows-only] Minimize the impact of antivirus software on build speed

The Build Analyzer informs users if antivirus software may be impacting build performance. This can occur if antivirus software, such as Windows Defender, is performing real-time scanning of directories used by Gradle. Build Analyzer recommends a list of directories to exclude from active scanning, and, if possible, provides a link to add them to the Windows Defender folder exclusion list.

Use Firebase Test Lab devices with Gradle Managed Devices

Gradle Managed Devices can now target Firebase Test Lab devices, and you can utilize it to run your automated tests at scale. Use Gradle Managed Devices to select from a wide range range of both physical and virtual FTL devices, with support for test sharding for accelerated execution time. To use FTL devices, you need Android Gradle Plugin 8.2 with the latest Alpha version of the Firebase Test Lab Gradle plugin. Learn more.

Download Android Studio today!

Now is the time to download Android Studio Hedgehog to incorporate the new features into your workflow. As always, we appreciate any feedback on things you like, issues, or features you would like to see. If you find an issue, please check the known issues and file a bug if needed. Remember to also follow us on X (formerly known as Twitter), Medium, or YouTube for more Android development updates!


*Java is a trademark or registered trademark of Oracle and/or its affiliates.

NordVPN boosted the speed of its login user flow by 60% using Baseline Profiles

Posted by Ben Weiss, Senior Developer Relations Engineer

NordVPN is a virtual private network (VPN) app that protects users while they’re browsing the web by providing them a more secure and private connection. As a network utility, NordVPN’s users deserve a responsive UI, allowing them to set up their protections at a moment’s notice. That's why NordVPN developers recently integrated Baseline Profiles, a profile-guided optimization that helps Android developers improve an app's startup and runtime performance using ahead-of-time compilation.

Improving performance with Baseline profiles

As part of its product roadmap for 2023, the NordVPN team wanted to boost the application’s performance. Before implementing Baseline Profiles, NordVPN’s startup times on Android devices didn’t meet the team’s standards, prompting them to examine new ways to make the app run better.

After exploring ways to improve its runtime performance and streamline the login process for users, NordVPN developers identified an opportunity to make the app faster using Baseline Profiles. Baseline Profiles lets the Android Runtime (ART) know which code paths to optimize through Ahead-of-Time (AOT) compilation before an app launches, boosting speed, stability, and overall responsiveness during startup, when navigating through the app, and while viewing content.

“App speed and stability are essential for a better user experience, so we’re always looking for new ways to improve NordVPN’s performance,” said Himanshu Singh, senior Android engineer at NordVPN. “We wanted to speed up the app’s load time and make launch and navigation faster than ever.”

By applying Baseline Profiles, NordVPN improved its launch speed by an average of 24%. Using tools like Android Vitals, the NordVPN team measured that it had reduced the application’s cold start time from 4.3 seconds to 3.2 seconds, the warm start time from 2.7 seconds to 1.8 seconds, and the hot start time from 1 second to 0.7 seconds.

After implementation, NordVPN developers' also noticed that Baseline Profiles made it faster for users to login to the app, improving the user login flow. The login flow is measured from when a user starts an app to when a user is logged into it. Using the Macrobenchmark library to monitor the improvements, the team observed that the NordVPN app runs its login flow 60% faster than before.

A black quote card featuring a headshot if Ernestas on the right with text in white that reads “The introduction of Baseline Profiles helped us achieve outstanding results, elevating our application’s speed with minimal effort.” — Ernestas Balčiūnas, engineering lead at NordVPN

Integrating and testing Baseline Profiles is easy

The ease of implementing Baseline Profiles impressed NordVPN developers. The available resources, in-depth documentation, and codelabs from Android allowed them to enhance the app’s UX without having to write an extensive amount of code themselves.

Using the Macrobenchmark library, NordVPN developers quickly generated Baseline Profiles for the application. To do this, they used a Gradle managed device, which enabled them to create new profiles without a physical device. Using a Gradle Managed Device also allowed NordVPN developers to create fresh profiles for each app release build on their Continuous Integration platform. Looking forward, NordVPN developers plan to migrate Baseline Profile generation to the official Gradle plugin, which will further automate profile generation.

NordVPN developers combined development workflows to create an integration pipeline, allowing them to test the app under various conditions. Then, the Macrobenchmark library ran Baseline generation tests, pushing the latest Baseline Profiles into the code base.

A black Quote card featuring droid on the right side and a green half oval overlay on the left with white text that reads, 'Applying Baseline Profiles in the NordVPN application led to a 29% improvement to overall in-app speed.'

A quick boost to app quality

After integrating Baseline Profiles into NordVPN’s code, its developers saw immediate speed improvements. The engineering team assessed the app’s overall speed after finishing the project and found that, beyond improving the app’s launch times, applying Baseline Profiles led to a 29% improvement to overall in-app speed.

"We’re constantly working to improve app quality, and Baseline Profiles integration has proven to be one of the most successful steps we’ve taken,” said Šarūnas Rimša, product owner at NordVPN. “We’re helping users access the services they’re entitled to faster. What's not to like?"

Get started

Learn how you can improve your app’s performance using Baseline Profiles.

Notes from Google Play: Celebrating another year of partnership and innovation

Posted by Sam Bright, Vice President & General Manager, Google Play

Hello everyone,

Since joining the team at the start of this year, I’ve been continuously inspired by our incredible community of people building apps and games, and it’s been my privilege to support your hard work and creativity. In particular, it’s been exciting to see you not only identify new user needs, but to develop innovative ways of solving them with your apps and games. This year, our annual Best of Play awards introduced new categories to recognize these achievements, including “Best with AI” and “Best multi-device app and game.”

No matter where you are on your developer journey, whether you just published your first app or already reached a global audience, Google Play is committed to being your partner in growth. Here’s a look back at some of the key tools, features, and programs we built this year to help you reach your full potential and build a successful business on Google Play.

Check out the video below or keep reading for more details about this year’s updates.

New tools and features built in 2023

User growth and engagement:

Monetization:

    • Generate revenue more effectively with the ability to A/B test prices to optimize for local purchasing power at scale.
    • Grow and retain your subscribers with our new subscription capabilities, such as the ability to offer different auto-renewing and prepaid plan prices per billing period.
    • To help you optimize for a global audience, we’ve started automatically updating our min/max price ranges to reflect currency fluctuations against the US dollar. You’ll also see a notification anytime we recommend a price adjustment for your in-app products.
    • We added several popular local payment methods to our extensive library, including PicPay in Brazil and PayPay in Japan, and expanded our support of UPI in India.
    • And with the introduction of our new alternative billing APIs, developers offering an alternative billing system alongside Google Play’s can enjoy a more streamlined experience.

Privacy and security:

Investing in our app and game community

This year, our Indie Games programs helped businesses of all sizes grow on Play. Through our Indie Games Fund, we awarded $2 million and offered hands-on support to 10 Latin American studios to help them grow their games on our platform. And for mentorship from Google and industry experts, early-career indie developers can apply for the Indie Games Accelerator from now until December 12, 2023.

We’re also pushing for greater representation and equity in the developer community by giving $600,000 across 13 nonprofit organizations around the world to support more inclusive programming. For example, we’ve partnered with Global Game Jam and the IGDA Foundation to host a game jam that helps women across Asia and Latin America launch careers in game development.

And finally, we continued our tour of the world by sharing and celebrating your stories through #WeArePlay. This year, we spotlighted over 260 app and game businesses from Europe, Japan, India and more.

Meet Solape & Yomi from Nigeria, founders of financial app HerVest

Looking ahead

I’m excited about the future of Google Play, which will see even more updates and improvements to the work we did this year.

For example, you may have noticed that we gave the Play Store a fresh look this year, with more visual components, new video capabilities, and fluid animations, and introduced new ways for people to discover, engage, and re-engage with your apps and games. In addition to new original editorial content and livestream events, we also developed new ways for users to be rewarded for their play, such as with time-bound offers and promotions.

Next year, we’ll build on that investment, going deeper to provide more value to users — and, in turn, to your businesses. We’re looking to:

    • Continue to improve gaming experiences across platforms,
    • Direct users to the right experiences, within and across apps,
    • Help folks get the most out of their devices, and
    • Make it easier for users and developers to transact when they want to.

As you know, Google Play is more than an app marketplace. We connect people with the experiences they’ll love, wherever they are, on whatever device they’re using. A big part of this is our continued focus on making it easier for people to find your latest, most relevant app and game content. It also means going beyond the Play Store to deliver this content to people across their devices, when and where it's most relevant.

Once again, I want to thank you for all the hard work you’ve put into making Google Play the best place for apps and games. I can’t wait to see what you build next.

On behalf of all of us at Google Play, happy holidays and best wishes for an amazing 2024.

Sam Bright
Vice President and General Manager, Google Play

The latest updates to power your growth on Google Play

Posted by Paul Feng – Vice President of Product Management, Google Play

Our annual Playtime event series kicks off tomorrow, with announcements from our product teams and insights from local Google experts. If you’re not one of the attendees joining us in person this year, here’s a sneak preview of the product news we’ll be sharing to help you grow successful, long-term businesses on Google Play.

Check out our top five updates in the video below, or read on for the full list.

More ways to boost growth and engagement

This year, we improved three of our most impactful offerings: custom store listings, the deep links page in Play Console, and Google Play Games on PC.

Custom store listings enable you to optimize your conversion rate and acquisitions by creating different messaging for different user segments. Many of you have already been using your 50 custom store listings to tailor your messaging by country, pre-registration status, Google Ads campaigns, or to inactive users.

Now, we’re making it even easier to create and manage your listings with the ability to:

    • Save your listings as a draft to continue editing later
    • Schedule your listings to publish when you want and for the duration you choose
    • Test your listings with a portion of your audience before rolling them out

Last year, we launched a new Play Console page dedicated to deep links to help you discover additional opportunities for growth and engagement. This page flags broken deep links and provides detailed guidance on how to fix them, as well as helps you rationalize your web-to-app mapping by reviewing your top website URLs and their deep link status.

This year, we improved the page with new metrics and insights to help you make the most of your deep link strategy. You can now:

    • Make sure the landing pages from your ad campaigns are deep-linked
    • See the percentage of your top-performing URLs that have been deep-linked, so you can see where you have an opportunity to direct more users to your app
    • Find out what percentage of users with your app installed would have the URL open inside the app

ALT TEXT

For game developers, we’ve expanded our Google Play Games on PC beta to help you grow your user base. Since we launched the program last year, we’ve seen a tremendous amount of growth. Google Play Games on PC currently reaches users in more than 120 countries, offering over 3,000 titles including Clash of Clans, Clash Royale, Free Fire MAX, and Angry Birds 2*. Learn more about how Google Play Games on PC has improved the quality of the gaming experience to accelerate your growth.

More ways to reach your monetization goals

To help you more effectively generate revenue from your audiences, we're rolling out new features on our commerce platform to help you optimize your prices, reach more buyers, and better manage user purchases.

At this year's I/O, we launched price experiments for in-app products, allowing you to test price points and optimize for local purchasing power at scale. Next month, you’ll be able to:

    • Save your experiments as drafts to edit later
    • Remove a poorly performing variant during the experiment
    • See warning notifications for potential price configuration issues
    • Apply the ”winning” price to any and all products within the experiment

We’ve also started automatically updating our min/max price ranges to reflect currency fluctuations against the US dollar, and you’ll see a new Play Console Inbox notification anytime we recommend a price adjustment of your in-app products.

We also made several updates to help you better reach a global audience. Now you can more efficiently display available products and offers to users based on regional availability with the new getBillingConfigAsync API, which provides the user’s applicable country for Google Play. Our extensive payment method library now includes popular payment methods PayPay eWallet and cash top-ups at over 14,500 Lawson stores throughout Japan, cash top-ups at over 18,000 7-Eleven stores in Mexico, ShopeePay eWallet in the Philippines, Verve Card in Nigeria, and China UnionPay Card throughout select East Asian and Southeast Asian markets.

Coming soon, real-time developer notifications will expand to include notifications for one-time purchases and voided purchases such as cancellations, revocations, and chargebacks. These will give you more visibility and help you better manage purchases, including making quicker entitlement adjustments and taking action against potential fraud and abuse.

We’re also continuing our commitment to user choice billing, giving you more flexibility and choice when monetizing on Google Play. Developers enrolled in user choice billing can offer an additional billing system alongside Google Play’s in over 35 markets. And now, we’re making the alternative billing APIs available to participating developers with users across these markets. With the APIs integrated, developers can look forward to a more streamlined experience:

    • User choice screens rendered by Google Play: you will no longer need to build and maintain the information and/or choice screens as required by UX guidelines
    • Alternative billing settings in Play Console: manage alternative billing settings for eligible apps, including market enrollment, payment method logo, and more
    • Simplified transaction reporting: removing manual touchpoints
    • Google Play Top Charts: transactions reported via API are reflected on Top Charts
    • Improved reporting: transactions reported via API enable more detailed developer reporting - including exchange rates, associated app package ID, service fee rates, and more
Illustrative example of the user experience for user choice billing

Helping you deliver high-quality experiences

To connect people with experiences they’ll love, we continuously invest in new tools, features, and programs to help you build high-quality apps and games. As a reminder, we measure quality across four key pillars: core value, user experience, technical quality, and privacy and security.

For example, we’re increasing the app bundle size limit from 150MB to 200MB to help you deliver more functionality to improve your core value and user experience. Because Play will continue to deliver only the relevant content, users will only experience your enhanced functionality and not increased app size.

To help you improve your technical quality, we’re excited to announce some new features in Android vitals to help you monitor your title against per-device bad behavior thresholds and effectively manage and debug issues. You can now:

    • Monitor and detect issues with release rollouts using hourly vitals data
    • Analyze longer-term trends in technical performance with 3 years of Android vitals data
    • Prioritize devices by business impact with per-device business metrics like store listing impressions, average rating, and daily active device metrics
    • Get notified via email and Play Console Inbox when your per-device bad behavior threshold exceeds 8%
    • Analyze Android vitals crash event data and potential fixes alongside your code directly within Android Studio via App Quality Insights
    • Grant Play Console teammates limited access to app quality data only


And finally, to help ensure you're delivering the best experience to your users while you’re on the go, check out the recently refreshed Play Console app, where you can:

    • Monitor the metrics you care about
    • View and reply to reviews
    • Monitor and manage your apps across tracks and releases
    • Manage your app’s orders and issue refunds
    • Receive messages from Google Play

Protecting your business with the Play Integrity API

Over the last few years, we’ve continued to invest in the Play Integrity API to ensure that users experience your apps and games the way you intend.

Today, we’re announcing several major updates, including:

    • Low-latency Play Integrity API standard requests are leaving beta and becoming available to all developers, giving you integrity verdicts that are 10X faster
    • A new opt-in Play Protect signal checks whether Play Protect is on or off and whether any known malware is detected
    • A new Play Integrity API report and improved controls in Play Console helps you spot issues and adapt your anti-abuse strategy with an analysis and breakdown of API responses across your install base
    • SDK providers now have the option to set up and manage their Play Integrity API integration using the Google Play SDK Console, giving them control over their quota and letting them customize API responses

We hope you take advantage of all these new features to continue growing your businesses on Google Play. Please continue sharing your feedback so we can build the tools you need to power your growth. Thank you for being part of the Google Play community.


*Google Play Games on PC is available to download in 122 countries as of Nov 15, 2023.
Please see g.co/googleplaygames for more information. Game titles may vary by region.