Migrating Apps to Android Q

Android Q introduces new features and APIs that you can take advantage of in your apps, as well as new behavior changes. The best way to make sure that your app is ready when your users download the latest version of Android is to take certain migration steps and test the existing functionality of your app when running on Android Q.

This document gives you an overview of the steps to migrate your apps to Android Q across two key phases:

  1. Ensure basic compatibility with Android Q.
  2. Verify that your existing app is fully functional on the new version of the platform. At this stage, you do not use new APIs or change your app's targetSdkVersion, but minor changes might be necessary.
  3. Set up the SDK by targeting the new platform and compiling with the Android Q SDK.
  4. Verify that your app continues to function as expected.
  5. Begin using new Android Q features and APIs.

Prepare a device running Android Q

If you have a Google Pixel, Pixel 2, or Pixel 3 device, visit the Android Beta for Pixel site and enroll your device to receive Android Q Beta over the air.

You can also get the Android Q system image for your device on the downloads page. After you have the appropriate system image, read the general instructions for how to flash a system image onto your device.

You can also download the Preview system image for the Android Emulator. It's listed in the SDK Manager as a Google Play Intel x86 Atom System Image.

Ensure compatibility with Android Q

It’s important to test the functionality of your existing app against Android Q to ensure that you maintain a great experience for users who update to the latest version of Android. Because some platform changes can affect the way your app behaves, some adjustments might be necessary, but you should not need to use new APIs or change your targetSdkVersion.

Perform compatibility testing

For the most part, testing compatibility with Android Q entails the same type of testing you perform when preparing to release your app. This is a good time to review the core app quality guidelines and best practices for testing.

However, there's another aspect to testing: Android Q introduces new user privacy changes to the Android platform that can affect your app's behavior or break the app, even if you do not change your targetSdkVersion. For this reason, it is important that you review the key privacy changes, and test any fixes that you implement to accommodate the changes.

For a more extensive list of behavior changes for all apps running on Android Q, go to the behavior changes page.

Update your target version and use Android Q features

This section explains how to enable full support for Android Q by updating your targetSdkVersion to 'Q' and adding new features available in Android Q.

In addition to offering you new APIs, Android Q introduces some behavior changes when you update your targetSdkVersion to 'Q'. Because some behavior changes might require code changes to avoid breakage, you should first understand how your app might be affected when you change the targetSdkVersion by reviewing all behavior changes for apps targeting Android Q.

Get the Android Q SDK

To get the SDK packages to build your app with Android Q, first make sure you're using the latest Canary version of Android Studio. To learn more, read Set Up the Android Q SDK.

Test your Android Q app

With the above preparations complete, you can build your app and then test it further to make sure it works properly when targeting Android Q. This is another good time to review the core app quality guidelines and best practices for testing.

When you build your app with the targetSdkVersion set to 'Q', there are specific platform changes you should be aware of. Some of these changes, which are described on the Android Q behavior changes page, can significantly affect your app's behavior or even break your app altogether—even if you do not implement new features in Android Q.

After you've tested and confirmed that your app's existing functionality works on Android Q, it's a good time to explore and implement new Android Q features and APIs.