Tag Archives: Performance

Optimize for Android (Go edition): Lessons from Google apps – Part 1

Posted by Niharika Arora, Developer Relations Engineer

The Android operating system brings the power of computing to everyone. This vision applies to all users, including those on entry-level phones that face real constraints across data, storage, memory, and more.
This was especially important for us to get right because, when we first announced Android (Go edition) back in 2017, people using low-end phones accounted for 57% of all device shipments globally (IDC Mobile Phone Tracker).


What is Android (Go edition)?

Android (Go edition) is a mobile operating system built for entry-level smartphones with less RAM. Android (Go edition) runs lighter and saves data, enabling Original Equipment Manufacturers (OEMs) to build affordable, entry-level devices that empower people with possibility. RAM requirements are listed below, and for full Android (Go edition) device capability specifications, see this page on our site.

Year

2018

2019

2020

2021

2022

2023

Release

Android 8

Android 9

Android 10

Android 11

Android 12

Android 13

Min RAM

512MB

512MB

512MB

1GB

1GB

2GB



Android (Go edition) provides an optimized experience for low-RAM devices. By tailoring the configuration and making key trade-offs, we’re able to improve speed and performance for low-end devices and offer a quality phone experience for more than 250M people around the world.


Recent Updates

We are constantly making phones powered by Android (Go edition) more accessible with additional performance optimizations and features designed specifically for new & novice internet users, like translation, app switching, and data saving.

Below are the recent improvements we made for Android 12:

Faster App Launches

Longer Battery Life 

Easier App Sharing 

More Privacy Control





Why build for Android (Go edition)?

With the fast growing & easily accessible internet, and all the features available at low cost, OEMs and developers are aiming & building their apps specifically for Android (Go edition) devices.

Fast forward to today — over 250 million+ people worldwide actively use an Android (Go edition) phone. And also considering the big OEMs like Jio, Samsung, Oppo, Realme etc. building Android (Go edition) devices, there is a need for developers to build apps that perform well especially on Go devices.

But the markets with the fast growing internet and smartphone penetration can have some challenging issues, such as:
  • Your app is not starting within the required time limit.
  • A lot of features/required capabilities increases your app size 
  • How to handle memory pressure while working on Go apps?


Optimize your apps for Android (Go edition)

To help your app succeed and deliver the best possible experience in developing markets, we have put together some best practices based on experience building our own Google apps Gboard & Camera from Google.


Approach

Define Metrics & breakdowns → Benchmark Metrics → Identify bottlenecks → Optimize bottlenecks → Add regression tests.        ↑_________________________________↓

Phases

Description

DefineBefore starting any optimization effort, it’s important to define the goals. Key Performance Indicators (KPIs) have to be defined for the app.
  • KPIs can be common across different apps and some can be very specific. Some examples of KPIs can be  
KPICategory
App Startup Latency
Common to all apps
App Crash Rate
Common to all apps
End to end latency for CUJ - Camera Shot
Specific to Camera app
App Not Responding RateCommon to all apps
  • Once KPIs are defined the team should agree on the target thresholds. This can be derived from the minimum user experience/benchmarks in mind.
  • KPIs should ideally be defined from the perspective of balancing User Experience and technical complexity.
BreakdownOnce KPIs are defined, the next steps could be to break down a given KPI into individual signal metrics.
  • For example → End to end latency for CUJ (shots in Camera) can be divided into → Frame capture latency, image processing latency, time spent on saving a processed image to disk etc.
  • Similarly, App Crash Rate can be bucketed into → Crash due to unhandled errors, Crash due to high memory usage, Crash due to ANR etc.
BenchmarkBenchmark or measure the KPI values and individual metrics to identify current performance.
If KPI targets are met, things are good. If not → identify the bottlenecks by looking at the individual breakdowns.
Repeat the process


After optimizing a certain bottleneck go back and benchmark the metrics again to see if the KPI targets are met. If not, repeat the process. If yes, great job!
Add Regular regression testThat either runs for every change or in some frequency to identify regressions in KPIs. It is more difficult to debug and find sources of regressions or bugs than to not allow them to get into the codebase. Don’t allow the changes that fail the KPI goals unless the decision is to update the KPI targets.
  • Try to invest in building a regression infrastructure to deal with such issues in early stages.
  • Decide on how often tests should run? What should be the optimal frequency for your app?



Optimize App Memory

GBoard used the onTrimMemory() signal to trim unneeded memory while it goes in the background and there is not enough memory to keep as many background processes running as desired, for example, trimming unneeded memory usage from expressions, search, view cache or openable extensions in background. It helped them reduce the number of times being low memory killed and the average background RSS. Resident Set Size(RSS) is basically the portion of memory occupied by your app process that is held in main memory (RAM). To know more about RSS, please refer here. 
  • Check if malloc can be replaced with mmap when accessing read-only & large files: mmap is only recommended for reading a large file onto memory ('read-only memory mapped file'). The kernel has some special optimizations for read-only memory mapped files, such as unloading unused pages.
Typically this is useful for loading large assets or ML models.
  • Scheduling tasks which require similar resources(CPU, IO, Memory) appropriately: Concurrent scheduling could lead to multiple memory intensive operations to run in parallel and leading to them competing for resources and exceeding the peak memory usage of the app. The Camera from Google app found multiple problems, ensured a cap to peak memory and further optimized their app by appropriately allocating resources, separating tasks into CPU intensive, low latency tasks(tasks that need to be finished fast for Good UX) & IO tasks. Schedule tasks in right thread pools / executors so they can run on resource constrained devices in a balanced fashion.
  • Find & fix memory leaks: Fighting leaks is difficult but there are tools like Android Studio Memory Profiler/Perfetto specifically available to reduce the effort to find and fix memory leaks.
Google apps used the tools to identify and fix memory issues which helped reduce the memory usage/footprint of the app. This reduction allowed other components of the app to run without adding additional memory pressure on the system.

An example from Gboard app is about View leaks
A specific case is caching subviews, like this: 
 

void onKeyboardViewCreated(View keyboardView) {
  this.keyButtonA = keyboardView.findViewById(...);
  ...
}
 

The |keyboardView| might be released at some time, and the |keyButtonA| should be assigned as null appropriately at some time to avoid the view leak.

Lessons learned:
    • Always add framework/library updates after analyzing the changes and verifying its impact early on.
    • Make sure to release memory before assigning new value to a pointer pointing to other object allocation in heap in Java. (native backend java objects) 
For example :
In Java it should be ok to do
 

ClassA obj = new ClassA("x");
// ... something
obj = new ClassB("y");

 
GC should clean this up eventually.
 
if ClassA allocates native resources underneath and doesn't cleanup automatically on finalize(..) and requires caller to call some release(..)  method, it needs to be like this 
 

ClassA obj = new ClassA("x");
// ... something

// Explicit cleanup.
obj.release();

obj = new ClassB("y");

 
else it will leak native heap memory. 
  • Optimize your bitmaps: Large images/drawables usually consume more memory in the app. Google apps identified and optimized large bitmaps that are used in their apps. 
