Android Q (Beta 2): everything that developers need to know

12 min read

From a user's perspective, a new version of Android is usually an exciting time. Unless you don't like a particular UI element, it usually means better performance, more stability and a whole host of new functions.

The best Android Q functions you need to know

For developers, an update such as Android Q provides more mixed feelings. These new functions are still good news, making possible more interesting and powerful functions in our apps. At the same time, the changes also represent a lot of work, while we are rushing to ensure that projects not only support the new platform and meet specifications, but are also optimized to provide the best possible experience.

To this end, this message helps you to be informed by sharing all the important changes and developments that we know so far, so that developers can keep this in mind.

This currently includes all new developments up to Beta 2. We will regularly return to this Android Q for developers overview to update it when new features are introduced.

Android Q for developers at a glance – what you really need to know

This is what you really need to know:

  • New location permissions are required.
  • Multi-CV support requires clear changes.
  • Scoped storage will change the way you save and save files.
  • Scanning to the location now requires a FINE location.
  • Information such as IMEI is now limited.
  • Background apps can no longer perform foreground activities.
  • Although not strictly related to Android Q, new specifications for app icons are being introduced.
  • Similarly, developers will be forced later this year to at least support Android Pie. Warnings appear in apps if they don't meet.
  • And all apps must deliver 64-bit versions by the end of the year.

Here are some great new features that you might be interested in:

  • Multi-resume provides more powerful multitasking.
  • You can test changes in the emulator via the Android 3.5 Canary release channel.
  • Developers now have access to more data from depth sensors.
  • High performance Wi-Fi modes and low latency available.
  • MicrophoneDIrection API lets you choose the direction of the microphone during recording.
  • Bubbles ensure easier multitasking and extensive notifications.
  • More support for media codecs.
  • Sharing shortcuts makes it easier to share media from apps.
  • Quick settings give easy access to settings related to the current app.
  • Vulkan support becomes hard push.
  • More neural network operations.
  • Improvements in the Android runtime help your apps eat faster (in theory).

For more information about all these things and more minor changes, keep reading. We will now also see how you can test your app on Android Q.

Location permissions see improved security options

Every new iteration from Android brings new features that are designed to offer users a safer and more personal experience. This time they get more control over location information. Previously, users could provide wholesale or deny access to location data. This time they can select a third option to only deliver that data while the app is in use – when it is running in the foreground.

This hopefully means that users will not refuse to fully install an app because they do not want it to be "viewed", although the wording used for the background location permission may be somewhat unpleasant:

"Allow the app to access the location of this device always?"


Whatever you think, it means that you have to make a few changes. Specifically, developers who focus on Q should add the following line to their app manifest: android.permission.ACCESS_BACKGROUND_LOCATION.

If you have an older app, Android will add this permission by default alongside ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION.

More information about setting this is available here at Google.

Scoped storage changes the way you open external files

Although we are talking about privacy, users can also manage access to shared files in the Photos & Video, Video & # 39; s and Audio folders with new runtime rights that replace READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE. Access to the Downloads folder is also only available through the system file selection, giving users total control over which files are made available.

To set this up, you must request new permissions, such as READ_MEDIA_IMAGES, and then access the collections via the MediaStore API. You can find the complete instructions here.

To counter this, apps now have their own "isolated storage sandbox" that contains a folder that is limited to that app that is on external storage. This is intended to reduce the need for permissions, while hopefully it is a bit more flexible than the currently available internal storage. You still need to support these files by moving them to the MediaStore collections or by using the Storage Access Framework if you want them to stay after the app is deleted. However, it will inevitably create some obstacles in some unique use cases.

More security changes

A few other security changes to consider:

  • Background apps can no longer start activities in the foreground because this can shock users. Instead, you must use a high-priority notification with a full-screen intention for things like incoming calls.
  • Devices have standardized MAC addresses on different Wi-Fi networks as standard (this was optional in Pie).
  • Access to information such as device IMEI and serial number is now limited. More information here.
  • APIs for scanning networks now need the FINE location permission.
  • Added support for WPA3 and Enhanced Open Wi-Fi standards.
  • It seems that apps will no longer be able to switch Wi-Fi instead of having to rely on the new settings panel.

Future proof – foldable devices, multi-resume and neural networks

Android Q also takes a number of steps to prepare for the future of hardware. You know what that means: foldable! Or, as Google calls them: & # 39; innovative new screens & # 39 ;.

The major developments are improvements to onResume and onPause. These now support & # 39; multi-resume & # 39; and notify the app when it focuses on the focus. Multi-Resume effectively allows two apps to run simultaneously without pausing (as they currently do). This is likely to affect all apps in multi-window mode (not just for those on folding screens), ultimately bringing our phones closer to true desktop-like performance. If you want to see what that looks like now, you can try something similar via the MultiStar app on Samsung (part of Good Lock).

But in addition to multi-resume, Android Q also sees changes in onResume and onPause – perhaps some of the most fundamental changes we've seen for a while.

A render based on a Lenovo patent, on which a folding telephone can be seen.

The customizable attribute for the activity manifest is also being changed to help deal with a regular doubling of the size when the screens are opened.

This is all largely good news for developers who now need to worry less about how to handle their apps that are interrupted but visible. That said, it introduces even more possible use cases and display types for an already highly fragmented platform. Nice nice.

