Introducing new Android Excellence apps and games on Google Play

Kacey Fahey, Developer Marketing, Google Play

Congratulations to the latest apps and games featured in the Android Excellence program on Google Play. As a reminder, these collections are refreshed every three months and recognize apps and games that set the bar for high quality, great user experience, and strong technical performance.

If you’re looking for some new apps, here are a few highlights.

  • Adobe Photoshop Lightroom CC: Capture, edit, and share your photos with the power of Lightroom on your mobile device. Use presets for quick and easy edits, or dive in with the advanced editing tools.
  • Seven – 7 Minute Workout Training Challenge: Use this app to fit seven minute workouts into your busy lifestyle. Grab your phone, or even your Wear OS device to work out anywhere and anytime. Keep it up to earn achievements and join the 7 Club for even more support.
  • SoloLearn: Learn to Code for Free: Learn one of many new coding languages by joining a community of millions. Tap in to the 24/7 peer support, or create your own lessons to become a community influencer.

Here are a few of our favorite new games joining the collection.

  • CodyCross: Crossword Puzzles: Try this game for a fun new style of crossword puzzles. Play for free on adventure mode or subscribe for special themed packs, varying difficulty levels and fresh content added weekly.
  • MARVEL Contest of Champions: Play with your favorite Marvel Super Heroes and Super Villians in iconic locations from the Marvel Universe. Assemble your team of champions to play through the exciting storyline and even build alliances with your friends.
  • Orbital 1: Test your skills in this real-time multiplayer game with beautiful 3D graphics. Collect and upgrade fighters and weapons to build out your perfect squad for quick battles and new daily quests.

See the full list of Android Excellence apps and games.

New Android Excellence apps New Android Excellence games
Adobe Photoshop Lightroom CC

Dashlane

Holstelworld

iCook

Keeper Password Manager

Keepsafe Photo Vault

Mobisystems OfficeSuite

PhotoGrid

Runtastic Results

Seven – 7 Minute Workout Training Challenge

SoloLearn: Learn to Code for Free

Tube Map

WPS Office

Angry Birds 2

Azur Lane アズールレーン

CodyCross

Into the Dead 2

Little Panda Restaurant

MARVEL Contest of Champions

Orbital 1

Rooms of Doom

Sky Dancer Run

Sling Kong

Soul Knight

Explore other great apps and games in the Editors’ Choice section on Google Play and discover best practices to help you build quality apps and games.

How useful did you find this blogpost?

Cryptography Changes in Android P

Posted by Adam Vartanian, Software Engineer

We hope you’re enjoying the first developer preview of Android P. We wanted to specifically call out some backward-incompatible changes we plan to make to the cryptographic capabilities in Android P, which you can see in the developer preview.

Changes to providers

Starting in Android P, we plan to deprecate some functionality from the BC provider that’s duplicated by the AndroidOpenSSL (also known as Conscrypt) provider. This will only affect applications that specify the BC provider explicitly when calling getInstance() methods. To be clear, we aren’t doing this because we are concerned about the security of the implementations from the BC provider, rather because having duplicated functionality imposes additional costs and risks while not providing much benefit.

If you don’t specify a provider in your getInstance() calls, no changes are required.

If you specify the provider by name or by instance—for example, Cipher.getInstance("AES/CBC/PKCS7PADDING", "BC") or Cipher.getInstance("AES/CBC/PKCS7PADDING", Security.getProvider("BC"))—the behavior you get in Android P will depend on what API level your application targets. For apps targeting an API level before P, the call will return the BC implementation and log a warning in the application log. For apps targeting Android P or later, the call will throw NoSuchAlgorithmException.

To resolve this, you should stop specifying a provider and use the default implementation.

In a later Android release, we plan to remove the deprecated functionality from the BC provider entirely. Once removed, any call that requests that functionality from the BC provider (whether by name or instance) will throw NoSuchAlgorithmException.

Removal of the Crypto provider

In a previous post, we announced that the Crypto provider was deprecated beginning in Android Nougat. Since then, any request for the Crypto provider by an application targeting API 23 (Marshmallow) or before would succeed, but requests by applications targeting API 24 (Nougat) or later would fail. In Android P, we plan to remove the Crypto provider entirely. Once removed, any call to SecureRandom.getInstance("SHA1PRNG", "Crypto") will throw NoSuchProviderException. Please ensure your apps have been updated.

Android Developer Story: Big Fish Games uses open beta testing to de-risk their game launch

Posted by Kacey Fahey, Developer Marketing, Google Play

Based in Seattle, Big Fish Games was founded in 2002. Starting as a game studio, they quickly turned into a major publisher and distributor of casual games. Leading up to the launch of their hit time management game, Cooking Craze, the team ran an open beta on Google Play.

Big Fish Games found that using open beta provided more than 10x the amount of user feedback from around the world, and also gave them access to key metrics and Android Vitals in the Play Console. The ability to monitor game performance metrics pre-launch allowed the team to focus on areas of improvement, which lead to a 21% reduction in crash rate. The larger sample size of beta testers also provided more insights on player behavior and helped achieve a +7% improvement in day 1, day 7, and day 30 retention rates.

You can also learn more pre-launch best practices and strategies to improve performance post-launch at our Google Developer Day on Monday, March 19th at GDC. Sign up to stay informed.

How useful did you find this blogpost?

Android Excellence: Congratulations to the newly added apps and games

Posted by Kacey Fahey, Developer Marketing, Google Play

Kicking off the new year, we’re excited to welcome our latest group of Android Excellence apps and games. These awardees represent some of the best experiences and top performing apps and games on the Play Store and can be found with other great selections on the Editors’ Choice page.

If you’re looking for some new apps, below are a few highlights.

  • EyeEm: A great photo editor app with a full suite of filters and tools to make your pictures shine. Learn style tips from their community and even sell your images through the EyeEm marketplace.
  • Musixmatch: Check out Musixmatch’s updated app while learning the lyrics to all your favorite songs. The app is compatible with many of the top music streaming services and you can even follow along with your Android Wear device or on the big screen with Chromecast support.
  • ViewRanger: Plan your next hiking adventure by discovering new routes and trail guides with ViewRanger. Check out the Skyline feature using your phone’s camera to identify over 9 million sites across the world through augmented reality.

Here are a few of our favorite new games joining the collection.

  • Fire Emblem Heroes: Nintendo’s popular strategy-RPG franchise is now reimagined for mobile. Fight battles, develop your heroes’ skills, and try various gameplay modes for hours of exciting gameplay.
  • Lumino City: Explore the charming papercraft style world in this award-winning puzzle adventure game. The beautiful scenery is all handcrafted.
  • Old Man’s Journey: Gorgeous scenery, an immersive soundtrack, and deep emotion help you uncover the old man’s life stories while you solve puzzles and shape the landscape to determine his future.

Congratulations to the newly added Android Excellence apps and games.

New Android Excellence apps New Android Excellence games
1tap

Acorns

Airbnb

Blink Health

Blinkist

Clue

Ditty

EyeEm

Fabulous

IFTTT

iReader

Journey

KKBOX

LinkedIn

Mobills: Budget Planner

Musixmatch

Shpock

Stocard

Video Editor

ViewRanger

YAZIO

YOP

Agent A

Bit Heroes

Bloons Supermonkey 2

Dancing Line

DEAD WARFARE: Zombie

Dragon Project

Fire Emblem Heroes

Futurama: Worlds of Tomorrow

Idle Heroes

Last Day on Earth: Survival

Lords Mobile

Lumino City

Modern Combat Versus

Old Man’s Journey

The Walking Dead No Man’s Land

War Wings

Explore other great apps and games in the Editors’ Choice section on Google Play and discover best practices to help you build quality apps and games for people to love.

How useful did you find this blogpost?

Double Stuffed Security in Android Oreo

Posted by Gian G Spicuzza, Android Security team

Android Oreo is stuffed full of security enhancements. Over the past few months,
we’ve covered how we’ve improved the security of the Android platform and its
applications: from making
it safer to get apps
, dropping insecure
network protocols
, providing more user
control over identifiers
, hardening
the kernel
, making
Android easier to update
, all the way to doubling
the Android Security Rewards payouts
. Now that Oreo is out the door, let’s
take a look at all the goodness inside.

Expanding support for hardware security

Android already supports Verified Boot,
which is designed to prevent devices from booting up with software that has been
tampered with. In Android Oreo, we added a reference implementation for Verified
Boot running with Project
Treble
, called Android Verified Boot 2.0 (AVB). AVB has a couple of cool
features to make updates easier and more secure, such as a common footer format
and rollback protection. Rollback protection is designed to prevent a device to
boot if downgraded to an older OS version, which could be vulnerable to an
exploit. To do this, the devices save the OS version using either special
hardware or by having the Trusted Execution Environment (TEE) sign the data.
Pixel 2 and Pixel 2 XL come with this protection and we recommend all device
manufacturers add this feature to their new devices.

Oreo also includes the new OEM
Lock Hardware Abstraction Layer
(HAL) that gives device manufacturers more
flexibility for how they protect whether a device is locked, unlocked, or
unlockable. For example, the new Pixel phones use this HAL to pass commands to
the bootloader. The bootloader analyzes these commands the next time the device
boots and determines if changes to the locks, which are securely stored in
Replay Protected Memory Block (RPMB), should happen. If your device is stolen,
these safeguards are designed to prevent your device from being reset and to
keep your data secure. This new HAL even supports moving the lock state to
dedicated hardware.

