Author/Chrome OS team

From the launch of our first tablet and detachable notebook to the launch of Chromebooks in new markets like Japan and Germany, we’ve worked hard to align the Chrome OS device ecosystem with the needs of today’s app users. As people increasingly use apps on larger screens or multimodal devices, developers are attracting a whole new audience to their games.

Android supports a wide variety of large-screen devices, including tablets, foldable devices, Chrome OS laptops, and more. Since Chromebooks run the full Android framework inside the container, the vast majority of Android apps can run on Chrome OS. This means developers can take their existing Android APK and extend it for Chrome OS devices to create a more immersive and engaging experience on larger screens.

The amount of time people spend using Android apps in Chrome OS has increased fourfold in the past year. In the fourth quarter of 2018, 21 percent of laptops sold in the U.S. were Chromebooks, up 23 percent from a year earlier.

13. Google Internal Data, March 2018 to March 2019.

² The NPD Group, Inc., Retail Tracking Service, U.S., Notebook Computers, Chrome OS, based on units, Oct. 8, 2017- Jan. 6, 2018 vs. Oct. 7, 2018- Jan. 5, 2019.

Providing a great experience on Chrome OS requires only a few tweaks to an existing app, but those tweaks can make a huge difference. Daily users of Gameloft’s Asphalt 8: Airborne increased sixfold after being optimized for big-screen devices, while revenue from Chrome OS devices increased nine-fold. TopHatch saw a 100% increase in conversion rates on Chromebooks and a 20-fold increase in the amount of time consumers spent on Concepts apps on Pixelbooks.

Delta Asphalt 8: the fizzy

Delta Concepts

  • Adapting Android apps to the Chrome OS ecosystem: www.youtube.com/watch?v=06x…

Optimize the app experience for Chrome OS

How users use the app depends entirely on the device they are using. You should consider the following factors to ensure that your application provides the best user experience:

Keyboard input

If your application does not already support keyboards, simply add the following code:

override fun onKeyUp(code: Int, ev: KeyEvent?) : Boolean {return when (code) {
        KeyEvent.KEYCODE_J -> {
            // Do something here
            true
        }
        else-> super.onkeyUp (code, ev) }}Copy the code

Notice that line of code where we marked “important”. Instead of ignoring them, this line of code passes the keys that have not been handled by the developer back to the parent logic.

The refresh button

Chrome OS has a unique refresh key on the keyboard and has its own key value (KEYCODE_REFRESH), so make sure your application can handle KEYCODE_REFRESH events. If you are already using SwipeRefreshLayout, Chrome OS can ensure that the layout responds to the refresh button event.

touchpad

When someone is using your app on a desktop device with a trackpad, they want to scroll with a two-finger swipe on the trackpad; But on mobile devices, users typically hold down and drag the screen to scroll. Chrome OS automatically resolves these different types of action events. For example, when a user scrolls in a drawing application, the drawing application does not let the brush paint over the screen.

For applications that require more advanced touch event handling, you can ignore MotionEvents when Event.getButtonState ()== 0 to check the state of the key and ignore unwanted events (see the drawing application example above).

NDK

Games and apps on Chrome OS will automatically get arm-x86 instructions translated. But if you want better performance, supporting x86 is critical. Most high-end Chrome OS devices are powered by 64-bit x86 chips (and more are on the way). If you want the best performance on all devices, make sure your build supports ARM, ARM64, x86, and X86_64 (if you have native code).

  • Support for 64 – bit x86 Chrome OS devices: www.chromium.org/chromium-os…

The good news is that Android Studio makes this multi-platform support easy: Just use the Android App Bundle, which packages up all the builds and sends only the pieces needed by the user’s device through the Play Store to keep the download size to a minimum.

Interface layout

If an app’s interface layout isn’t designed for a larger screen, it can be awkward to run on a larger screen — lots of wasted space and awkward navigation can confuse users. To ensure that your application performs well in multiple layouts, you can have multiple layout files for the same interface (see figure below).

△ Layout files for different screens on the same interface

Navigation mode

At the same time, your application should be easy to use in all screen sizes. Provides portrait and landscape layouts, allowing applications to switch between bottom navigation, side navigation, and side expansion navigation modes, depending on the available screen width.

  • Examples of building different navigation: github.com/google/chro…

Reply, an email app, has redesigned its functionality and layout for multiple screens. Adobe Acrobat also takes into account the layout differences between devices when adapting Chrome OS.

  • Reply ADAPTS multiple screen sizes: Material. IO/Design /mate…
△ Reply uses different navigation modes depending on the screen size

More screen

When a user uses multiple monitors, there is usually a difference in pixel density between the two screens. You can adjust the interface by listening on onConfigurationChanged in the interface to see how the pixel density changes.

Use Chromebook for development

We’ve also announced a number of new things on I/O that make Chrome OS a faster, easier, and safer development environment for Web and Android developers, including:

One-click Install of Android Studio

Just download, click, and install, no longer using Terminal.

▽ One-click Installation of Android Studio

Use ADB debugging over a USB connection

No need for developer mode, just use USB to connect to the phone for debugging.

  • Support USB ADB debugging equipment: www.chromium.org/chromium-os…

Lint check

Highlight locked or unfriendly screen orientation, non-resizable interfaces, incorrect hardware requirements, and other features that aren’t appropriate for Chrome OS.

Audio playback in Linux

The Chrome OS container supports all the audio tools for Linux, such as Audacity.

Virtual desktop

This is a feature in M76 (our current stable channel) that allows you to open a new virtual desktop when your screen is jammed with lots of Windows.

Multi-monitor/full HDCP support

Projection of drM-protected video content on an external monitor *.

  • To use this function call surfaceView.setsecure ()

ARCore

ARCore can be used for applications with a back camera.

Installation-free application

Trial app or game, no installation required.

  • Understand the Google Play free installation experience: developer. The android. Google. Cn/topic/googl…

External storage

Android apps can now access external storage connected to the device.

Play files

Chrome OS File Manager displays the Android /sdcard folder in the Play Files folder, allowing users to read and write Android files from the Chrome container.

DocumentsProvider

Chrome OS now supports the Android DocumentsProvider interface, which supports Android Cloud storage through DocumentsProvider and custom document providers.

Integrated application analysis tools

Integrated analysis tools allow developers to monitor system state over time: buffer usage, vSYNC, CPU usage, GPU and CPU frequency, and system temperature, making it easy for developers to locate the cause of animation stutter and/or system slowdowns.

Playing with apps goes far beyond mobile devices. In today’s world of more diverse devices, users expect a well-designed interface and a friendly interactive experience every time they open an app. Take advantage of the new features we’ve given you, support a wide variety of input methods, optimize layout and navigation for a wide range of screen sizes, and support x86 through native code whenever possible to create a polished and fast user experience.

Does your Android app support larger, more varied screen sizes and a wider variety of devices? Do you provide them with a high degree of completion? If you have any questions or ideas about interface and interaction adaptation, please share them in the comments section.

Click here to get your Android app on the big stage right away