[MUSIC PLAYING]
PATRICK FUENTES: Hi, everyone.
My name is Patrick Fuentes from the ChromeOS Developer
Relations Team.
Today, we're going to give a brief overview
of why and how to optimize your Android app for ChromeOS.
Millions of Android apps run on ChromeOS devices today.
And if your app is already available in Google Play,
there's a good chance that it's one of them.
We've heard from developers who've already
optimized for ChromeOS that they've seen increases
in engagement and time spent in their apps.
Before we get started, I'd like you
to take a few seconds to think of an app that provides
a really great experience for you
when you use it on both a phone and a Chromebook.
When I imagine this, I envision different experiences
between small and large screens.
And many of our users will expect as much.
Because our Android apps can be run in both situations,
let's make sure that we provide a great experience
on both phones and ChromeOS.
Thankfully, the same work that you
do to support other large-screen devices,
such as tablets and foldables, should cover
most or all of your concerns.
With that said, there are a few common issues developers
run into when they optimize for ChromeOS,
and we'll cover some of those today.
Be sure to stick around until the end
to learn how a new publishing capability can make your app
stand out compared to the rest.
One of the most important things to do for ChromeOS optimization
is to ensure that apps have support
for using input devices, like keyboard, mouse, and stylus.
About 90% of ChromeOS users interact with apps this way.
Some devices don't even have a touch screen as an option.
Support for input devices doesn't only
matter for ChromeOS either.
It's also common for users of large-screen devices
like foldables and tablets to use a keyboard, mouse,
or stylus.
If you only do one thing with your app,
try to use it with a keyboard, mouse, and stylus to make sure
that basic functionality works without a touch screen.
Once you've ensured that the basics work,
there is much more you can do to enhance
your experience, such as adding thoughtful focus states
or adding context menus to your app.
Input methods are critical for our users' ability
to interact with our apps, so I highly
recommend checking out "The key to keyboard and mouse
support" for more guidance on the topic.
Once we're confident that our apps work with common input
methods, it's time to think about how they're going
to look on a large screen.
On ChromeOS devices, users will see your familiar app
in a different way through freeform window resizing.
You may even be surprised by how your app looks
in this new environment.
Thanks to ChromeOS's improved window compatibility
features, users can keep your app in a familiar aspect ratio
if it's currently only optimized for phones.
With that said, all this extra space on the screen
means there's much more that your app can do to help users.
Let's take advantage of it.
If you're new to large screen optimization,
the topic may seem daunting.
To make this easier, we're creating new tooling
and guidance, and the effort will benefit your app
across tablets, foldables, and more.
To learn more about the latest best practices
when implementing UI with our new UI toolkit, Jetpack
Compose, I highly recommend checking out "Compose--
Implementing responsive UI for larger screens."
If you or your design team want to learn more
about how to design for large screens first,
be sure to check out "Designing for larger screens--
Canonical Layouts and Visual Hierarchy"
to learn more about straightforward ways
of thinking about designing your UI with ChromeOS and all
display sizes in mind.
Another common issue we find with device support
for ChromeOS is binary compatibility for games or apps
with C++ code.
Different devices have different CPUs and instruction sets.
Because of this, we need to make sure
that our app supports all of the relevant Application Binary
Interfaces, or ABIs.
If you've only run your app on Android phones in the past,
you may have only focused on ARM devices.
However ChromeOS devices often use chips
with x86 architectures.
Thankfully, due to binary translation,
many Android apps will run on an x86 ChromeOS device,
even if an x86-compatible version isn't available.
However, this binary translation can
hinder your app's performance and hurt battery life,
so it's better to provide x86 support explicitly.
Because Gradle builds for all nondeprecated ABIs by default,
most apps already have x86 support.
However, if you've written or added
platform-specific code or libraries to your app,
and you're using ABI filters in your build.gradle,
you should make sure that your app
has support for x86 devices.
It's time to talk about one of my favorite topics--
testing.
The best way to ensure that your app works well
on ChromeOS devices is to try it on ChromeOS devices.
There are many affordable ChromeOS devices
available and ready to run your app.
So I recommend trying your app on one today if you can.
If you don't have a physical ChromeOS device,
there are still plenty of things you can do to test your app.
For example, you could still test a keyboard or mouse
on an ordinary Android handset by plugging them
in via the USB port.
If you haven't tried the new desktop emulator
in Android Studio, it's another great option
for trying your app in a large-screen setting
with resizable windowing.
When you create a new virtual device in Android Studio,
look for the Desktop category, and you'll see a few options.
Check out the announcement on ChromeOS
for more details about the new Desktop Android Virtual Device.
And if you're looking for a checklist of things
to try out while you're testing, be sure to check out
the large screen app quality guidelines
on developer.android.com to find a rigorous set of checklists
and tests that could provide confidence
that your app is ready to shine on large screens.
So you already have a great app in Google Play,
and millions of users on ChromeOS devices
are within your reach.
How do you make sure your app is available to them?
Go to the Google Play Console for your app's developer
account and check the device catalog
to see which devices are supported by your app.
It's a good idea to review the supported and excluded list
regularly to help ensure the widest
availability of your app.
When looking at the device catalog,
you might be surprised to see some devices aren't supported.
Often, when a device isn't supported,
it's because there's an entry in the app's manifest
declaring that it requires features
that aren't available on the device that's unsupported.
An example of where we see issues with manifest entries
is with camera requirements.
Some of you might be wondering, Chromebooks have cameras,
so why is this an issue?
The reason in this situation is there
are several different camera features
that a device can support, and not
every device has all of them.
In this case, even though our Pixelbook
has a user-facing camera, it's unsupported
because it doesn't have a world-facing camera.
This is because the android.hardware.camera feature
entry in the manifest refers specifically
to a rear- or world-facing camera.
If any camera will meet your app's needs,
you'll want to use the manifest entries on screen.
Note the use of required="false" as well as camera.any.
In general, if a feature isn't absolutely
necessary for your app, it's best
to specify in your manifest it's not required.
The camera is just one example of a required feature that
could limit your app's reach.
So be sure to check out the hardware features documentation
page on developer.android.com to see
a full list of hardware features to be aware of in the Android
ecosystem.
Once we're sure that our app is available on ChromeOS devices,
we'll want to show potential users what
our app looks like on ChromeOS.
I mentioned at the beginning that I'd
cover a new capability.
And I'm happy to share that the Play Console now allows you
to upload screenshots specifically for different form
factors, like ChromeOS.
To learn more about this new functionality
and best practices for publishing
for various form factors, be sure to check out "Make
your app shine for all devices in Google Play."
That's all for today.
Thanks for watching, and be sure to check out chromeos.dev
for a wealth of detailed technical documentation,
product news, and case studies showcasing
how other Android developers optimize for Chromes.
While you're there, be sure to subscribe to the newsletter
to stay up on all the latest updates.
And lastly, remember to visit the large screen
sections of developer.android.com
and the Material Design guidelines for more resources
to help you to design a build for ChromeOS and large screens.
[MUSIC PLAYING]