Speaking of hardware, we’ve invested support in tamper-resistant hardware, such
as the security
module
found in every Pixel 2 and Pixel 2 XL. This physical chip prevents
many software and hardware attacks and is also resistant to physical penetration
attacks. The security module prevents deriving the encryption key without the
device’s passcode and limits the rate of unlock attempts, which makes many
attacks infeasible due to time restrictions.

While the new Pixel devices have the special security module, all new GMS devices shipping with Android Oreo
are required to implement key
attestation
. This provides a mechanism for strongly attesting
IDs
such as hardware identifiers.

We added new features for enterprise-managed devices as well. In work profiles,
encryption keys are now ejected from RAM when the profile is off or when your
company’s admin remotely locks the profile. This helps secure enterprise data at
rest.

Platform hardening and process isolation

As part of Project
Treble
, the Android framework was re-architected to make updates easier and
less costly for device manufacturers. This separation of platform and
vendor-code was also designed to improve security. Following the principle of
least privilege
, these HALs run in their own
sandbox
and only have access to the drivers and permissions that are
absolutely necessary.

Continuing with the media
stack hardening
in Android Nougat, most direct hardware access has been
removed from the media frameworks in Oreo resulting in better isolation.
Furthermore, we’ve enabled Control Flow Integrity (CFI) across all media
components. Most vulnerabilities today are exploited by subverting the normal
control flow of an application, instead changing them to perform arbitrary
malicious activities with all the privileges of the exploited application. CFI
is a robust security mechanism that disallows arbitrary changes to the original
control flow graph of a compiled binary, making it significantly harder to
perform such attacks.

In addition to these architecture changes and CFI, Android Oreo comes with a
feast of other tasty platform security enhancements:

  • Seccomp
    filtering
    : makes some unused syscalls unavailable to apps so that
    they can’t be exploited by potentially harmful apps.
  • Hardened
    usercopy
    : A recent survey
    of security bugs
    on Android
    revealed that invalid or missing bounds checking was seen in approximately 45%
    of kernel vulnerabilities. We’ve backported a bounds checking feature to Android
    kernels 3.18 and above, which makes exploitation harder while also helping
    developers spot issues and fix bugs in their code.
  • Privileged Access Never (PAN) emulation: Also backported to
    3.18 kernels and above, this feature prohibits the kernel from accessing user
    space directly and ensures developers utilize the hardened functions to access
    user space.
  • Kernel Address Space Layout Randomization (KASLR):
    Although Android has supported userspace Address Space Layout Randomization
    (ASLR) for years, we’ve backported KASLR to help mitigate vulnerabilities on
    Android kernels 4.4 and newer. KASLR works by randomizing the location where
    kernel code is loaded on each boot, making code reuse attacks probabilistic and
    therefore more difficult to carry out, especially remotely.

App security and device identifier changes

Android
Instant Apps
run in a restricted sandbox which limits permissions and
capabilities such as reading the on-device app list or transmitting cleartext
traffic. Although introduced during the Android Oreo release, Instant Apps
supports devices running Android Lollipop and
later.

In order to handle untrusted content more safely, we’ve isolated
WebView
by splitting the rendering engine into a separate process and
running it within an isolated sandbox that restricts its resources. WebView also
supports Safe Browsing to protect
against potentially dangerous sites.

Lastly, we’ve made significant
changes to device identifiers
to give users more control, including:

  • Moving the static Android ID and Widevine values to an
    app-specific value, which helps limit the use of device-scoped non-resettable
    IDs.
  • In accordance with IETF RFC 7844
    anonymity profile, net.hostname is now empty and the DHCP client no
    longer sends a hostname.
  • For apps that require a device ID, we’ve built a Build.getSerial()
    API
    and protected it behind a permission.
  • Alongside security researchers1, we designed a robust MAC address
    randomization for Wi-Fi scan traffic in various chipsets firmware.

Android Oreo brings in all of these improvements, and many more. As always, we
appreciate feedback and welcome suggestions for how we can improve Android.
Contact us at security@android.com.

_____________________________________________________________________

1: Glenn Wilkinson and team at Sensepost, UK, Célestin Matte, Mathieu Cunche:
University of Lyon, INSA-Lyon, CITI Lab, Inria Privatics, Mathy Vanhoef, KU
Leuven

Improving app security and performance on Google Play for years to come

Posted by Edward Cunningham, Product Manager, Android

[Edit: Updated post on Dec 21 to clarify that when the
64-bit requirement is introduced in August 2019, 32-bit support is not going
away. Apps that include a 32-bit library just need to have a 64-bit version
too.]

Google Play powers billions of app installs and updates annually. We
relentlessly focus on security and performance to ensure everyone has a positive
experience discovering and installing apps and games they love. Today we’re
giving Android developers a heads-up about three changes designed to support
these goals, as well as explaining the reasons for each change, and how they
will help make Android devices even more secure and performant for the long
term.

  • In the second half of 2018, Play will require that new apps and app updates
    target a recent Android API level. This will be required for new apps in
    August 2018, and for updates to existing apps in
    November 2018. This is to ensure apps are built on the latest
    APIs optimized for security and performance.
  • In August 2019, Play will require that new apps and app
    updates with native libraries provide 64-bit versions in addition to their
    32-bit versions.
  • Additionally, in early 2018, Play will start adding a small amount of
    security metadata on top of each APK to further verify app authenticity. You do
    not need to take any action for this change.

We deeply appreciate our developer ecosystem, and so hope this long advance
notice is helpful in planning your app releases. We will continue to provide
reminders and share developer resources as key dates approach to help you
prepare.

Target API level requirement from late 2018

API behavior changes advance the security and privacy protections of Android –
helping developers secure their apps and protecting people from malware. Here
are a few such changes from recent platform versions:

  • Implicit intents for bindService() no longer supported (Android
    5.0
    )
  • Runtime permissions (Android
    6.0
    )
  • User-added CAs not trusted by default for secure connections (Android
    7.0
    )
  • Apps can’t access user accounts without explicit user approval (Android
    8.0
    )

Many of these changes only apply to apps that explicitly declare their support
for new API behaviors, through the targetSdkVersion
manifest attribute. For example, only apps with a targetSdkVersion of 23
(the API level of Android 6.0) or higher give the user full control over what
private data – such as contacts or location – the app can access via runtime
permissions. Similarly, recent releases include user experience improvements
that prevent apps from accidentally overusing resources like battery and memory;
background
execution limits
is a good example of this type of improvement.

In order to provide users with the best Android experience possible, the Google
Play Console will require that apps target a recent API level:

  • August 2018: New apps required to target API level 26
    (Android 8.0) or higher.
  • November 2018: Updates to existing apps required to target
    API level 26 or higher.
  • 2019 onwards: Each year the targetSdkVersion requirement
    will advance. Within one year following each Android dessert release, new apps
    and app updates will need to target the corresponding API level or
    higher.

Existing apps that are not receiving updates are unaffected. Developers remain
free to use a minSdkVersion
of their choice, so there is no change to your ability to build apps for older
Android versions. We encourage developers to provide backwards compatibility as
far as reasonably possible. Future Android versions will also restrict apps that
don’t target a recent API level and adversely impact performance or security. We
want to proactively reduce fragmentation in the app ecosystem and ensure apps
are secure and performant while providing developers with a long window and
plenty of notice in order to plan ahead.

This year we released Android Oreo, the most secure and best performing version
of Android yet, and we introduced Project
Treble
to help the latest releases reach devices faster. Get started
building apps that target Android 8.1 Oreo
today.

64-bit support requirement in 2019

Platform support for 64-bit architectures was introduced in Android 5.0. Today,
over 40% of Android devices coming online have 64-bit support, while still
maintaining 32-bit compatibility. For apps that use native libraries, 64-bit
code typically offers significantly better performance, with additional
registers and new instructions.

In anticipation of future Android devices that support 64-bit code only, the
Play Console will require that new apps and app updates with native libraries
provide 64-bit versions in addition to their 32-bit versions. This can be within
a single APK or as one of the multiple APKs published.

We are not removing 32-bit support. Google Play will continue to support 32-bit
apps and devices. Apps that do not include native code are unaffected.

This change will come into effect in August 2019. We’re providing advance notice
today to allow plenty of time for developers who don’t yet support 64-bit to
plan the transition. Stay tuned for a future post in which we’ll take an
in-depth look at the performance benefits of 64-bit native libraries on Android,
and check out the CPUs and
Architectures
guide of the NDK for more info.

Security metadata in early 2018

Next year we’ll begin adding a small amount of security metadata on top of each
APK to verify that it was officially distributed by Google Play. Often when you
buy a physical product, you’ll find an official label or a badge which signifies
the product’s authenticity. The metadata we’re adding to APKs is like a Play
badge of authenticity for your Android app.

No action is needed by developers or users. We’ll adjust Play’s maximum APK size
to take into account the small metadata addition, which is inserted into the APK Signing Block
and does not alter the functionality of your app. In addition to enhancing the
integrity of Play’s mobile app ecosystem, this metadata will enable new
distribution opportunities for developers in the future and help more people
keep their apps up to date.

Looking ahead

2017 has been a fantastic year for developers who have seen growth and success
on Google Play. We’ve been hard at work on features (including those announced
at I/O
2017
and at Playtime)
to help you improve your app quality and business performance. With these
features and the upcoming updates, we hope to see the Android and Play ecosystem
continue to thrive in 2018 and beyond.

How useful did you find this blogpost?

Welcoming Android 8.1 Oreo and Android Oreo (Go edition)

Posted by Dave Burke, VP of Engineering