Lessons learned :
    • Prefer Lazy/on-demand initializations of big drawables.
    • Release view when necessary.
    • Avoid using full colored bitmaps when possible. 
For example: Gboard’s glide typing feature needs to show an overlay view with a bitmap of trails, which can only has the alpha channel and apply a color filter for rendering.
 

// Creating the bitmap for trails.

trailBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ALPHA_8);

...

// Setup paint for trails.

trailPaint.setColorFilter(new ColorMatrixColorFilter(new ColorMatrix(new float[] {

  0, 0, 0, 0, (color >> 16) & 0xFF,

  0, 0, 0, 0, (color >> 8) & 0xFF,

  0, 0, 0, 0, color & 0xFF,

  0, 0, 0, 1, 0

})));

...

// onDraw

@Override

protected void onDraw(Canvas canvas) {

  super.onDraw(canvas);

  if (trailBitmap != null) {

    canvas.drawBitmap(trailBitmap, 0, 0, trailPaint);

  }

}

 
A screenshot of glide typing on Gboard
  • Check and only set the alpha channel for the bitmap for complex custom views used in the app. This saved them a couple of MBs (per screen size/density).
  • While using Glide, 
    • The ARGB_8888 format has 4 bytes/pixel consumption while RGB_565 has 2 bytes/pixel. Memory footprint gets reduced to half when RGB_565 format is used but using lower bitmap quality comes with a price too. Whether you need alpha values or not, try to fit your case accordingly.
    • Configure and use cache wisely when using a 3P lib like Glide for image rendering.
  • Try to choose other options for GIFs in your app when building for Android (Go edition) as GIFs take a lot of memory.
  • The aapt tool can optimize the image resources placed in res/drawable/ with lossless compression during the build process. For example, the aapt tool can convert a true-color PNG that does not require more than 256 colors to an 8-bit PNG with a color palette. Doing so results in an image of equal quality but a smaller memory footprint. Read more here.
  • You can reduce PNG file sizes without losing image quality using tools like pngcrush, pngquant, or zopflipng. All of these tools can reduce PNG file size while preserving the perceptive image quality.
  • You could use resizable bitmaps. The Draw 9-patch tool is a WYSIWYG editor included in Android Studio that allows you to create bitmap images that automatically resize to accommodate the contents of the view and the size of the screen. Learn more about the tool here

Recap

This part of the blog outlines why developers should consider building for Android (Go edition), a standard approach to follow while optimizing their apps and some recommendations & learnings from Google apps to improve their app memory and appropriately allocate resources.

In the next part of this blog, we will talk about the best practices on Startup latency, app size and the tools used by Google apps to identify and fix performance issues.

Precise Improvements: How TikTok Enhanced its Video Social Experience on Android

Posted by The Android Developer Relations team

TL;DR


TikTok serves a wide range of user groups. With users around the world, it’s inevitable that some of them experience network issues such as slow, intermittent, or expensive connectivity. Other users are using entry level devices with limited memory and storage. Ensuring an excellent app experience in all these scenarios is paramount. TikTok's team was able to significantly improve their overall performance by following Android’s performance guidance, and employing their deep understanding of development tools such as Android Gradle Plugin and Jetpack libraries. If you want to learn how the TikTok team improved their app experience to achieve better business performance, please read our business article here.

Intro


TikTok is one of the most popular community-driven entertainment platforms with 1 billion people across the globe publishing and browsing video content every day.

A diverse user base naturally means diverse network bandwidth conditions and devices with different screen sizes, available memory and processing power. All users want a smooth, responsive app experience, no matter which device they use. If the app is slow to load, or playback gets stuck, users will feel frustrated and might abandon the app altogether. To avoid issues like these, the TikTok team continuously tracks the overall app performance through ongoing data monitoring, peer benchmarks, and user surveys.

TikTok is constantly introducing new features. But a rapid increase in functionality sometimes leads to an upsurge in technical requirements. The engineering team identified three reasons that slowed down the app : janky frames, video playback lag, and network issues. To solve these issues, the TikTok team looked to Android tools to start their app improvement journey.

From Discovery to Solution


Reducing app startup time, a smoother user experience with reduced jank and better video playback experience were three major goals that the team prioritized. They also discussed how to measure the effects of performance optimization to prevent the occurrence of regression.

1. Faster startup: refactor startup framework

App startup time is one of the metrics in Android Vitals. Making sure the app startup time is no longer than the Android Vital’s recommendation is the best way to ensure the app loads and starts responding to user activity as quickly as possible. The App Startup library is an Android Jetpack library to help developers initialize app components simply and efficiently.

The team studied the App Startup library in depth and refactored the app's startup framework to achieve on-demand loading and meticulous scheduling of components. In order to further reduce the execution time of creating Views on the main thread, the team even used a background thread to load View components asynchronously, thus improving the overall speed of app startup.

TikTok used Simpleperf to analyze the code execution time, and Android Studio's Profiler to monitor the usage of resources such as memory, CPU, and network to optimize I/O, threads, and resource locks.

2. Smoother user interface

To ensure a smoother user interface, the team needed to tackle two challenges: 1) simplify the View hierarchy, so that the app only renders what is necessary on screen, and 2) reduce the number of task executions in each frame so that the app can have a steady frame rate.

The TikTok team used the Layout Inspector in Android Studio to pinpoint the unnecessary layout contents. The layout boundaries of each View are clearly visible in the inspector, so the team can easily simplify the View hierarchy of the interface and reduce excessive and unnecessary content drawing.

In many cases, TikTok used doFrame() to perform frame-by-frame tasks. Trying to fit too much work in a single frame will inevitably cause a jank. TikTok's approach was to use allocation algorithms to distribute tasks into different frames to ensure that the application has a steady frame rate.

3. Better video playback experience: reuse resources

TikTok users can create audio and video content in various ways, and different codecs are used to play different types of content. Android provides the MediaCodec class to help access the underlying codec. To further improve the speed of video playback, it is good practice to provide different media player instances for different codecs. The TikTok team created a pool of media player instances throughout the application to neatly provide for various media contents. They even run each media player instance in different threads to minimize interference between one another

Network connection speed is another contributor to video lag . The team tested different solutions, including optimizing connections and reusing sockets, and developed algorithms to dynamically adjust buffer length when streaming content to reduce lag during playback.

They also used on-device video super-resolution to generate high-resolution frames based on low-resolution video content, further improving the quality of video playback without increasing network pressure.

Preloading (loading the next video ahead of time) and pre-rendering (rendering the first frame of the video ahead of time) are critical components to ensure that users have a smooth experience when playing multiple videos in succession. TikTok drew a Surface in advance only adding it into the screen when it is actually needed, to reduce the pressure of drawing it on the spot.

4. Avoid regressions

The team continues to maintain a detailed understanding of performance and works to fine-tune elements when necessary. Luckily, Android has tools in place for this exact purpose, like Systrace to capture traces so developers can export system activities (including CPU scheduling, disk activities, and app threads) for detailed analysis. The team also relies heavily on tools like Perfetto and Android Studio CPU profiler to track the execution time of various events, especially for I/O and class loading.

Better Performance, Better Experience