Again, to implement all this, you must make some changes to the manifest and specifically include the tag: android.allow_multiple_resumed_activities. From Beta 2, developers can test this themselves using the foldable emulator via the AVD. You do need a fully updated version of Android Studio 3.5 via the Canary channel and be prepared that it is a buggy.

The Neural Networks API 1.2 also comes with 60 new operations and improved functionality. Ops contain ARGMAX, ARGMIN and Quantized LSTM, which should in principle enable better object detection and image segmentation.

More multitasking with bubbles

As if true multitasking was not enough, Android Q also introduces another way to do more than one thing at a time: bubbles. These bubbles actually act as a form of notification, but offer more information and even show complete activities on top of what the user is currently doing. This offers quick access to things such as notes, translations and chats. Essentially chat heads then.

bubbles actually act as a form of notification

Developers can access the new feature via an API built on top of the current reporting system. To send bubbles, use setBubbleMetadata and then display an activity that appears in the balloon along with an icon. The latter is not yet available in Beta 2, but Google promises to expect more from them in future updates.

Share shortcuts and the settings panel

Google wants to make it easier for users to share content from apps, and therefore it will introduce "Sharing Shortcuts" so that users can jump directly to another app. Developers will be able to publish "partial goals" to start specific activities with the attached content, and these will be shown to users via the user interface. From Beta 2 you can now give an example of the data being shared.

This works in the same way as App shortcuts and is therefore accessible via the ShortcutInfo API. There will also be a new Android library with ShareTarget, which works for devices that are not running Q. Google has shared a sample app for those who want to see how this all works.

Android q quick settings google pixel 2 xl beta program

It seems that making things faster is the name of the game in general, with Android Q also making it easier to change system settings in the context of the app that is currently running. This is available to developers through the settings panel API.

To display the settings panel, you must use an intention such as ACTION_VOLUME with an action for the Settings panel.

Connectivity improvements

The Wi-Fi stack has been reformulated in Android Q to improve privacy and performance and to make things such as managing IoT devices or suggesting internet connections easier without location permission.

More interestingly, developers will be able to access powerful and low latency modes. The latter is especially useful for games (and game streaming!).

You can access it by calling WiFiManager.WiFiLock.creatWifiLock () and using WIFI_MODE_FULL_LOW_LATENCY or WIFI_MODE_FULL_HIGH_PERF.

New media options – codec support and depth data

Nokia 9 PureView

Devs can now take advantage of the depth observation camera & # 39; s. Dynamic depth images can be requested and include a JPG, XMP metadata describing depth collages and a depth reliability map.

This can be useful for camera apps and image editing apps, but it might be more interesting for AR applications. Google works with OEM & # 39; s to ensure that this is available on all Q-supporting devices.

The ultimate front-end development bundle

Android Q also supports the open source video codec AV1, which enables high quality streaming with lower bandwidth requirements. Audio coding via Opus also comes. Via the MediaCodecInfo API it is now also easier to distinguish the display options available on a specific device.

A native MIDI API also enables communication with MIDI devices via the NDK. With the new MicrophoneDirection API, developers can set the direction of the microphone while recording audio. This will also standardize control over zoomable microphones.

Performance upgraded – Vulkan and the Android Runtime

Game developers should benefit from improved support from Vulkan across the board. The stated purpose of Google is to ensure that the API is supported on all 64-bit devices with Android Q. The company is also working on a standard and updating OpenGL driver for devices built on Vulkan. Android Q also adds experimental support for ANGLE – an abstraction layer that should allow games with OpenGL ES to take advantage of Vulkan's performance and stability. OpenGL ES 2.0 is also supported in Q, with support for 3.0 coming shortly thereafter.

Android run-time art enhancements in Android q

You can also expect the overall performance in your apps to improve. This will be achieved in part through improvements to the Android runtime, allowing apps to boot faster and use less memory (although Gary did not find this in his Speed ‚Äč‚ÄčTest G with an older device).

In an effort to improve stability, Google also restricts access to private APIs. You can find a list of the greylists here. Google promises that public alternatives will be available in all cases.

How to try

AVD Android Studio 3.5 foldable emulator

If all of that has led to your imagination (or have made you a little scared), there are a few ways you can give Android Q a twist.

You can load the Android Q Beta on a Pixel device. However, if you happen to have a Pixel lying around – or if you do not want to install a beta operating system on your daily driver – you can instead choose the easier way to set it up when using AVD Manager. Just open the SDK Manager and then you could choose a system image for Android Q Beta to download it.

The only drawback is that if you want to try all the latest features, including the foldables emulator, you need the latest Android Studio 3.5 available through the CANARAR release channel. If you look like me, that probably means first removing a few of your favorite games to make room ….

More instructions here.

Set up Android Q AVD

These are still early days, so more new features are likely to come as Google gets closer to Q for general use. We have seen this during the gradual introduction of Android P. I will certainly keep this post up-to-date so that you can keep checking.

What do you think of these changes? Can you think of new functions that you can bring to your projects? Or do you now have a lot of work to bypass the security updates?


fbq(‘init’, ‘539715236194816’);
fbq(‘track’, “PageView”);

Written by

Don Bradman

Leave a Reply

Your email address will not be published. Required fields are marked *