At Google
for India
this Monday, we announced the final release of Android 8.1 Oreo.
Android 8.1 Oreo is another exciting step toward bringing to life our vision of
an AI-first mobile platform, for everyone, everywhere.

Android 8.1 introduces support for our new Android Oreo (Go edition) software experience for entry-level
devices. Android Oreo (Go edition) brings the best of Android to the rapidly
growing market for low-memory devices around the world, including your apps and
games.

Android 8.1 also introduces the Neural
Networks API
, a hardware accelerated machine learning runtime to
support ML capabilities in your apps. On supported devices, the Neural Networks
API enables fast and efficient inference for a range of key use cases, starting
with vision-based object classification.

You can get started with Android 8.1 Oreo (API level 27) today. We’re pushing
sources to Android Open Source Project
now, and rolling out the update to supported Pixel and Nexus devices over the
next week. We’re also working with our device maker partners to bring Android
8.1 to more devices, including Android Oreo (Go edition) devices, in the months
ahead.

Android Oreo (Go edition)

As announced at
Google I/O 2017, the “Android Go” project is our initiative to optimize the
Android experience for billions of people coming online around the world.
Starting with Android 8.1, we’re making Android a great platform for entry-level
devices in the Android Oreo (Go edition) configuration:

  • Memory optimizations — Improved memory usage across the
    platform to ensure that apps can run efficiently on devices with 1GB or less
    RAM.
  • Flexible targeting options — New hardware
    feature constants
    to let you target the distribution of your apps to normal
    or low-RAM devices through Google Play.
  • Optimized Google apps: Rebuilt and optimized versions of
    Google apps, using less memory, storage space, and mobile data.
  • Google Play: While all apps will be available on Android
    Oreo (Go edition) devices, Google Play will give visibility to apps specifically
    optimized by developers to provide a great experience for billions of people
    with the building
    for billions guidelines
    .

We’ve updated the building for billions guidelines with
additional guidance on how
to optimize your app for Android Oreo (Go edition) devices
. For most
developers, optimizing your existing APK or using Google Play’s Multiple
APK feature
to target a version of your APK to low-RAM devices is the best
way to prepare for Android Oreo (Go edition) devices. Remember that making
your app lighter
and more efficient benefits your whole audience, regardless
of device.

Neural Networks API

The Neural
Networks API
provides accelerated computation and inference for on-device
machine learning frameworks like TensorFlow Lite — Google’s
cross-platform ML library for mobile — as well as Caffe2 and others. TensorFlow
Lite is now
available to developers
, so visit the TensorFlow
Lite open source repo
for downloads and docs. TensorFlow Lite works with the
Neural Networks API to run models like MobileNets,
Inception v3, and Smart
Reply
efficiently on your mobile device.

Autofill enhancements and more

Android 8.1 includes select new
features and developer APIs
(API level 27), along with the latest
optimizations, bug fixes, and security patches. Extend your app with Autofill
enhancements, a SharedMemory
API, and more. You can also add established Android Oreo features as well, see
the Android
Oreo site
for details.

Test your apps on Android 8.1

If haven’t already, take a few moments today to test your apps and make sure
they offer the experience you want for users upgrading to Android 8.1 Oreo.

Just install your current app from Google Play onto a device or emulator
running Android Oreo and test the user flows. The app should run and look great,
and handle the Android Oreo behavior
changes
properly. In particular, pay attention to background
location limits
, notification
channels
, and changes in networking,
security,
and identifiers.

Speed your development with Android Studio

To build with Android 8.1, we recommend updating to Android
Studio 3.0
, which is now available from the stable
channel
. On top of the new app performance
profiling tools
, support for the Kotlin
programming language
, and Gradle build optimizations, Android Studio 3.0
makes it easier to develop for Android Oreo features like Instant
Apps
, XML
Fonts
, downloadable
fonts
, and adaptive
icons
.

With the final platform we’re updating the SDK and build tools in Android
Studio, as well as the API Level 27 emulator system images. We recommend
updating to the Android
Support Library 27.0.2
, which is available from Google’s
Maven repository
. See the version
notes
for details on what’s new.

As always, we’re providing downloadable factory and OTA images on the Nexus
Images
page to help you do final testing on your Pixel and Nexus devices.

Publish your updates to Google Play

When you’re ready, you can publish your APK updates targeting API level 27 in
your alpha, beta, or production channels. Make sure that your updated app runs
well on Android Oreo as well as older versions. We recommend using beta
testing
to get early feedback from a small group of users and a pre-launch
report
to help you identify any issues, then do a staged
rollout
. Head over to the Android Developers site to find more info on launch
best practices
. We’re looking forward to seeing your app updates!

What’s next for Android Oreo?

We’ll soon be closing the Developer Preview issue tracker, but please keep the
feedback coming! If you still see an issue that you filed in the preview
tracker, just file
a new issue
against Android 8.1 in the AOSP issue tracker. You can also
continue to give us feedback or ask questions in the developer
community
.

Tuning your apps and games for long screen devices

Posted by Fred Chung, Developer Advocate

In recent months, there’s a growing trend for handset makers to ship new devices
with long screen aspect ratio (stretching beyond 16:9), many of which also sport
rounded corners. This attests to the Android ecosystem’s breadth and choice.
Pixel 2 XL and Huawei Mate 10 Pro are just two of many examples. These screen
characteristics could bring a very immersive experience to users and they take
notice of apps and games that don’t take advantage of the long aspect ratio
screen on these new devices. Therefore it is important for developers to
optimize for these screen designs. Let’s have a look at related support
provided by the Android OS.

Optimize for long aspect ratio screens

Most apps using standard UI widgets will likely work out-of-the-box on these devices. Android
documentation
details techniques for flexibly working on multiple screen
sizes. However, some games and apps with custom UIs may run into issues due to
incorrect assumptions on certain aspect ratios. We’re sharing a few typical
issues faced by developers, so you can pay attention to those relevant to you:

  • Certain sides of the screen are cropped. This makes any
    graphic or UI elements in the affected regions look incomplete.
  • Touch targets are offset from UI elements (e.g. buttons).
    Users may be confused on UI elements that are seemingly interactive.
  • For full screen mode on rounded corners devices, any UI elements
    very close to the corners may be outside of the curved corner viewable
    area
    . Imagine if a commerce app’s “Purchase” button was partially
    obstructed? We recommend referencing Material
    Design guidelines
    by leaving 16dp side margins in layouts.

If responsive UI is really not suitable for your situation, as a last
resort
declare an explicit maximum supported aspect ratio as follows. On
devices with a wider aspect ratio, the app will be shown in a compatibility mode
padded with letterbox. Keep in mind that certain device models provide an
override for users to force the app into full-screen compatibility mode, so be
sure to test under these scenarios too!

Targets API level 26 or higher: Use android:maxAspectRatio
attributes.

Targets API level 25 or lower: Use android.max_aspect meta-data.
Note that maximum aspect ratio values will be respected only if your
activities don’t support resizableActivity.
See documentation
for detail.

System letterboxes an app when the declared maximum aspect ratio is smaller
than the device’s screen.

Consider using side-by-side activities

Long aspect ratio devices enable even more multi-window use cases that could
increase user productivity. Beginning in Android 7.0, the platform offers a
standard way for developers to implement multi-window on supported devices as
well as perform data drag and drop between activities. Refer to documentation
for details.

Testing is crucial. If you don’t have access to one of these long screen
devices, be sure to test on the emulator with adequate screen size and
resolution hardware properties, which are explained in the emulator
documentation
.

We know you want to delight your users with long screen devices. With a few
steps, you can ensure your apps and games taking full advantage of these
devices!

Announcing Architecture Components 1.0 Stable

Posted by Lukas Bergstrom, Product Manager, Android Developer Frameworks Team

Android runs on billions of devices, from high-end phones to airplane seatbacks. The Android OS manages resources aggressively to perform well on this huge range of devices, and sometimes that can make building robust apps complicated. To make it easier, we launched a preview of Architecture Components at Google I/O to provide guidance on app architecture, with libraries for common tasks like lifecycle management and data persistence. Together, these foundational components make it possible to write modular apps with less boilerplate code, so developers can focus on innovating instead of reinventing the wheel – and we hope to keep building on this foundation in the future.

Today we’re happy to announce that the Room and Lifecycle Architecture Components libraries have reached 1.0 stable. These APIs are ready for production apps and libraries, and are our recommendation for developers looking for help with app architecture and local storage (although they’re only recommended, not required.) Lifecycles are now also integrated with the Support Library, so you can use them with standard classes like AppCompatActivity.

Although we’re declaring them stable today, the beta components are already used in apps that together, have billions of installs. Top developers, like Zappos, have been able to spend more time on what’s important thanks to Architecture Components:

Prior to the release of Android Architecture Components we had our own ViewModel implementation. We used Loaders and Dependency Injection to persist our ViewModel through config changes. We recently switched to the Architecture Components ViewModel implementation and all that boilerplate went away. We found that we were able to spend more time on design, business logic and testing, and less on writing boilerplate or worrying about Android lifecycle issues.

We’ve also started to use LiveData which hooks directly into the Activity lifecycle. We use it to retrieve and display network data and no longer have to concern ourselves with ​network call subscription management.

– David Henry, Android Software Engineer, Zappos

Architecture Components provide a simple, flexible and practical approach that frees developers from some common problems so they can focus on building great experiences. This is based on core building blocks tied together by guidance on app architecture.

Lifecycles