TikTok creatively leveraged the Android toolchain to track, quantify, and optimize their app’s performance for its business priorities, resulting in improved user experience and an increase in user satisfaction

The app startup time was reduced by 45%, and the smoothness (the chance of the frame rate being lower than the target value) has been optimized by 49%. When playing a video, the first frame of the video appeared 41% faster, and the chance of video lag was reduced by 27%.

Users are now more willing to use TikTok: active days per user in 30 days increased by 1%as did the average of session duration. User surveys and TikTok’s rating in Google Play also show a significant increase in user satisfaction.

The Next Stage for TikTok


By constantly optimizing app performance and adapting to the latest Android 13 platform, TikTok has created a more seamless app experience, encouraging more users to discover, create, and share the content they love.

With more than 250 million active large-screen Android devices globally, the team has also been focusing on large-screen devices, including foldable devices. By adopting the app to large screens, the team has brought a more immersive experience to TikTok users.

To learn more about how TikTok optimized its Android app to improve user experience and business performance, read the article here.

Get Guidance on Performance


To learn how you can get started to inspect, improve and monitor your app's performance visit our developer guide. The fastest way to improve your app's launch speed is by adding a baseline profile to your next release.

Google I/O 2022: What’s new in Jetpack

Posted by Amanda Alexander, Product Manager, Android

Android Jetpack logo on a blue background 

Android Jetpack is a key pillar of Modern Android Development. It is a suite of over 100 libraries, tools and guidance to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices so that you can focus on building unique features for your app.

Most apps in Google Play use Jetpack for app architecture. Today, over 90% of the top 1000 apps use Jetpack.

Here are the highlights of recent updates in Jetpack - an extended version of our What’s New in Jetpack talk for I/O!

Below we’ll cover updates in three major areas of Jetpack:

  1. Architecture Libraries and Guidance
  2. Performance Optimization of Applications
  3. User Interface Libraries and Guidance

And then conclude with some additional key updates.


1. Architecture Libraries and Guidance

App architecture libraries and components ensure that apps are robust, testable, and maintainable.


Data Persistence

Room is the recommended data persistence layer which provides an abstraction layer over SQLite, allowing for increased usability and safety over the platform.


In Room 2.4, support for Kotlin Symbol Processing (KSP) moved to stable. KSP showed a 2x speed improvement over KAPT in our benchmarks of Kotlin code. Room 2.4 also adds built-in support for enums and RxJava3 and fully supports Kotlin 1.6.

Room 2.5 includes the beginning of a full Kotlin rewrite. This change sets the foundation for future Kotlin-related improvements while still being binary compatible with the previous version written in the Java programming language. There is also built-in support for Paging 3.0 via the room-paging artifact which allows Room queries to return PagingSource objects. Additionally, developers can now perform JOIN queries without the need to define additional data structures since Room now supports relational query methods using multimap (nested map and array) return types.