Every Android developer has to deal with the operating system starting, stopping and destroying their Activities. That means managing the state of components – such as observables used to update UI – as you move through the lifecycle. Lifecycles enables the creation of lifecycle-aware components that manage their own lifecycles, reducing the possibility of leaks or crashes. The Lifecycle library is the foundation for other Architecture Components like LiveData.

LiveData

LiveData is a lifecycle-aware observable that holds data and provides updates. Your UI code subscribes to changes and provides LiveData a reference to its Lifecycle. Because LiveData is lifecycle-aware, it provides updates when its Lifecycle is started or resumed, but stops providing updates when the LifecycleOwner is destroyed. LiveData is a simple way to build reactive UIs that are safer and more performant.

ViewModel

ViewModel separates ownership of view data and logic from lifecycle-bound entities like Activities and Fragments. A ViewModel is retained until its associated Activity or Fragment is disposed of forever – that means view data survives events like a Fragment being recreated due to rotation. ViewModels not only eliminate common lifecycle issues, they help build UIs that are more modular and easier to test.

Room

Nearly all apps need to store data locally. While Android has bundled SQLite with the platform since version 1, using it directly can be painful. Room is a simple object-mapping layer that provides the full power of SQlite with less boilerplate. Features like compile-time query verification and built-in migration make it easier to build a robust persistence layer, while integration with LiveData lets Room provide database-backed, lifecycle-aware observables. Room blends of simplicity, power and robustness for managing local storage, and we hope you give it a try.

Guide to App Architecture and more

Last but not least, we created a Guide to App Architecture that provides core principles applicable to all developers, and specific guidance on using Architecture Components together. Because we’ve heard from you that clear and consistent guidance is important, today we’re updating developer documentation to point to Architecture Components where appropriate. We also have a rich set of videos, codelabs and sample apps available at the Architecture Components site, with more to come.

Watch this space

Although the first set of Architecture Components is now stable, we know there’s more work to do. Over the last few months, we’ve listened to your feedback and made improvements. We also recently launched a new Architecture Component, PagedList, to alpha, in response to your feedback that handling large datasets with RecyclerView is too difficult. This is just the beginning – we have more major components under development that we’re looking to announce in the upcoming months.

Our hope with Architecture Components is to free developers to focus on providing unique new experiences for mobile devices. We’re glad we can finally announce them as stable for production use. We’d like to thank the community, which has given such great feedback along the way, and we look forward to continuing the discussion in the comments of this post. Finally, for those of you who’ve been waiting for this stable launch, get started today.

Android 8.1 Developer Preview

Posted by Dave Burke, VP of Engineering

Today we’re giving you an early look at Android 8.1. This update to Android Oreo includes a set of targeted enhancements including optimizations for Android Go (for devices with 1GB or less of memory) and a new Neural Networks API to accelerate on-device machine intelligence. We’ve also included a few smaller enhancements to Oreo in response to user and developer feedback.

We’re bringing you this Developer Preview so you can get your apps ready; we’ve already been helping device makers prepare for this new version. We recommend starting soon — we’re expecting the final public version in December.

It’s easy to get Android 8.1 Developer Preview on your Pixel or Nexus device. Just enroll in the Android Beta Program — you’ll soon receive an over-the-air update to Android 8.1 beta. If you enrolled previously, you’re all set, there’s no need to re-enroll. The Developer Preview will be available for Pixel 2 and Pixel 2 XL devices, as well as for Pixel, Pixel XL, Pixel C, Nexus 5X, Nexus 6P, and the Android emulator.

What’s in Android 8.1?

Android 8.1 includes select new features and developer APIs (API level 27), along with the latest optimizations, bug fixes, and security patches. Some of the new APIs include:

  • Android Go memory optimizations and targeting — Android 8.1 includes a set of memory optimizations for Android Go configurations (1GB or less of memory). We’ve added new hardware feature constants so you can now target the distribution of your apps and APK splits to normal or low-RAM devices running Android 8.1 and later.
  • Neural Networks API — as part of our efforts to bring machine intelligence to Android, we’ve added a Neural Networks API via the NDK. It enables hardware-accelerated inference operations on supported devices. We designed the Neural Networks API as a foundational layer for ML frameworks like TensorFlow Lite — Google’s upcoming cross-platform ML framework for mobile — as well as Caffe2 and others. Stay tuned for TensorFlow Lite announcements.
  • Autofill enhancements — we’ve made it easier for password managers and other Autofill services to use the Autofill framework. For example, we’ve added support for more UI customization of the Save dialog, as well as setAutofillOptions() for users to set credit card expiration using a spinner.
  • Shared memory API — this new API lets apps allocate shared memory for faster access to common data. Apps can map anonymous shared memory and manage protection controls using the SharedMemory API. The API is parcelable, AIDL friendly, and exposes useful features like removing write permissions.

Take a look at Android 8.1 site for more information, including the diff report and updated API reference docs.

Test your apps on Android 8.1

With the consumer launch coming in December, it’s important to test your current app now. This gives users a seamless transition to Android 8.1 when it arrives on their devices.

Just enroll your eligible device in Android Beta to get the latest update, then install your app from Google Play and test. If you don’t have a Pixel or Nexus device, you can set up an Android 8.1 emulator for testing instead. If you notice any issues, fix them and update your app in Google Play right away — without changing the app’s platform targeting.

Build with new features and APIs

When you’re ready, take advantage of the new features and APIs in Android 8.1, which we’ve already finalized as API Level 27. For an overview of what’s new, take a look at Android 8.1 for Developers. You can also extend your apps with established Android Oreo features as well, see the Android Oreo site for details.

If your app uses forms, make sure to test them with autofill so that users can take advantage of this convenient feature. Enable “Autofill with Google” or a similar service in Settings and test the form fills to make sure they work as expected. We strongly recommend providing explicit hints about your fields, and also associating your website and mobile app, so that logins can be shared between them.

Speed your development with Android Studio

To build with Android 8.1, we recommend updating to Android Studio 3.0, which is now available from the stable channel. On top of the new app performance profiling tools, support for the Kotlin programming language, and Gradle build optimizations, Android Studio 3.0 makes it easier to develop with Android Oreo features like Instant Apps, XML Fonts, downloadable fonts, and adaptive icons.

We also recommend updating to the Android Support Library 27.0.0, which is available from Google’s Maven repository. New in this version are: a ContentPager library for efficiently loading “paged” data on a background thread; ViewCompat wrappers for Autofill methods; an AmbientMode headless fragment that improves Wear ambient mode support, fullscreen Trusted Web Activities, and more. See the version notes for more information.

You can update your project’s compileSdkVersion to API 27 to compile against the official Android 8.1 APIs. We also recommend updating your app’s targetSdkVersion to API 27 to test with compatibility behaviors disabled. See the this guide for details on how to set up your environment to build with Android 8.1.

Publish your updates to Google Play

The Android 8.1 APIs are already final, so we’ve opened Google Play for apps compiled against or targeting API level 27. When you’re ready, you can publish your APK updates in your alpha, beta, or production channels. Make sure that your updated app runs well on Android 8.1 as well as older versions. We recommend using Google Play’s beta testing feature to run an alpha test on small group of users, then run a much larger open beta test. When you’re ready to launch your update, you can use a staged rollout. We’re looking forward to seeing your app updates!

Give us your feedback!

As always, your feedback is crucial, so please let us know what you think. We’ve set up different hotlists where you report Android platform and tools issues, app compatibility issues, and third-party SDKs and tools issues. We also have a new hotlist for Neural Networks API issues.

You can also give us feedback through the Android Developer community or Android Beta community as we work towards the consumer release in December.

Android Studio 3.0

Posted by Jamal Eason, Product
Manager, Android

Android Studio 3.0 is ready to download today. Announced at Google I/O 2017,
Android Studio 3.0 is a large update focused on accelerating your app
development on Android.

This release of Android Studio is packed with many new updates, but there are
three major feature areas you do not want to miss, including: a new suite of app
profiling tools to quickly diagnose performance issues, support for the Kotlin
programming language, and a new set of tools and wizards to accelerate your
development on the latest Android Oreo APIs.

We also invested time in improving stability and performance across many areas
of Android Studio. Thanks to your feedback during the preview versions of
Android Studio 3.0! If you are looking for high stability, want to build high
quality apps for Android Oreo, develop with the Kotlin language, or use the
latest in Android app performance tools, then you should download Android Studio
3.0 today.

Check out the the list of new features in Android Studio 3.0 below, organized by
key developer flows.


What’s new in Android Studio 3.0

Develop

  • Kotlin Programming Language As announced
    at Google I/O 2017
    , the Kotlin
    programming language is now officially supported for Android development. Kotlin
    is an expressive and concise language that is interoperable with existing
    Android languages and runtimes, which means you can use as little or as much of
    the language in your app as you want. Kotlin is a production-ready language
    used by many popular Android apps on Google Play today.

    This release of Android Studio is the first milestone of bundles the Kotlin
    language support inside the IDE. Many of your favorite features such as code
    completion and syntax highlighting work well this release and we will continue
    to improve the remaining editor features in upcoming release. You can choose to
    add Kotlin to your project using the built-in conversion tool found under
    CodeConvert Java File to Kotlin File, or
    create a Kotlin enabled project with the New Project Wizard. Lean more about
    Kotlin language support
    in Android Studio
    .

Kotlin Language Conversion in Android Studio

  • Java 8 Language features In Android
    Studio 3.0, we are continuing to improve the support for Java 8 language
    features. With the migration
    to a javac
    based toolchain, using Java 8 language features in your project
    is even easier. To update your project to support the new Java 8 Language
    toolchain, simply update your Source and Target compatibility
    levels to 1.8 in the Project Structure dialog. Learn
    more
    .
  • Layout Editor The component tree in the
    Layout Editor has better drag-and-drop view insertions, and a new error
    panel. Learn
    more
    .
  • Adaptive Icon Wizard The new wizard
    creates a set of launcher icon assets and provides previews of how your
    adaptive icon will look with different launcher screen icon masks. Support for
    VectorDrawable layers is new for this release. Learn
    more
    .
  • XML Fonts & Downloadable Fonts If you
    target Android Oreo (API Level 26 and higher) for your Android app, you can now
    add custom fonts & downloadable fonts using XML with Android Studio
    3.0.
  • Android Things Support Android Studio
    3.0 includes a new set of templates in the New Project wizard and the New Module
    wizard to develop for the Android Things platform. Learn more.
  • IntelliJ Platform Update: Android Studio 3.0 includes the
    IntelliJ 2017.1 release, which has features such as Java 8 language refactoring,
    parameter hints, semantic highlighting, draggable breakpoints, enhanced version
    control search, and more. Learn
    more
    .

Build

  • Build Speed Improvements To further
    improve the speed of Gradle for larger scale projects with many modules, we
    introduced a rare breaking API change in the Android Gradle Plugin to
    improve scalability and build times. This change is one of reasons we jumped
    version numbers from Android Studio 2.4 to 3.0. If you depend on APIs provided
    by the previous Gradle plugin you should validate compatibility with the new
    plugin and migrate to the new APIs. To test, update the plugin version in your
    build.gradle file. Learn
    more
    .
  • Google’s Maven Repository To facilitate
    smaller and faster updates, Android Studio 3.0 utilizes Google’s Maven
    Repository by default instead of using the Android SDK Manager to find updates
    to Android Support Library, Google Play Services, and Firebase Maven
    dependencies. Used in combination with the latest command line SDK
    Manager tool
    and Gradle,
    Continuous Integration builds should migrate to Google’s Maven Repository for
    future Maven repository updates. Learn
    more
    .

Test & Debug

  • Google Play System Images We also
    updated the emulator system images for Android Oreo to now include the Google
    Play Store. Bundling in the Google Play store allows you to do end-to-end
    testing of apps with Google Play, and provides a convenient way to keep Google
    Play services up-to-date in your Android Virtual Device (AVD). Just as Google
    Play services updates on physical devices, you can trigger the same updates on
    your AVDs.

    Google Play Store in Android Emulator

    To ensure app security and a consistent experience with physical devices, the
    emulator system images with the Google Play store included are signed with a
    release key. This means you will not be able to get elevated privileges. If you
    require elevated privileges (root) to aid with your app troubleshooting, you can
    use the Android Open Source Project (AOSP) emulator system images that do not
    include Google apps or services. Learn more.

  • OpenGL ES 3.0 Support in Android Emulator
    The latest version of the Android Emulator has OpenGL ES 3.0 support
    for Android Oreo system images along with significant improvements in OpenGL ES
    2.0 graphics performance for older emulator system images. Learn
    more
    .
  • App Bug Reporter in Android Emulator To
    help in documenting bugs in your app, we have added an easier way to generate a
    bug report with the Android Emulator with all the necessary configuration
    settings and space to capture your repro steps. Learn
    more
    .
  • Proxy Support in Android If you use a
    proxy to access the Internet, we have added a user interface to manage the HTTP
    proxy settings used by the emulator. Lean
    more
    .
  • Android Emulator Quick Boot (Canary) One
    of the most common pain points we hear is that the emulator takes too long to
    boot. To address this concern, we are excited to preview a new feature to solve
    this called Quick Boot, which significantly speeds up your emulator start time.
    Once enabled, the first time you start an AVD a cold boot will occur (just like
    powering on a device), but all subsequent starts are fast and the system is
    restored to the state at which you closed the emulator (similar to waking a
    device). If you want to try it out, ensure you are on the canary update release
    channel and then you will find v26.2.0 of the Android Emulator in the SDK
    Manager. Learn
    more
    .
  • APK Debugging Android Studio 3.0 allows
    you to debug an arbitrary APK. This functionally is especially helpful for those
    who develop your Android C++ code in another IDE, but want to debug and analyze
    the APK in the context of Android Studio. As long as you have a debuggable
    version of your APK, you can use the new APK Debugging features to analyze,
    profile & debug the APK. Moreover, if you have access to the sources of your
    APK, you can link the source to the APK debugging flow for a higher fidelity
    debugging process. Get started by simply selecting Profile or debug
    APK
    from the Android Studio Welcome Screen or File → Profile or
    debug APK
    . Learn
    More
    .

APK Debugging

  • Layout Inspector In this release we have
    added a few additional enhancements for the Layout Inspector including better
    grouping of properties into common categories, as well as search functionality
    in both the View Tree and Properties Panels. Learn
    more
    .
  • Device File Explorer The new Device File
    Explorer in Android Studio 3.0 allows you to view the file and directory
    structure of your Android device or emulator. As you are testing your app, you
    can now quickly preview and modify app data files directly in Android Studio.
    Learn
    more
    .
  • Android Test Orchestrator Support – When used with
    AndroidJUnitRunner 1.0 or higher, the Android Gradle plugin 3.0 supports the use
    of the Android Test Orchestrator. The Android Test Orchestrator allows each of
    your app’s tests to run within its own Instrumentation.
    Learn
    more
    .

Optimize

  • Android Profiler Android Studio 3.0
    includes a brand new suite of tools to help debug performance problems in your
    app. We completely rewrote the previous set of Android Monitor tools, and
    replaced them with the Android Profiler. Once you deploy your app to a running
    device or emulator, click on the Android Profiler tab and you
    will now have access to a real-time & unified view of the CPU, Memory, & Network
    activity for your app. Each of the performance events are mapped to the UI event
    timeline which highlights touch events, key presses, and activity changes so
    that you have more context on when and why a certain event happened. Click on
    each timeline to dig into each performance aspect of your app. Learn
    more
    .

Android Profiler – Combined timeline view.

CPU Profiler


Memory Profiler


Network Profiler

  • APK Analyzer Improvements We also
    updated APK Analyzer with additional enhancements to help you further optimize
    the size of your APK. Learn
    more
    .

To recap, Android Studio 3.0 includes these new major features:

If you are using a previous version of Android Studio, you can upgrade to
Android Studio 3.0 today or you can download the update from the official
Android Studio Preview download
page
. As mentioned in this blog, there are some breaking Gradle Plugin API
changes to support new features in the IDE. Therefore, you should also update
your Android Gradle plugin version to 3.0.0 in your current project to test and
validate your app project setup.

We appreciate any feedback on things you like, issues or features you would like
to see. If you find a bug or issue, feel free to file an
issue
. Connect with us — the Android Studio development team ‐ on our Google+ page or on Twitter

Video Playback with the Google Assistant on Android TV

Posted by Benjamin Baxter, Developer Programs Engineer

How to integrate the Google Assistant in a TV app

Earlier this year, we announced that the Google Assistant will be coming to Android TV and it has arrived. The Google Assistant on Android TV will allow users to discover, launch and control media content, control smart devices like light bulbs, and much more. Your Assistant also understands that you’re interacting on a TV, so you’ll get the best experience possible while watching your favorite movies and TV shows.

The Google Assistant has a built-in capability to understand commands like “Watch The Incredibles”, and media controls, like pause, fast forward, etc. This article will walk through how to integrate the Google Assistant into your application.

There are no new APIs needed to integrate with the Google Assistant. You just need to follow the pattern that the Google Assistant expects from your app. If you want to experiment and play with the APIs and the Assistant, you can download this sample from github.

Discovery

The Google Assistant has made some changes to improve finding information on Android TV.

There are a few ways to expose your content to users through the Google Assisant.

Server side integration. (Requires registration and onboarding)

You need to provide your content catalog to Google. This data is ingested and available to the Google Assistant outside of your app.

This is not specific for Google Assistant. It will also enable other Google services such as search and discovery on Google Search, Google Play, Google Home App, and Android TV.

Client side integration. (Available to all apps)

If your app is already searchable, then you only need to handle the EXTRA_START_PLAYBACK flag, which we go into more detail later. Content will auto-play if the app name is explicitly specified in the search results or if the user is already in your app.

Once your app is searchable, you can test by asking the Assistant or, if you are in a loud area, test quietly by running the following adb command:

adb shell am start -a "android.search.action.GLOBAL_SEARCH" --es query \"The Incredibles\" 

Each app that responds to the search query will have a row displaying their search results. Notice that YouTube and the sample app, Assistant Playback, each receive their own rows for content that match the search query.

For specific searches such as “Play Big Buck Bunny”, the Assistant will present a card with a button for each app that exactly matched the search query. In the screenshot below, you can see the sample app, Assistant Playback, shows up as an option to watch Big Buck Bunny.

There are times when the Google Assistant will launch an app directly to start playing content. An example of when this occurs is when content is exclusive to the app; “Play the Netflix original House of Cards”.

Launching

When the user selects a video from search results, an intent is sent to your app. The priority order for the intent actions are as follows:

  1. Intent specified in the cursor returned from the search (SUGGEST_COLUMN_INTENT_ACTION).
  2. Intent specific in the searchable.xml file with the searchSuggestIntentAction value.
  3. Defaults to ACTION_VIEW.