@Query("SELECT * FROM Artist 
    JOIN Song ON Artist.artistName = 
    Song.songArtistName")
fun getArtistToSongs(): Map<Artist, List<Song>>

Relational query methods using multimap return types


Database migrations are now simplified with updates to AutoMigrations, with added support for additional annotations and properties. A new AutoMigration property on the @Database annotation can be used to declare which versions to auto migrate to and from. And when Room needs additional information regarding table and column modifications, the @AutoMigration annotation can be used to specify the inputs.

Database(
  version = MyDb.LATEST_VERSION,
  autoMigrations = {
    @AutoMigration(from = 1, to = 2,
      spec = MyDb.MyMigration.class),
    @AutoMigration(from = 2, to = 3)
  }
)
public abstract class MyDb
    extends RoomDatabase {
  ...

DataStore

The DataStore library is a robust data storage solution that addresses issues with SharedPreferences. To better understand how to use this powerful replacement for many SharedPreferences use cases, you can check out a series of videos and articles in Modern Android Development Skills: DataStore which includes guidance on testing your app’s usage of the library, using it with dependency injection, and migrating from SharedPreference to Proto DataStore.


Incremental Data Fetching

The Paging library allows you to load and display small chunks of data to improve network and system resource consumption. App data can be loaded gradually and gracefully within RecyclerViews or Compose lazy lists.

Paging 3.1 provides stable support for Rx and Guava integrations, which provide Java alternatives to Paging’s native use of Kotlin coroutines. This version also has improved handling of invalidation race conditions with a new return type, LoadResult.Invalid, to represent invalid or stale data. There is also improved handling of no-op loads and operations on empty pages with the new onPagesPresented and addOnPagesUpdatedListener APIs.

To learn more about Paging 3, check out the new, simplified Paging Basics Codelab on the Android Developer site which demonstrates how to integrate the Paging library into an app that shows a list.

GIF showing Paging Basics list 

Defining In Application Navigation Model

The Navigation library is a framework for moving between destinations in an app.

The Navigation component is now integrated into Jetpack Compose via the new navigation-compose artifact which allows for composable functions to be used as destinations in your app.

The Multiple Back Stacks feature has improved to make it easier to remember state. NavigationUI now automatically saves and restores the state of popped destinations, meaning developers can support multiple back stacks without any code changes.

Large screen support was enhanced with the navigation-fragment artifact providing a prebuilt implementation of a two-pane layout in AbstractListDetailFragment. This fragment uses a SlidingPaneLayout to manage a list pane – managed by your subclass – and a detail pane, which uses a NavHostFragment.

All Navigation artifacts have been rewritten in Kotlin and feature improved nullability of classes using generics – such as NavType subclasses.


Opinionated Architecture Guidance

To learn more about how our key architecture libraries work together, you can view a collection of videos and articles covering best practices for modern Android development in a series called Modern Android Development Skills: Architecture.


2. Performance Optimization of Applications

Using performance libraries allows you to build performant apps and identify optimizations to maintain high performance, resulting in better end-user experiences.


Improving Start-up Times

App speed can have a big impact on a user’s experience, particularly when using apps right after installation. To improve that first time experience, we created Baseline Profiles. Baseline Profiles allow apps and libraries to provide the Android run-time with metadata about code path usage, which it uses to prioritize ahead-of-time compilation. This profile data is aggregated across libraries and lands in an app’s APK as a baseline.prof file, which is then used at install time to partially pre-compile the app and its statically-linked library code. This can make your apps load faster and reduce dropped frames the first time a user interacts with an app.

We’ve already started leveraging Baseline Profiles at Google. The Play Store app saw a decrease in initial page rendering time on its search results page of 40% after adopting Baseline Profiles. Baseline profiles have also been added to popular libraries, such as Fragments and Compose, to help provide a better end-user experience. To create your own baseline profile, you need to use the Macrobenchmark library.


Instrumenting Your Application

The Macrobenchmark library helps developers better understand app performance by extending Jetpack’s benchmarking coverage to more complex use-cases, including app startup and integrated UI operations such as scrolling a RecyclerView or running animations. Macrobenchmark can also be used to generate Baseline Profiles.

Macrobenchmark has been updated to increase testing speed and has several new experimental features. It also now supports Custom trace-based timing measurements using TraceSectionMetric, which allows developers to benchmark specific sections of code. Additionally, the AudioUnderrunMetric now enables detection of audio buffer underruns to help understand audible jank.

BaselineProfileRule generates profiles to help with runtime optimizations. BaselineProfileRule works similarly to other macro benchmarks, where you represent user actions as code within lambdas. In the example below, the critical user journey that the compiler should optimize ahead of time is a cold start: opening the app’s landing activity from the launcher.

@ExperimentalBaselineProfilesApi
@RunWith(AndroidJUnit4::class)
class BaselineProfileGenerator {
  @get:Rule
  val baselineProfileRule = BaselineProfileRule()

  @Test
  fun startup() = baselineProfileRule.collectBaselineProfile(
    packageName = "com.example.app"
  ) {
    pressHome()

    // This block defines the app's critical user journey. Here we are
    // interested in optimizing for app startup, but you can also navigate
    // and scroll through your most important UI.
    startActivityAndWait()
  }
}

For more details and a full guide on generating and using baseline profiles with Macrobenchmark, check our guidance on the Android Developers site.

Avoiding UI Stuttering / Jank

The new JankStats library helps you track and analyze performance problems in your app’s UI, including reports on dropped rendering frames – commonly referred to as “jank.” JankStats builds on top of existing Android platform APIs, such as FrameMetrics, but can be used back to API level 16.

The library also offers additional capabilities beyond those built into the platform: heuristics that help pinpoint causes of dropped frames, UI state that provides additional context in reports, and reporting callbacks that can be used to upload data for analysis.

Here’s a closer look at the three major aspects of JankStats:

  1. Identifying Jank: This library uses internal heuristics to determine when jank has occurred, and uses that information to know when to issue jank reports so that developers have information on those problems to help analyze and fix the issues.
  2. Providing UI Context: To make the jank reports more useful and actionable, the library provides a mechanism to help track the current state of the UI and user. This information is provided whenever reports are logged, so that developers can understand not only when problems occurred, but also what the user was doing at the time. This helps to identify problem areas in the application that can then be addressed. Some of this state is provided automatically by various Jetpack libraries, but developers are encouraged to provide their own app-specific state as well.
  3. Reporting Results: On every frame, the JankStats client is notified via a listener with information about that frame, including how long the frame took to complete, whether it was considered jank, and what the UI context was during that frame. Clients are encouraged to aggregate and upload the data as they see fit for analysis that can help debug overall performance problems.

Adding Logging to your App

The Tracing library enables profiling of app performance by writing trace events to the system buffer. Tracing 1.1 supports profiling in non-debug builds back to API level 14, similar to the <profileable> manifest tag which was added in API level 29.


3. User Interface Libraries and Guidance

Several changes have been made to our UI libraries to provide better support for large-screen compatibility, foldables, and emojis.


Jetpack Compose

Jetpack Compose, Android’s modern toolkit for building native UI, has reached 1.2 beta today which has added several features to support more advanced use cases, including support for downloadable fonts, lazy layouts, and nested scrolling interoperability. Check out the What’s New in Jetpack Compose blog post to learn more.


Understanding Window State

The new WindowManager library helps developers adapt their apps to support multi-window environments and new device form factors by providing a common API surface with support back to API level 14.

The initial release targets foldable device use cases, including querying physical properties that affect how content should be displayed.

Jetpack’s SlidingPaneLayout component has been updated to use WindowManager’s smart layout APIs to avoid placing content in occluded areas, such as across a physical hinge.


Drag and Drop

The new DragAndDrop library also helps with new form factors and windowing modes by enabling developers to accept drag-and-drop data – both from inside and outside their app. DrapAndDrop includes a consistent drop target affordance and it supports back to API level 24.

Drag and drop sample GIF 

Backporting New APIs to Older API Levels

The AppCompat library allows access to new APIs on older API versions of the platform, including backports of UI features such as dark mode.

AppCompat 1.4 integrates the Emoji2 library to bring default support for new emoji to all text-based views supported by AppCompat on API level 14 and above.

Custom locale selection is now supported back to API level 14. This feature enables manual persistence of locale settings across app starts, and supports automatic persistence via a service metadata flag. This tells the library to load the locales synchronously and recreate any running Activity as needed. On API level 33 and above, persistence is managed by the platform with no additional overhead.


Other key updates


Annotation

The Annotation library exposes metadata that helps tools and other developers understand your app's code. It provides familiar annotations like @NonNull that pair with lint checks to improve the correctness and usability of your code.

Annotation is migrating to Kotlin, so now developers using Kotlin will see more appropriate annotation targets, including @file.

Several highly-requested annotations have been added with corresponding lint checks. This includes annotations concerning method or function overrides, and the @DeprecatedSinceApi annotation which provides a corollary to @RequiresApi and discourages use beyond a certain API level.


Github

We now have over 100 projects in our GitHub! Several modules are open for developer contributions using the standard GitHub-based workflow:

  • Activity
  • AppCompat
  • Biometric
  • Collection
  • Compose Compiler
  • Compose Runtime
  • Core
  • DataStore
  • Fragment
  • Lifecycle
  • Navigation
  • Paging
  • Room
  • WorkManager

Check the landing page for more information on how we handle pull requests, and to get started building with Jetpack libraries.

This was a brief tour of all the changes in Jetpack over the past few months. For more details on each Jetpack library, check out the AndroidX release notes, quickly find relevant libraries with the API picker and watch the Google I/O talks for additional highlights.

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

Android 12 is live in AOSP!

Posted by Dave Burke, VP of Engineering

Android 12 logo

Today we’re pushing the source to the Android Open Source Project (AOSP) and officially releasing the latest version of Android. Keep an eye out for Android 12 coming to a device near you starting with Pixel in the next few weeks and Samsung Galaxy, OnePlus, Oppo, Realme, Tecno, Vivo, and Xiaomi devices later this year.

As always, thank you for your feedback during Android 12 Beta! More than 225,000 of you tested our early releases on Pixel and devices from our partners, and you sent us nearly 50,000 issue reports to help improve the quality of the release. We also appreciate the many articles, discussions, surveys, and in-person meetings where you voiced your thoughts, as well as the work you’ve done to make your apps compatible in time for today’s release. Your support and contributions are what make Android such a great platform for everyone.

We’ll also be talking about Android 12 in more detail at this year’s Android Dev Summit, coming up on October 27-28. We’ve just released more information on the event, including a snapshot of the technical Android sessions; read on for more details later in the post.

What’s in Android 12 for developers?

Here’s a look at some of what’s new in Android 12 for developers. Make sure to check out the Android 12 developer site for details on all of the new features.

A new UI for Android

Material You - Android 12 introduces a new design language called Material You, helping you to build more personalized, beautiful apps. To bring all of the latest Material Design 3 updates into your apps, try an alpha version of Material Design Components and watch for support for Jetpack Compose coming soon.

image of new UI for Android 12

Redesigned widgets - We refreshed app widgets to make them more useful, beautiful, and discoverable. Try them with new interactive controls, responsive layouts for any device, and dynamic colors to create a personalized but consistent look. More here.

Notification UI updates - We also refreshed notification designs to make them more modern and useful. Android 12 also decorates custom notifications with standard affordances to make them consistent with all other notifications. More here.

Stretch overscroll - To make scrolling your app’s content more smooth, Android 12 adds a new “stretch” overscroll effect to all scrolling containers. It’s a natural scroll-stop indicator that’s common across the system and apps. More here.

App launch splash screens - Android 12 also introduces splash screens for all apps. Apps can customize the splash screen in a number of ways to meet their unique branding needs. More here.

Performance

Faster, more efficient system performance - We reduced the CPU time used by core system services by 22% and the use of big cores by 15%. We’ve also improved app startup times and optimized I/O for faster app loading, and for database queries we’ve improved CursorWindow by as much as 49x for large windows.

Optimized foreground services - To provide a better experience for users, Android 12 prevents apps from starting foreground services while in the background. Apps can use a new expedited job in JobScheduler instead. More here.

More responsive notifications - Android 12’s restriction on notification trampolines helps reduce latency for apps started from a notification. For example, the Google Photos app now launches 34% faster after moving away from notification trampolines. More here.

Performance class - Performance Class is a set of device capabilities that together support demanding use-cases and higher quality content on Android 12 devices. Apps can check for a device’s performance class at runtime and take full advantage of the device’s performance. More here.

Faster machine learning - Android 12 helps you make the most of ML accelerators and always get the best possible performance through the Neural Networks API. ML accelerator drivers are also now updatable outside of platform releases, through Google Play services, so you can take advantage of the latest drivers on any compatible device.

Privacy

image of privacy notification in Android 12

Privacy Dashboard - A new dashboard in Settings gives users better visibility over when your app accesses microphone, camera, and location data. More here.

Approximate location - Users have even more control over their location data, and they can grant your app access to approximate location even if it requests precise location. More here.

Microphone and camera indicators - Indicators in the status bar let users know when your app is using the device camera or microphone. More here.

Microphone and camera toggles - On supported devices, new toggles in Quick Settings make it easy for users to instantly disable app access to the microphone and camera. More here.

Nearby device permissions - Your app can use new permissions to scan for and pair with nearby devices without needing location permission. More here.

Better user experience tools

Rich content insertion - A new unified API lets you receive rich content in your UI from any source: clipboard, keyboard, or drag-and-drop. For back-compatibility, we’ve added the unified API to AndroidX. More here.

Support for rounded screen corners - Many modern devices use screens with rounded corners. To deliver a great UX on these devices, you can use new APIs to query for corner details and then manage your UI elements as needed. More here.

image of phone UI with notification that says hello blurry world

AVIF image support - Android 12 adds platform support for AV1 Image File Format (AVIF). AVIF takes advantage of the intra-frame encoded content from video compression to dramatically improve image quality for the same file size when compared to older image formats, such as JPEG.

Compatible media transcoding - For video, HEVC format offers significant improvements in quality and compression and we recommend that all apps support it. For apps that can’t, the compatible media transcoding feature lets your app request files in AVC and have the system handle the transcoding. More here.

Easier blurs, color filters and other effects - new APIs make it easier to apply common graphics effects to your Views and rendering hierarchies. You can use RenderEffect to apply blurs, color filters, and more to RenderNodes or Views. You can also create a frosted glass effect for your window background using a new Window.setBackgroundBlurRadius() API, or use blurBehindRadius to blur all of the content behind a window.

Enhanced haptic experiences - Android 12 expands the tools you can use to create informative haptic feedback for UI events, immersive and delightful effects for gaming, and attentional haptics for productivity. More here.

New camera effects and sensor capabilities - New vendor extensions let your apps take advantage of the custom camera effects built by device manufacturers—bokeh, HDR, night mode, and others. You can also use new APIs to take full advantage of ultra high-resolution camera sensors that use Quad / Nona Bayer patterns. More here.

Better debugging for native crashes - Android 12 gives you more actionable diagnostic information to make debugging NDK-related crashes easier. Apps can now access detailed crash dump files called tombstones through the App Exit Reasons API.

Android 12 for Games - With Game Mode APIs, you can react to the players' performance profile selection for your game - like better battery life for a long commute, or performance mode to get peak frame rates. Play as you download will allow game assets to be fetched in the background during install, getting your players into gameplay faster.

Get your apps ready for Android 12

Now with today’s public release of Android 12, we’re asking all Android developers to finish your compatibility testing and publish your updates as soon as possible, to give your users a smooth transition to Android 12.

To test your app for compatibility, just install it on a device running Android 12 and work through the app flows looking for any functional or UI issues. Review the Android 12 behavior changes for all apps to focus on areas where your app could be affected. Here are some of the top changes to test:

  • Privacy dashboard — Use this new dashboard in Settings to check your app’s accesses to microphone, location, and other sensitive data, and consider providing details to users on the reasons. More here.
  • Microphone & camera indicators — Android 12 shows an indicator in the status bar when an app is using the camera or microphone. Make sure this doesn’t affect your app’s UI. More here.
  • Microphone & camera toggles — Try using the new toggles in Quick Settings to disable microphone and camera access for apps and ensure that your app handles the change properly. More here.
  • Clipboard read notification — Watch for toast notifications when your app reads data from the clipboard unexpectedly. Remove unintended accesses. More here.
  • Stretch overscroll — Try your scrolling content with the new “stretch” overscroll effect and ensure that it displays as expected. More here.
  • App splash screens — Launch your app from various flows to test the new splash screen animation. If necessary, you can customize it. More here.
  • Keygen changes — Several deprecated BouncyCastle cryptographic algorithms are removed in favor of Conscrypt versions. If your app uses a 512-bit key with AES, you’ll need to use one of the standard sizes supported by Conscrypt. More here.

Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for Android 12 apps and use the compatibility framework to help detect issues quickly.

Tune in to Android Dev Summit to learn about Android 12 and more!

The #AndroidDevSummit is back! Join us October 27-28 to hear about the latest updates in Android development, including Android 12. This year’s theme is excellent apps, across devices; tune in later this month to learn more about the development tools, APIs and technology to help you be more productive and create better apps that run across billions of devices, including tablets, foldables, wearables, and more.

We’ve just released more information on the event, including a snapshot of the 30+ technical Android sessions; you can take a look at some of those sessions here, and start planning which talks you want to check out. Over the coming weeks, we’ll be asking you to share your top #AskAndroid questions, to be answered live by the team during the event.

The show kicks off at 10 AM PT on October 27 with The Android Show, a 50-minute technical keynote where you’ll hear all the latest news and updates for Android developers. You can learn more and sign up for updates here.

Android 12 Beta 5 update, official release is next!

Posted by Dave Burke, VP of Engineering

Android 12 logo

We’re just a few weeks away from the official release of Android 12! As we put the finishing touches on the new version of Android, today we’re bringing you a final Beta update to help you with testing and development. For developers, now is the time to make sure your apps are ready!

You can get Beta 5 today on your Pixel device, including on the Pixel 5a with 5G, by enrolling here for over-the-air updates. If you’re already enrolled, you’ll automatically get the update. You can also try Android 12 Beta 5 on select devices from several of our partners like Sharp. Visit the Android 12 developer site for details.

Watch for more information on the official Android 12 release coming soon!

What’s in Beta 5?

Today’s update includes a release candidate build of Android 12 for Pixel and other devices and the Android Emulator. We reached Platform Stability at Beta 4, so all app-facing surfaces are final, including SDK and NDK APIs, app-facing system behaviors, and restrictions on non-SDK interfaces. With these and the latest fixes and optimizations, Beta 5 gives you everything you need to complete your testing.

timeline

Get your apps ready!

With the official Android 12 release coming next, we’re asking all app and game developers to complete your final compatibility testing and publish your compatibility updates ahead of the final release. For SDK, library, tools, and game engine developers, it’s important to release your compatible updates as soon as possible -- your downstream app and game developers may be blocked until they receive your updates.

To test your app for compatibility, just install it on a device running Android 12 Beta 5 and work through the app flows looking for any functional or UI issues. Review the Android 12 behavior changes for all apps to focus on areas where your app could be affected. Here are some of the top changes to test:

  • Privacy dashboard — A new dashboard in Settings lets users see which apps are accessing which type of data and when. Users can adjust permissions if needed, and they can request details from your app on the reason for access. More here.
  • Microphone & camera indicators — Android 12 shows an indicator in the status bar when an app is using the camera or microphone. More here.
  • Microphone & camera toggles — New toggles in Quick Settings let users instantly disable microphone and camera access for all apps. More here.
  • Clipboard read notification — A toast alerts users when an app reads data from the clipboard unexpectedly. More here.
  • Stretch overscroll — A new “stretch” overscroll effect replaces the previous “glow” overscroll effect systemwide. More here.
  • App splash screens — Android 12 launches apps with a new splash screen animation. More here.
  • Keygen changes — Several deprecated BouncyCastle cryptographic algorithms are removed in favor of Conscrypt versions. If your app uses a 512-bit key with AES, you’ll need to use one of the standard sizes supported by Conscrypt.More here.

Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for Android 12 apps and use the compatibility framework to help detect issues quickly.

Explore the new features and APIs

Android 12 has a ton of new features to help you build great experiences for users. Check out our Android 12 Beta 2 post for a recap and links to Android 12 talks at Google I/O. For complete details on all of the new features and APIs, visit the Android 12 developer site.

Also make sure to try Android Studio Arctic Fox with your Android 12 development and testing. We’ve added lint checks to help you catch where your code might be affected by Android 12 changes, such as for custom declarations of splash screens, coarse location permission for fine location usage, media formats, and high sensor sampling rate permission. You can give these a try by downloading and configuring the latest version of Android Studio.

Get started with Android 12!

Today’s Beta 5 release has everything you need to try the Android 12 features, test your apps, and give us feedback. Just enroll any supported Pixel device to get the update over-the-air. To get started developing, set up the Android 12 SDK.

You can also get Beta 5 on devices from several of our partners like Sharp. For even broader testing, you can try Beta 5 on Android GSI images, and if you don’t have a device, you can test on the Android Emulator. This update is also available for Android TV, so you can check out the latest TV features and test your apps on the all-new Google TV experience.

What’s next?

Stay tuned for the official Android 12 launch coming in the weeks ahead! Until then, feel free to continue sharing your feedback through our hotlists for platform issues, app compatibility issues, and third-party SDK issues.

A huge thank you to our developer community for helping shape the Android 12 release! You’ve given us thousands of bug reports and shared insights that have helped us adjust APIs, improve features, fix significant bugs, and in general make the platform better for users and developers.

We’re looking forward to seeing your apps on Android 12!

Android 12 Beta 4 and Platform Stability

Posted by Dave Burke, VP of Engineering

Android 12 logo

Today we’re bringing you the fourth Beta of Android 12, and moving into the final phase of the release. We’ve built Android 12 with a new UI that adapts to you, performance improvements, privacy and security enhancements, and more. We’re now shifting our focus to polish, performance, and stability. Thanks for all the feedback you’ve shared to help us refine the release and get us to this point.

For developers, Beta 4 takes us to Platform Stability, which means that Android 12’s APIs and all app-facing behaviors are finalized. For apps, the focus is now on compatibility and quality. It’s time to start preparing your compatible app updates in time for the official release later in the year.

You can try Beta 4 today on your Pixel device by enrolling here for over-the-air updates, and if you previously enrolled, you’ll automatically get today’s update. You can also get Android 12 Beta 4 on select devices from several of our partners like ASUS, Oneplus, Oppo, Realme, Sharp, and ZTE - learn more at android.com/beta. Visit the Android 12 developer site for details on how to get started.

Platform Stability

Android 12 Beta 4 has reached Platform Stability, a milestone that means all app-facing surfaces and behaviors are now final in Android 12. This includes not only the official SDK and NDK APIs, but also final app-facing system behaviors and restrictions on non-SDK interfaces that may affect apps. So from Beta 4, you can confidently release your compatibility updates knowing that the platform won’t change. More on the timeline is here.

Android 12 timeline

We’re asking all app and game developers to start your final compatibility testing now and prepare to publish your compatibility updates as soon as possible ahead of the final release.

For all SDK, library, tools, and game engine developers, it’s even more important to start testing now and release your compatible updates as soon as possible -- your downstream app and game developers may be blocked until they receive your updates. When you’ve released a compatible update, be vocal and let developers know!

App compatibility

For Android, App compatibility means that your app runs as intended on a new version of the platform. You can check your app’s compatibility just by installing the production version of your app on a device or emulator and testing it - if the app looks good and runs properly, then you’re done, it’s compatible!

Testing your app for compatibility is important because with each release, we make integral changes to the platform that improve privacy and security and the overall user experience across the OS. These can affect your apps, so you should take a look at the behavior changes and test against them, then publish a compatible update to your users. It’s a basic but critical level of quality that ensures users have a good app experience.

As people update their devices to Android 12, they want to explore the latest version of Android, and experience it with their favorite apps. If those apps don’t work properly, it’s a major issue, ultimately resulting in uninstalls.

So while there are a ton of new APIs and capabilities to explore, start by testing your current app and releasing a compatible update first.

Get your apps ready

To test your app for compatibility with Android 12, just install your production app from Google Play or other source onto a device running Android 12 Beta 4. Work through all of the app’s flows and watch for functional or UI issues. Review the Android 12 behavior changes for all apps to focus your testing. Here are some changes to watch for:

  • Privacy dashboard - A new dashboard in Settings lets users see which apps are accessing which type of data and when. Users can adjust permissions if needed, and they can request details from your app on the reason for access. More here.
  • Microphone & camera indicators - Android 12 shows an indicator in the status bar when an app is using the camera or microphone. More here.
  • Microphone & camera toggles - New toggles in Quick Settings let users instantly disable microphone and camera access for all apps. More here.
  • Clipboard read notification - A toast alerts users when an app reads data from the clipboard unexpectedly. More here.
  • Stretch overscroll - A new “stretch” overscroll effect replaces the previous “glow” overscroll effect systemwide. More here.
  • App splash screens - Android 12 launches apps with a new splash screen animation. More here.
  • Keygen changes - Several deprecated BouncyCastle cryptographic algorithms are removed in favor of Conscrypt versions. If your app uses a 512-bit key with AES, you’ll need to use one of the standard sizes supported by Conscrypt. More here.

Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for Android 12 apps and use the compatibility framework to help you detect issues quickly. Here are some of the changes to test for (these apply when your app’s targetSdkVersion is 31 or higher):

  • Foreground service launch restriction - Apps can no longer launch foreground services from the background. For high-priority background tasks, use expedited jobs in WorkManager instead. More here.
  • Approximate location - When apps request permission for precise location, users can now choose to grant either precise or approximate location. More here.
  • New permission for exact alarms - Apps that want to use exact alarms must request a new normal permission, SCHEDULE_EXACT_ALARM. More here.
  • Modern SameSite cookie behaviors in WebView - If your app uses WebView, test your app with the new SameSite cookie behaviors. More here.
  • Safer exporting of components - your app must explicitly specify an android:exported attribute for any app components that use intent filters. More here.
  • Custom notifications - The system applies a standard notification template to fully custom notifications, with affordances for app name, app icon, and expand/collapse data. More here.
  • Notification trampolines restriction - Notifications can no longer launch your app using a “trampoline” - an intermediary broadcast receiver or service that starts the target Activity. More here.

During testing, also watch for uses of restricted non-SDK interfaces in your app and move those to public SDK equivalents instead. You can read about the restricted APIs here.

Get started with Android 12!

Today’s Beta release has everything you need to try the Android 12 features, test your apps, and give us feedback. Just enroll any supported Pixel device to get the update over-the-air. To get started developing, set up the Android 12 SDK.

You can also get Android 12 Beta 4 on devices from some of our partners like ASUS, OnePlus, Oppo, Realme, Sharp, and ZTE. Visit android.com/beta to see the full list of partners participating in Android 12 Beta. For even broader testing, you can try Android 12 Beta 4 on Android GSI images, and if you don’t have a device, you can test on the Android Emulator.

Beta 4 is also available for Android TV, so you can check out the latest TV features and test your apps on the all-new Google TV experience. Try it out with the ADT-3 developer kit. More here.

Watch for one more Beta coming in the weeks ahead as a release candidate for your final testing.

For complete details on Android 12 Beta, visit the Android 12 developer site.

Android 12 Beta 3 and final APIs

Posted by Dave Burke, VP of Engineering

Android 12 logo

Each month we’re bringing Android 12 closer to its final form, with innovative features, a new UI that adapts to you, performance improvements, privacy enhancements, security benefits, and much more. Many of you are already developing and testing on Android 12 through our Beta program - thank you for all of the feedback you’ve shared so far!

There’s still a lot to do to land this release, though, and today we’re pushing out the third Beta of Android 12 for you to try. Along with updates like scrolling screenshots, privacy indicator APIs, and enhanced auto-rotate, Beta 3 also includes the final Android 12 APIs and the official SDK. WIth these, you can start testing and updating your app ahead of Platform Stability, coming up next at Beta 4. Now is the time to make sure your apps are ready!

You can get Beta 3 today on your Pixel device by enrolling here for over-the-air updates, and if you previously enrolled, you’ll automatically get today’s update. You can also get Android 12 Beta 3 on select devices from several of our device-maker partners like Sharp and TCL - learn more at android.com/beta. Visit the Android 12 developer site for details on how to get started.

What’s new in Beta 3?

Beta 3 includes a number of updates to improve functionality, user experience, and performance. Here are a few highlights.

Scrolling screenshots - To make it easier to capture and share scrolling content, we’re adding scrolling screenshots. Starting in Beta 3, when users capture a screenshot of content that’s scrollable, they’ll now see a “Capture more” button to extend the screenshot to the full content and they can then adjust the crop.

capturing a scrolling screenshot in the Settings app

Capturing a scrolling screenshot in the Settings app

Scrolling screenshots work out-of-the-box for most apps -- if your app uses a standard View-based UI, no changes should be needed. For apps and UI toolkits that are not using View-based UI or that use highly customized UI, we’re introducing a new ScrollCapture API to support scrolling screenshots. With this API, the system notifies your app of scroll capture requests and provides a Surface for you to draw your UI into. We’re continuing to iterate on scrolling screenshots and in Beta 4 you’ll see improvements to the default support, such as for scrolling ListViews. We're also working to provide support for a wider variety of content (such as web content). Let us know what you think!

On-device search - With Beta 3 we’re highlighting platform support for AppSearch, a new high-performance on-device search engine. With AppSearch, apps can index structured data and search over it with built-in full-text search capabilities, and they can use native features like highly-efficient indexing and retrieval, multi-language support, and relevancy ranking.

AppSearch comes in two flavors: a local index for your app to use that’s backward-compatible through a new AppSearch Jetpack library, and a central index that’s maintained for the entire system in Android 12 (and later releases). When you participate in the central index, the system will be able to display your app’s data on System UI surfaces unless you choose to opt out. Additionally, you can securely share data with other apps, allowing them to search your app’s data as well as their own. More here.

Privacy indicator APIs in WindowInsets - In Beta 2 we added support for privacy indicators in the status bar that show when an app is using the device camera or microphone. Since the indicators can be displayed when an app is in immersive mode and could potentially cover controls or content, apps need to know where the indicators can be drawn and make any adjustments needed to prevent useful content from being covered. In Beta 3 we’ve added new privacy indicator APIs to WindowInsets that let you get the maximum bounds of the indicators and their relative placement on the screen, taking into account the current orientation and language settings. More here.

Camera and microphone toggles configurable for enterprises - In Beta 2 we also introduced new toggles that let users instantly turn off access to the device microphone and camera for all apps. We’ve now made these accessible to enterprise administrators who can set any restrictions needed on fully managed devices. More here.

New permission for CDM-paired apps starting foreground services - To better support companion apps carrying out core functionality while providing transparency to the system, apps paired with Companion Device Manager (CDM) can launch foreground services from the background by declaring a new normal permission. More here.

Better, faster auto-rotate - We’ve enhanced Android’s auto-rotate feature with face detection, using the front-facing camera to more accurately recognize when to rotate the screen. This is especially helpful for people who are using their devices while lying down on a couch or in bed, for example. For developers, this means that the auto-rotation behavior will provide a better user experience for users who have opted in through Settings. The enhanced auto-rotate feature lives within our recently announced Private Compute Core, so images are never stored or sent off the device. In Beta 3 this feature is available on Pixel 4 and later Pixel devices.

To make screen rotation as speedy as possible on all devices, we’ve also optimized the animation and redrawing and added an ML-driven gesture-detection algorithm. As a result, the latency for the base auto-rotate feature has been reduced by 25%, and the benefits of the face detection enhancement build on top of those improvements. Give the auto-rotate improvements a try and let us know what you think.

Android 12 for Games - With Game Mode APIs, you can react to the players' performance profile selection for your game - like better battery life for a long commute, or performance mode to get peak frame rates. These APIs will be tied to the upcoming game dashboard which provides an overlay experience with quick access to key utilities during gameplay. The game dashboard will be available on select devices later this year.

play as you download image

Play as you download on Android 12 with Touchgrind BMX

Meanwhile, play as you download will allow game assets to be fetched in the background during install, getting your players into gameplay faster.

Visit the Android 12 developer site to learn more about all of the new features in Android 12.

Final APIs and SDK

Over the past several weeks we've been working to finalize the Android 12 APIs and today we're releasing them with Beta 3, along with the official API Level 31 SDK. We plan to reach full Platform Stability at Beta 4, when all app-facing system behaviors and non-SDK interface restrictions will also be final, in addition to the API surfaces.

If you’re compiling your app against the Android 12 APIs, we recommend using today’s release to update your environment and recompile your apps with the final SDK and latest tools.

App compatibility

With many early-adopter users and developers getting Android 12 Beta on Pixel and other devices, now is the time to make sure your apps are compatible and ready for them to use!

To test your app for compatibility with Beta 3, just install the published version from Google Play or other source onto a device or emulator running Android 12 Beta. Work through all of the app’s flows and watch for functional or UI issues. Review the behavior changes to focus your testing on areas where underlying changes may affect your app. There’s no need to change your app’s targetSdkVersion at this time, so once you’ve resolved any issues, we recommend publishing an update as soon as possible for your Android 12 Beta users.

platform stability

As mentioned earlier, Android 12 will reach Platform Stability in the next release, Beta 4. With Platform Stability, all app-facing system behaviors, SDK/NDK APIs, and non-SDK restrictions will be finalized. At that time, you can begin your final compatibility testing and release a fully compatible version of your app, SDK, or library. More on the Android 12 timeline for developers is here.

Get started with Android 12!

Today’s Beta release has everything you need to try the latest Android 12 features, test your apps, and give us feedback. Just enroll any supported Pixel device to get the update over-the-air. To get started developing, set up the Android 12 SDK.

You can also get Android 12 Beta 3 on devices from some of our top device-maker partners like Sharp and TCL. Visit android.com/beta to see the full list of partners participating in Android 12 Beta. For even broader testing, you can try Android 12 Beta on Android GSI images, and if you don’t have a device you can test on the Android Emulator.

Beta 3 is also available for Android TV, so you can check out the latest TV features and test your apps on the all-new Google TV experience. Try it out with the ADT-3 developer kit. More here.

For complete details on Android 12 Beta, visit the Android 12 developer site.

Google I/O 2019 – What sessions should SEOs and webmasters watch?

Google I/O 2019 is starting tomorrow and will run for 3 days, until Thursday. Google I/O is our yearly developers festival, where product announcements are made, new APIs and frameworks are introduced, and Product Managers present the latest from Google to an audience of 7,000+ developers who fly to California.

However, you don't have to physically attend the event to take advantage of this once-a-year opportunity: many conferences and talks are live streamed on YouTube for anyone to watch. Browse the full schedule of events, including a list of talks that we think will be interesting for webmasters to watch (all talks are in English). All the links shared below will bring you to pages with more details about each talk, and links to watch the sessions will display on the day of each event. All times are Pacific Central time (California time).



This list is only a small part of the agenda that we think is useful to webmasters and SEOs. There are many more sessions that you could find interesting! To learn about those other talks, check out the full list of “web” sessions, design sessions, Cloud sessions, machine learning sessions, and more. Use the filtering function to toggle the sessions on and off.

We hope you can make the time to watch the talks online, and participate in the excitement of I/O ! The videos will also be available on Youtube after the event, in case you can't tune in live.

Posted by Vincent Courson, Search Outreach Specialist

User experience improvements with page speed in mobile search

To help users find the answers to their questions faster, we included page speed as a ranking factor for mobile searches in 2018. Since then, we've observed improvements on many pages across the web. We want to recognize the performance improvements webmasters have made over the past year. A few highlights:

  • For the slowest one-third of traffic, we saw user-centric performance metrics improve by 15% to 20% in 2018. As a comparison, no improvement was seen in 2017.
  • We observed improvements across the whole web ecosystem. On a per country basis, more than 95% of countries had improved speeds.
  • When a page is slow to load, users are more likely to abandon the navigation. Thanks to these speed improvements, we've observed a 20% reduction in abandonment rate for navigations initiated from Search, a metric that site owners can now also measure via the Network Error Logging API available in Chrome.
  • In 2018, developers ran over a billion PageSpeed Insights audits to identify performance optimization opportunities for over 200 million unique urls.

Great work and thank you! We encourage all webmasters to optimize their sites’ user experience. If you're unsure how your pages are performing, the following tools and documents can be useful:

  1. PageSpeed Insights provides page analysis and optimization recommendations.
  2. Google Chrome User Experience Report provides the user experience metrics for how real-world Chrome users experience popular destinations on the web.
  3. Documentation on performance on Web Fundamentals.

For any questions, feel free to drop by our help forums (like the webmaster community) to chat with other experts.


Google I/O 2018 – What sessions should SEOs and Webmasters watch live ?

Google I/O 2018 is starting today in California, to an international audience of 7,000+ developers. It will run until Thursday night. It is our annual developers festival, where product announcements are made, new APIs and frameworks are introduced, and Product Managers present the latest from Google.

However, you don't have to physically attend the event to take advantage of this once-a-year opportunity: many conferences and talks are live streamed on YouTube for anyone to watch. You will find the full-event schedule here.

Dozens upon dozens of talks will take place over the next 3 days. We have hand picked the talks that we think will be the most interesting for webmasters and SEO professionals. Each link shared will bring you to pages with more details about each talk, and you will find out how to tune in to the live stream. All times are California time (PCT). We might add other sessions to this list.


Tuesday, May 8th

3pm - Web Security post Spectre/Meltdown, with Emily Schechter and Chris Palmer - more info.
5pm - Dru Knox and Stephan Somogyi talk about building a seamless web with Chrome - more info.


Wednesday, May 9th

9.30am - Ewa Gasperowicz and Addy Osmani talk about Web Performance and increasing control over the loading experience - more info.
10.30am - Alberto Medina and Thierry Muller will explain how to make a WordPress site progressive - more info.
11.30am - Rob Dodson and Dominic Mazzoni will cover "What's new in web accessibility" - more info.
3.30pm - Michael Bleigh will introduce how to leverage AMP in Firebase for a blazing fast website - more info.
4.30pm - Rick Viscomi and Vinamrata Singal will introduce the latest with Lighthouse and Chrome UX Report for Web Performance - more info.


Thursday, May 10th

8.30am - John Mueller and Tom Greenaway will talk about building Search-friendly JavaScript websites - more info.
9.30am - Build e-commerce sites for the modern web with AMP, PWA, and more, with Adam Greenberg and Rowan Merewood - more info.
12.30pm - Session on "Building a successful web presence with Google Search" by John Mueller and Mariya Moeva - more info.



This list is only a sample of the content at this year's Google I/O, and there might be many more that are interesting to you! To find out about those other talks, check out the full list of web sessions, but also the sessions about Design, the Cloud sessions, the machine learning sessions, and more… 

We hope you can make the time to watch the talks online, and participate in the excitement of I/O ! The videos will also be available on Youtube after the event, in case you can't tune in live.


Posted by Vincent Courson, Search Outreach Specialist, and the Google Webmasters team