In addition, the Assistant will also pass an extra to signal if playback should begin immediately. You app should be able to handle the intent and expect a boolean extra called EXTRA_START_PLAYBACK.

import static android.support.v4.content.IntentCompat.EXTRA_START_PLAYBACK;

public class SearchableActivity extends Activity {

   @Override
   protected void onCreate(@Nullable Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       if (getIntent() != null) {
           // Retrieve video from getIntent().getData().

           boolean startPlayback = getIntent().getBooleanExtra(EXTRA_START_PLAYBACK, false);
           Log.d(TAG, "Should start playback? " + (startPlayback ? "yes" : "no"));

           if (startPlayback) {
               // Start playback.
               startActivity(...);
           } else {
               // Show details for movie.
               startActivity(...);
           }
       }
       finish();
   }
}

You can test this by modifying and running the following adb command. If your app has a custom action, then replace android.intent.action.VIEW with the custom action. Replace the value of the -d argument with the URI you return from the Assistant’s query.

adb shell 'am start -a android.intent.action.VIEW --ez
android.intent.extra.START_PLAYBACK true -d <URI> -f 0x14000000'

The -f argument is the logical OR value from FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TOP. This will force your activity to be freshly launched.

For example, in the sample app, you can run the following command to launch playback of “Big Buck Bunny” as if the assistant had launched it.

adb shell 'am start -a android.intent.action.VIEW --ez
android.intent.extra.START_PLAYBACK true -d 
content://com.example.android.assistantplayback/video/2 -n
com.example.android.assistantplayback/.SearchableActivity -f 0x14000000'

The URI above is defined by the value of android:searchSuggestIntentData in searchable.xml (content://com.example.android.assistantplayback/video/) in addition to the value of SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID (2) returned from the query.

Note that intents may be cached by the Google Assistant up to 7 days. Your app could receive a request to play content that is no longer available. The intent handler should be designed to be stateless and not rely on any previously knowledge to handle the deep link. Your app should gracefully handle this situation. One solution would be to show an error message and let the user land on your main activity or another relevant activity.

Playback

If your app implements MediaSession correctly, then your app should work right away with no changes.

The Google Assistant assumes that your app handles transport controls. The Assistant uses the TransportControls to send media commands to your app’s MediaSession. Video apps must support the following controls wherever possible:

  • Play/Pause/Stop
  • Previous/Next
  • Rewind/Fast Forward (implemented with seekTo())

You can easily get a hook for these controls by implementing a MediaSession.Callback. If you play videos using PlaybackTransportControlGlue, then all your callback needs to do it sync the glue and the MediaSession. Otherwise use this callback to sync your player.

public class MyMediaSessionCallback extends MediaSessionCompat.Callback {

   private final PlaybackTransportControlGlue<?> mGlue;

   public MediaSessionCallback(PlaybackTransportControlGlue<?> glue) {
       mGlue = glue;
   }

   @Override
   public void onPlay() {
       Log.d(TAG, "MediaSessionCallback: onPlay()");
       mGlue.play();
       updateMediaSessionState(...);
   }

   @Override
   public void onPause() {
       Log.d(TAG, "MediaSessionCallback: onPause()");
       mGlue.pause();
       updateMediaSessionState(...);
   }

   @Override
   public void onSeekTo(long position) {
       Log.d(TAG, "MediaSessionCallback: onSeekTo()");
       mGlue.seekTo(position);
       updateMediaSessionState(...);
   }

   @Override
   public void onStop() {
       Log.d(TAG, "MediaSessionCallback: onStop()");
       // Handle differently based on your use case.
   }

   @Override
   public void onSkipToNext() {
       Log.d(TAG, "MediaSessionCallback: onSkipToNext()");
       playAndUpdateMediaSession(...);
   }

   @Override
   public void onSkipToPrevious() {
       Log.d(TAG, "MediaSessionCallback: onSkipToPrevious()");
       playAndUpdateMediaSession(...);
   }
}

Continue learning

Check out the following articles and training documents to continue learning about MediaSession and Video apps.

To play around with the Google Assistant on Android TV, download the sample app and run it on Nvidia Shield running Android M or above.

If you would like to continue the discussion, leave a response or talk to me on Twitter.

Android Excellence: congratulations to the new apps and games for Fall 2017

Posted by Kacey Fahey, Developer Marketing, Google Play

Android Excellence recognizes some of the highest quality apps and games on
Google Play. With a strong focus on great design, an engaging user experience,
and strong app performance, this set of apps
and games
show the diversity of content on Google Play. Whether you’re trying to better
manage personal finances with Money
Lover
or want to experience the thrill of stunt-racing with stunning
graphics and real-time challenges in Asphalt
8
, there’s something for everyone to enjoy.

One new awardee is Bring!,
a simple-to-use app that helps manage your grocery lists. Use the existing
catalog of items or add your own product photos, then share your lists and
message in-app to let others know when it’s time to shop. If you’re looking for
a new game to play, Karma.
Incarnation 1.
is a “wonderfully weird, puzzle-filled indie adventure game.”
With beautiful hand-drawn art, you guide the story’s hero through moments of
humor and challenge to be reunited with his love.

Congratulations to the new Android Excellence apps and games for Fall 2017.

New Android Excellence
apps
New Android Excellence
games
Agoda Asphalt
8
AlarmMon Bubble
Witch 3 Saga
Bring! Castle
Creeps
CastBox Crab
War
Email
by Edison
Crash
of Cars
Eve Dan
the Man
Fotor Dawn
of Titans
Mint Dream
Defense
Money
Lover
Iron
Marines
Onefootball Karma.
Incarnation 1.
Robinhood Postknight
Viki Sky
Force Reloaded
Zombie
Age 3

Explore other great apps and games in the Editors’ Choice section on Google Play.


How useful did you find this blogpost?





Google Play Billing Library 1.0 released

Posted by Neto Marin, Developer Advocate

In June we announced the developer
preview for a new Google Play Billing Library
. Today, we are pleased to
announce the official release of the Play Billing Library 1.0. This library
simplifies the development process for Google Play Billing, allowing you to
focus your efforts on your app.

Thank you for your valuable feedback and suggestions that helped us reach the
1.0 release. Watch the video below for a quick overview of the library’s
features.

Before you start

With Play Billing, you can receive payments from users around the world via a
payment system they trust and you can take advantage of features and reports in
the Play Console to manage and earn more revenue.

If you have never implemented in-app billing in your apps, or you want to know
what you can offer using Play Billing Library, read the In-app
Billing Overview
to familiarize yourself with concepts and terminology that
make it easier for you to implement In-app Billing using the Play Billing
Library.

Getting started

Play Billing Library is available through Maven repository, and adding Play
Billing Library to your project is simple as adding the following dependency
into your app’s build.gradle file:

dependencies {
    ...
    compile 'com.android.billingclient:billing:1.0'
}

The Play Billing Library 1.0 automatically adds the
com.android.vending.BILLING permission to your APK. This means you
no longer need to manually include it in your application module’s manifest.

BillingClient and PurchasesUpdatedListener

These classes are the most important pieces when integrating the library into
your Android app. The BillingClient
is the bridge between your app and Google Play. You will use it for listing
available products, starting the billing flow for in-app products or
subscriptions (i.e. opening the payment interface), getting user purchases, and
creating or modifying subscriptions.

When creating your BillingClient
instance, you’ll need to set a PurchasesUpdatedListener.
This allows your app to receive updates from the In-app Billing API, including
transaction results after the billing flow, as well as purchases completed
outside of your app, e.g. user redeemed a Promo Code or bought a product on
another device.

The following code demonstrates how you could override the onPurchasesUpdated()
method of your PurchasesUpdatedListener:

@Override
void onPurchasesUpdated(@BillingResponse int responseCode,
        List<Purchase> purchases) {
    if (responseCode == BillingResponse.OK
            && purchases != null) {
        for (Purchase purchase : purchases) {
            handlePurchase(purchase);
        }
    } else if (responseCode == BillingResponse.USER_CANCELED) {
        // Handle an error caused by a user canceling the purchase flow.
    } else {
        // Handle any other error codes.
    }
}

You can implement the PurchasesUpdatedListener
in your Activity or in any other class you want, according to your app’s
architecture. And here’s the code for creating the BillingClient
instance, and setting the PurchasesUpdatedListener:

mBillingClient = BillingClient.newBuilder(mContext)
                              .setListener(mPurchasesUpdatedListener)
                              .build();

Listing and selling products

To sell products in your app, first, you need to add them using the Play
Console. For more details about how to add in-app products see the page Administering
In-app Billing
.

Attention: If this is a brand new app, before adding
the products you must publish it to the alpha or beta distribution channel. For
more information, see Draft
Apps are No Longer Supported
.

To get a list of product details with prices for current user, call querySkuDetailsAsync().
You must also specify a listener which implements the SkuDetailsResponseListener
interface. You can then override the onSkuDetailsResponse()
method which notifies the listener when the query finishes, as illustrated by
the following sample code:

List<String> skuList = new ArrayList<> ();
skuList.add("premiumUpgrade");
skuList.add("gas");
SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
params.setSkusList(skuList).setType(SkuType.INAPP);
mBillingClient.querySkuDetailsAsync(params.build(),
    new SkuDetailsResponseListener() {
        @Override
        public void onSkuDetailsResponse(SkuDetailsResult result) {
            // Process the result.
        }
    })

After the user chooses a product to buy, you’ll need to start the billing flow
and handle the transaction result. To start a purchase request from your app,
call the launchBillingFlow()
method on the Play Billing Library client. You must call the launchBillingFlow()
method (and all the other methods from BillingClient)
from the UI thread.

The launchBillingFlow()
method needs BillingFlowParams
object that contains relevant data for completing the purchase, such as the
product ID of the item to purchase and the product type (in this case, SkuType.INAPP).
To get an instance of BillingFlowParams,
construct it with newBuilder()
method:

BillingFlowParams.Builder builder = BillingFlowParams
                                       .newBuilder()
                                       .setSku(skuId).setType(SkuType.INAPP);
int responseCode = mBillingClient.launchBillingFlow(builder.build());

As we mentioned earlier, the transaction result will be sent to the onPurchasesUpdated()
method. For details how to process the data received on onPurchasesUpdated()
and how to handle a purchase, check the section Purchase
an item
in our training guide.

Consuming products

By default, all in-app products are managed. It means that Google Play tracks
the product ownership and doesn’t allow to buy multiple times. To be able to buy
a product again, you must consume the product before it becomes available again.

It’s common to implement consumption for in-app products which users may want to
purchase multiple times, such as in-game currency or equipment. You typically
don’t want to implement consumption for in-app products that user purchases once
and provide a permanent effect, such as a premium upgrade.

To consume a product, call the consumeAsync()
method on the Play Billing Library client and pass in the
purchaseToken String value returned when you made the purchase. The
consumption result is returned via onConsumeResponse() method of the ConsumeResponseListener
interface, that you must override to handle the consumption result.

The following example illustrates consuming a product using the associated
purchaseToken:

ConsumeResponseListener listener = new ConsumeResponseListener() {
    @Override
    public void onConsumeResponse(@BillingResponse int responseCode, 
                                  String outToken) {
        if (responseCode == BillingResponse.OK) {
            // Handle the success of the consume operation.
            // For example, increase the number of player's coins,
            // that provide temporary benefits
        }
    }
};
mBillingClient.consumeAsync(purchaseToken, listener);

Sample updated: Trivial Drive V2

With a new library comes a refreshed sample! To help you to understand how to
implement in-app billing in your app using the new Play Billing Library, we’ve
rewritten the Trivial
Drive
sample from the ground up.

Since we released Trivial Drive back in 2013, many new features, devices, and
platforms have been added to the Android ecosystem. To reflect this evolution,
the Trivial
Drive v2
sample now runs on Android TV and Android Wear.

What’s next?

Before integrating within your app, you can try the Play Billing Library with
the codelab published during Google I/O 2017: Buy
and Subscribe: Monetize your app on Google Play
.

In this codelab, you will start with a simplified version of Trivial Drive V2
that lets users to “drive” and then you will add in-app billing to it. You’ll
learn how to integrate purchases and subscriptions as well as the best practices
for developing reliable apps that handle purchases.

Get more info on the Play
Billing Library
and the official
reference
for classes and methods documentation on the Android Developers
website. For a step-by-step guide to implementing the Play Billing Library in
your project, visit the library’s
training class
.

For more details about the Play Billing Library 1.0 release, check out the Releases Notes page, where you can find updates, bug fixes and behavior changes on the library since the Developer Preview release.

We still want your feedback

If you have issues or questions, file a bug
report
on the Google Issue Tracker, and for issues and suggestions on the
sample (like a bug or a new feature), contact us on the Trivial
Drive issues page
.

For technical questions on implementation, library usage, and best practices,
you can use the tags google-play
and play-billing-library
on StackOverflow or visit the communities on our
Google+ page.

Understanding the performance benefits of ConstraintLayout

Posted by Takeshi Hagikura, Developer Programs Engineer

Since announcing ConstraintLayout
at Google I/O last year, we’ve continued to improve the layout’s stability and
layout editor support. We’ve also added new features specific to
ConstraintLayout that help you build various type of layouts, such
as introducing
chains
and setting
size as a ratio
. In addition to these features, there is a notable
performance benefit by using ConstraintLayout. In this post, we’ll
walk through how you can benefit from these performance improvements.

How Android draws views?

To better understand the performance of ConstraintLayout, let’s
take a step back and see how Android draws views.

When a user brings an Android view into focus, the Android framework directs the
view to draw itself. This drawing process comprises 3 phases:

  1. Measure

    The system completes a top-down traversal of the view tree to determine how
    large each ViewGroup and View element should be. When a
    ViewGroup is measured, it also measures its children.

  2. Layout

    Another top-down traversal occurs, with each ViewGroup determining
    the positions of its children using the sizes determined in the measure phase.

  3. Draw

    The system performs yet another top-down traversal. For each object in the view
    tree, a Canvas object is created to send a list of drawing commands
    to the GPU. These commands include the ViewGroup and
    View objects’ sizes and positions, which the system determined
    during the previous 2 phases.

Figure 1. Example of how the measure phase traverses a view tree

Each phase within the drawing process requires a top-down traversal of the view
tree. Therefore, the more views you embed within each other (or nest) into the
view hierarchy, the more time and computation power it takes for the device to
draw the views. By keeping a flat hierarchy in your Android app layouts, you can
create a fast and responsive user interface for your app.

The expense of a traditional layout hierarchy

With that explanation in mind, let’s create a traditional layout hierarchy that
uses LinearLayout and RelativeLayout objects.

Figure 2. Example layout

Let’s say we want to build a layout like the image above. If you build it with
traditional layouts, the XML file contains an element hierarchy similar to the
following (for this example, we’ve omitted the attributes):

<RelativeLayout>
  <ImageView />
  <ImageView />
  <RelativeLayout>
    <TextView />
    <LinearLayout>
      <TextView />
      <RelativeLayout>
        <EditText />
      </RelativeLayout>
    </LinearLayout>
    <LinearLayout>
      <TextView />
      <RelativeLayout>
        <EditText />
      </RelativeLayout>
    </LinearLayout>
    <TextView />
  </RelativeLayout>
  <LinearLayout >
    <Button />
    <Button />
  </LinearLayout>
</RelativeLayout>

Although there’s usually room for improvement in this type of view hierarchy,
you’ll almost certainly still need to create a hierarchy with some nested views.

As discussed before, nested hierarchies can adversely affect performance. Let’s
take a look at how the nested views actually affect the UI performance using
Android Studio’s Systrace
tool. We called the measure and layout phases for each ViewGroup
(ConstraintLayout and RelativeLayout) programmatically
and triggered Systrace while the measure and layout calls are executing. The
following command generates an overview file that contains key events, such as
expensive measure/layout passes, that occur during a 20-second interval:

python $ANDROID_HOME/platform-tools/systrace/systrace.py --time=20 -o ~/trace.html gfx view res

For more details about how you can use Systrace, see the Analyzing UI
Performance with Systrace
guide.

Systrace automatically highlights the (numerous) performance problems with this
layout, as well as suggestions for fixing them. By clicking the “Alerts” tab,
you will find that drawing this view hierarchy requires 80 expensive passes
through the measure and layout phases!

Triggering that many expensive measure and layout phases is far from ideal; such
a large amount of drawing activity could result in skipped frames that users
notice. We can conclude that the layout has poor performance due to the nested
hierarchy as well as the characteristic of RelativeLayout, which
measures each of its children twice.

Figure 3. Looking at the alerts from Systrace for the
layout variant that uses RelativeLayout

You can check the entire code on how we performed these measurements in our GitHub
repository
.

The benefits of a ConstraintLayout object

If you create the same layout using ConstraintLayout, the XML file
contains an element hierarchy similar to the following (attributes again
omitted):

<android.support.constraint.ConstraintLayout>
  <ImageView />
  <ImageView />
  <TextView />
  <EditText />
  <TextView />
  <TextView />
  <EditText />
  <Button />
  <Button />
  <TextView />
</android.support.constraint.ConstraintLayout>

As this example shows, the layout now has a completely flat hierarchy. This is
because ConstraintLayout allows you to build complex layouts
without having to nest View and ViewGroup elements.

For example, let’s look at the TextView and EditText
in the middle of the layout:

When using a RelativeLayout, you need to create a new
ViewGroup to align the EditText vertically with the
TextView:
<LinearLayout
    android:id="@+id/camera_area"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:layout_below="@id/title" >

    <TextView
        android:text="@string/camera"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:id="@+id/cameraLabel"
        android:labelFor="@+id/cameraType"
        android:layout_marginStart="16dp" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <EditText
            android:id="@+id/cameraType"
            android:ems="10"
            android:inputType="textPersonName"
            android:text="@string/camera_value"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginTop="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp" />
    </RelativeLayout>
</LinearLayout>

By using ConstraintLayout instead, you can achieve the same effect
just by adding a constraint from the baseline of the TextView to
the baseline of the EditText without creating another
ViewGroup:

Figure 4. Constraint between EditText and TextView
<TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:layout_constraintLeft_creator="1"
      app:layout_constraintBaseline_creator="1"
      app:layout_constraintLeft_toLeftOf="@+id/activity_main_done"
      app:layout_constraintBaseline_toBaselineOf="@+id/cameraType" />

When running the Systrace tool for the version of our layout that uses
ConstraintLayout, you see far fewer expensive measure/layout passes
during the same 20-second interval. This improvement in performance makes sense,
now that we’re keeping the view hierarchy flat!

Figure 5. Looking at the alerts from Systrace for the
layout variant that uses ConstraintLayout

On a related note, we built the ConstraintLayout variant of our
layout using just the layout
editor
instead of editing the XML by hand. To achieve the same visual effect
using RelativeLayout, we probably would have needed to edit the XML
by hand.

Measuring the performance difference

We analyzed how long every measure and layout pass took for two type of layouts,
ConstraintLayout and RelativeLayout, by using
OnFrameMetricsAvailableListener,
which was introduced in Android 7.0 (API level 24). This class allows you to
collect frame-by-frame timing information about your app’s UI
rendering.

By calling the following code, you can start recording per-frame UI actions:

window.addOnFrameMetricsAvailableListener(
        frameMetricsAvailableListener, frameMetricsHandler);

After timing information becomes available, the app triggers the
frameMetricsAvailableListener() callback. We are interested in the
measure/layout performance, so we call FrameMetrics.LAYOUT_MEASURE_DURATION
when retrieving the actual frame duration.

Window.OnFrameMetricsAvailableListener {
        _, frameMetrics, _ ->
        val frameMetricsCopy = FrameMetrics(frameMetrics);
        // Layout measure duration in nanoseconds
        val layoutMeasureDurationNs = 
                frameMetricsCopy.getMetric(FrameMetrics.LAYOUT_MEASURE_DURATION);

To learn more about the other types of duration information that
FrameMetrics can receive, see the FrameMetrics
API reference.

Measurement results: ConstraintLayout is faster

Our performance comparison shows that ConstraintLayout performs
about 40% better in the measure/layout phase than RelativeLayout:

Figure 6. Measure / Layout (unit: ms, average of 100
frames)

As these results show, ConstraintLayout is likely to be more
performant than traditional layouts. Moreover, ConstraintLayout has
other features that help you build complex and performant layouts, as discussed
in the benefits of a ConstraintLayout
object
section. For details, see the Build
a Responsive UI with ConstraintLayout
guide. We recommend that you use
ConstraintLayout when designing your app’s layouts. In almost all
cases when you would have previously need a deeply-nested layout,
ConstraintLayout should be your go-to layout for optimal
performance and ease of use.

Appendix: Measurement environment

All the measurements above were performed in the following environment.

Device Nexus 5X
Android Version 8.0
ConstraintLayout version 1.0.2

What’s next

Check out the developer
guide
, the API
reference documentation
, and the article
on Medium
to fully understand what ConstraintLayout can provide
for you. And once again, thank you to all who submitted feedback and issues over
the months since our alpha release of ConstraintLayout. We’re truly
grateful that we were able to release the production-ready 1.0
version
of ConstraintLayout earlier this year.
As we continue to improve ConstraintLayout, please continue to send
us feedback using the Android issue tracker.

Introducing Android 8.0 Oreo

Posted By: Dave Burke, VP of Engineering

After more than a year of development and months of testing by developers and early adopters (thank you!), we’re now ready to officially launch Android 8.0 Oreo to the world. Android 8.0 brings a ton of great features such as picture-in-picture, autofill, integrated Instant Apps, Google Play Protect, faster boot time, and much more.

We’re pushing the sources to Android Open Source Project (AOSP) for everyone to access today. Pixel and Nexus 5X/6P builds have entered carrier testing and we expect to start rolling out in phases over the next several weeks, alongside Pixel C and Nexus Player. Android Beta users will receive the update to the final version today and images are available to download and flash manually. We’ve been working closely with our partners over the last many months, and by the end of this year, hardware makers like Essential, General Mobile, HMD Global Home of Nokia Phones, Huawei, HTC, Kyocera, LG, Motorola, OnePlus, Samsung, Sharp and Sony are scheduled to be launching or upgrading new devices to Android 8.0 Oreo.

What’s in Android Oreo?

In Android 8.0 Oreo we focused on creating fluid experiences that make Android even more powerful and easy to use, such as:

  • Picture-in-picture lets users manage two tasks simultaneously on any size screen, and it’s easy for apps to support it. (Shown at right)
  • Notification dots extend the reach of notifications and offer a new way to surface activity in your apps. Dots work with zero effort for most apps — we even extract the color of the dot from your icon.
  • Autofill framework simplifies how users set up a new device and synchronize their passwords. Apps using form data can optimize their apps for Autofill, and password manager apps can use the new APIs to make their services available to users in their favorite apps. Autofill will roll out fully over the next few weeks as part of an update to Google Play Services.

We also invested in Android Vitals, a project focused on optimizing battery life, startup time, graphics rendering, and stability, while giving developers better visibility over the health of their apps:

  • System optimizations: We worked across the system to help apps run faster and smoother — for example, in the runtime we added a new concurrent compacting garbage collection, code locality, and more.
  • Background limits: We added new limits on background location and wi-fi scans and changes in the way apps run in the background. These boundaries prevent unintentional overuse of battery and memory and apply to all apps — make sure you understand and account for these in your apps.
  • Complementary Android Vitals dashboards and IDE profilers: In the Play Console you can now see aggregate data about your app to help you pinpoint common issues – excessive crash rate, ANR rate, frozen frames, slow rendering, excessive wakeups, and more. You’ll also find new performance profilers in Android Studio 3.0, and new instrumentation in the platform.
In Android 8.0 your app can directly pin a specific app shortcut in the launcher to drive engagement (left). Notification dots keep users active in your app and let them jump directly to the app’s core functions (right).

For developers, Android Oreo includes many new capabilities to help you build better, more efficient apps. Here are just a few:

  • Autosizing textview: Use autosizing TextView to automatically fill a TextView with text, regardless of the amount. You can create an array of preset text sizes, or set min and max sizes with a step granularity, and the text will grow and shrink to fill the available TextView space.
  • Fonts in XML: Fonts are now a fully supported resource type. You can now use fonts in XML layouts and define font families in XML.
  • Downloadable fonts and emoji: With downloadable fonts you can load fonts from a shared provider instead of including them in your APK. The provider and support library manage the download of fonts and shares them across apps. The same implementation also supports downloadable emoji, so you can get updated emoji without being limited to the emoji built into the device.
  • Adaptive icons: You can now create adaptive icons that the system displays in different shapes, based on a mask selected by a device manufacturer. The system also animates interactions with the icons, and uses them in the launcher, shortcuts, settings, sharing dialogs, and in the overview screen.
Adaptive icons display in a variety of shapes across different device models.
  • Shortcut pinning: App shortcuts and homescreen widgets are great for engaging users and now you can let users add and pin shortcuts and widgets to the launcher from within your app. There’s also a new option to add a specialized activity to help users create shortcuts. The activity is complete with custom options and confirmation.
  • Wide-gamut color for apps: Imaging apps can now take full advantage of new devices that have a wide-gamut color capable display. To display wide gamut images, apps enable a flag in their manifest files (per activity) and load bitmaps with an embedded wide color profile (AdobeRGB, Pro Photo RGB, DCI-P3, etc.).
  • WebView enhancements: In Android Oreo, we’ve enabled WebView multiprocess mode by default and added an API to let your app handle errors and crashes. You can also opt in your app’s WebView objects to verify URLs through Google Safe Browsing.
  • Java 8 Language APIs and runtime optimizations: Android now supports several new Java Language APIs, including the new java.time API. In addition, the Android Runtime is faster than ever before, with improvements of up to 2x on some application benchmarks.

Learn more about these and other new features by visiting the Android 8.0 Oreo site on developer.android.com. Also check out the What’s New in Android Oreo? video for an overview of new features for developers.

Make sure your apps are ready

If haven’t already, take a few moments today to test your apps and make sure they offer the experience you want for users upgrading to Android Oreo.

Just install your current app from Google Play onto a device or emulator running Android Oreo and test the user flows. The app should run and look great, and handle the Android Oreo behavior changes properly. In particular, pay attention to background location limits, notification channels, and changes in networking, security, and identifiers.

Once you’ve resolved any issues, publish your app updates to Google Play in your alpha, beta, or production channels so that they’re available as users start to receive Android 8.0 Oreo.

Speed your development with Android Studio

When you’re ready to build with new APIs in Android Oreo, we recommend updating to the latest version of Android Studio 3.0, available for download from the beta channel. Aside from improved app performance profiling tools, support for the Kotlin programming language, and Gradle build optimizations, Android Studio 3.0 makes it easier to develop with Instant Apps, XML Fonts, downloadable fonts, and adaptive icons.

Android Studio 3.0 includes tools for developing with Android Oreo features, such as previewing XML font resources in your app.

We also recommend updating to the Android Support Library 26.0.2, available now from Google’s Maven repository, and to the latest SDK, tools, and emulator system images, available in the SDK Manager.

If you’re just getting started building for Android Oreo, read the migration guide first. It gives you an overview of the process and the configuration changes you’ll need to make.

To compile against the official Android 8.0 APIs, update your project’s compileSdkVersion to API 26. We also recommend updating your app’s targetSdkVersion to API 26 to opt-in and test your app with Android Oreo specific behavior changes. See the migration guide for details on how to set up your environment to build with Android Oreo.

Publish your updates to Google Play

Google Play is open for apps compiled against or targeting API 26. When you’re ready, you can publish your APK updates in your alpha, beta, or production channels.

Make sure that your updated app runs well on Android Oreo as well as older versions. We recommend using Google Play’s beta testing feature to get early feedback from a small group of users, then do a staged rollout. We’re looking forward to seeing your app updates!

What’s next for Android Oreo?

We’ll soon be closing the Developer Preview issue tracker, but please keep the feedback coming! You can file a new issue against Android 8.0 in the AOSP issue tracker.

Thanks again to the many developers and early adopters who participated in the Android O Developer Preview and public beta. You gave us great feedback, and filed hundreds of issues that helped us to make the Android Oreo platform great for consumers and developers.