Category Archives: Android Developers Blog

An Open Handset Alliance Project

Getting ready for 5G on Android

Posted by Stella Loh, Product Manager, Android 5G

Android

Getting ready for 5G on Android

Connectivity is the lifeblood that makes all of the experiences on our phones come alive, helping us connect, communicate, and express ourselves to the people that we care about. As app developers, this mission is as important now as it’s ever been. You’ve probably heard the buzz around 5G and wondered: what does this mean for my app? As we dive into Media & Games as part of this weeks' #11WeeksofAndroid, two areas where 5G offers a lot of potential, we wanted to spotlight ways for you to think about taking advantage of 5G for your app or game.

Transforming your app or game with 5G: unlocking new experiences

5G isn’t just about faster connectivity: it’s about unlocking transformative new experiences, and we want to see how you continue to push the bar.

  • Turn indoor use cases into outdoor use cases: Suddenly, everything you could only do indoors comes alive outside, like high-quality video chat and playing multiplayer games wherever you happen to be.
  • Turn photo-centric UX into video-centric or AR-centric UX: Upgrade your users’ experience by replacing photos with videos and by incorporating augmented reality into your UX.
  • Prefetch helpfully, delight rather than buffer: Use the increased bandwidth to prefetch content, further enhancing the responsiveness of your app or game.
  • Turn niche use cases into mainstream use cases: Streaming content on older networks was the exception. Make streaming content the new mainstream with 5G.

We’ve been hard at work building in support for 5G on Android, and have been working with 5G carriers starting with Verizon and AT&T in the U.S., as well as others in Europe and Asia to provide necessary Android features for app developers looking to build 5G experiences.

In addition to working with the carriers, we have been updating and adding new APIs to ensure you have all the tools you need to leverage the capabilities of 5G. First, we enhanced the functionality of our bandwidth estimation API. Then we added 5G detection capabilities, so you know when to take it up a notch. Lastly, we added a new meteredness flag from cellular carriers so you know when your user isn’t being charged for bandwidth, and can really bring it!

We’ve also added features to the Android SDK emulator to enable you to develop and test these APIs without needing a 5G device or network connection.

All of this means that 5G starts here and now. Check out our new page dedicated to 5G so you can start imagining how 5G can transform your app.

Playing nicely with media controls

Posted by Don Turner - Developer Advocate - Android Media

Android

In Android 11 we've made it easier than ever for users to control media playback. This is achieved with three related features: media controls, playback resumption and seamless transfer.

This article will explain what these features are, how they work together and how you can take advantage of them in your apps.

Media Controls

Android 11's media controls are found below the Quick Settings panel and represent a dedicated persistent space for controlling media playback.

Media

Media controls in Android 11

Part of the motivation for media controls is that users often have multiple media apps (music player, podcasts, video player etc) and regularly switch between them. Media controls display up to five current and recent media sessions in a carousel allowing the user to swipe between them.

On Android 10 and earlier, media notifications for multiple apps can occupy most of the notification area. All those control buttons can also be confusing. Moving the controls into a dedicated space means that there's more room for other notifications, and provides a more consistent user experience for controlling media apps.

Here's the comparison:

image image of screen

Android 10 media notifications (left) Android 11 media controls (right)

Displaying media controls for your app

Now, the really good news. As long as you're using MediaStyle with a valid MediaSession token (both available since Lollipop API 21), media controls will be displayed for your app automatically - no extra work for you!

In case you're not using a MediaStyle and MediaSession here's a quick recap in code:

// Create a media session. NotificationCompat.MediaStyle
// PlayerService is your own Service or Activity responsible for media playback.  
val mediaSession = MediaSessionCompat(this, "PlayerService")

// Create a MediaStyle object and supply your media session token to it. 
val mediaStyle = Notification.MediaStyle().setMediaSession(mediaSession.sessionToken)

// Create a Notification which is styled by your MediaStyle object. 
// This connects your media session to the media controls. 
// Don't forget to include a small icon.
val notification = Notification.Builder(this@PlayerService, CHANNEL_ID)
            .setStyle(mediaStyle)
            .setSmallIcon(R.drawable.ic_app_logo)
            .build()

// Specify any actions which your users can perform, such as pausing and skipping to the next track. 
val pauseAction: Notification.Action = Notification.Action.Builder(
            pauseIcon, "Pause", pauseIntent
        ).build()
notification.addAction(pauseAction)

The small icon and app name are shown in the upper left of the media controls. The actions are shown in the bottom center.

Paging

Media controls UI and corresponding Notification fields

The remaining UI fields, such as track title and playback position, are obtained from the media session's metadata and playback state.

Here's how the metadata fields map to the UI.

mediaSession.setMetadata(
    MediaMetadataCompat.Builder()
        
        // Title. 
        .putString(MediaMetadata.METADATA_KEY_TITLE, currentTrack.title)

        // Artist. 
        // Could also be the channel name or TV series.
        .putString(MediaMetadata.METADATA_KEY_ARTIST, currentTrack.artist)
        
        // Album art. 
        // Could also be a screenshot or hero image for video content
        // The URI scheme needs to be "content", "file", or "android.resource".
        .putString(
            MediaMetadata.METADATA_KEY_ALBUM_ART_URI, currentTrack.albumArtUri)
        )

        // Duration. 
        // If duration isn't set, such as for live broadcasts, then the progress
        // indicator won't be shown on the seekbar.
        .putLong(MediaMetadata.METADATA_KEY_DURATION, currentTrack.duration) // 4

        .build()
)

This screenshot shows how these metadata fields are displayed in the media controls.

metadata

Media controls UI and corresponding metadata fields

The seek bar is updated using the media session's playback state in a similar way:

mediaSession.setPlaybackState(
    PlaybackStateCompat.Builder()
        .setState(
            PlaybackStateCompat.STATE_PLAYING,
                        
            // Playback position.
            // Used to update the elapsed time and the progress bar. 
            mediaPlayer.currentPosition.toLong(), 
                        
            // Playback speed. 
            // Determines the rate at which the elapsed time changes. 
            playbackSpeed
        )

        // isSeekable. 
        // Adding the SEEK_TO action indicates that seeking is supported 
        // and makes the seekbar position marker draggable. If this is not 
        // supplied seek will be disabled but progress will still be shown.
        .setActions(PlaybackStateCompat.ACTION_SEEK_TO)
        .build()
)

This screenshot shows how these playback state fields are displayed in the media controls.

Media controls UI and corresponding playback state fields

Your media controls should now look and function perfectly!

Media resumption

Ever wanted to continue listening to a podcast, TV episode or DJ set but couldn't remember where you left off, or even the app that was playing it? Media resumption solves this problem.

There are two stages to media resumption: discovering recent media apps and resuming playback.

Discovering recent media apps

After booting, Android will look for recent media apps and ask them what their most recently played content was. It will then create media controls for that content.

To be discoverable your app must provide a MediaBrowserService, typically using the MediaBrowserServiceCompat library from Android Jetpack.

On boot, Android will call your MediaBrowserServiceCompat's onGetRoot method, so it's imperative that you return quickly. Usually you would return the root of your media tree from this method but the system also specifies the EXTRA_RECENT hint.

You should treat EXTRA_RECENT as a special case and instead return the root of a media tree that contains the most recently played media item as the first element.

The system will call your onLoadChildren method to obtain this media tree, which is a list of MediaItem objects.

Here's a diagram showing how the system and a media app interact to retrieve the most recently played item.

How the system retrieves the most recently played item from the MediaBrowserService

For the first playable media item in this list the system will create static media controls with just a play button.

static

Static media controls

At this point no media session has been created. This is to save resources - the system doesn't know whether the user actually wants to resume playing that content yet.

Resuming playback

If the user taps the play button the system will make another call to onGetRoot with the EXTRA_RECENT hint. This is so you can prepare your previously played content as before, just in case anything has changed since the static controls were created.

Android will then connect to your media session and issue a play command to it. You should override the media session onPlay callback in order to start playback of your media content and create your MediaStyle notification.

Once you post the notification the static media controls will be swapped with the media controls created from your notification.

Graphic

Figure 7: Diagram showing interaction between System UI and media app when resuming playback

Seamless media transfer

As well as being able to resume media sessions, Android 11 also allows you to easily transfer playback from one device to another. This is known as "seamless media transfer", and is done through the output switcher. The output switcher is shown in the upper right corner of the media notification that appears below.

graphic

Output Switcher (upper right corner)

The output switcher shows the name and icon of the current media route; and when you tap on it you'll see a list of media routes which this app supports.

image

Media routes available to the current app

By default, only local media routes are shown. If your app supports other media routes, such as remote playback you'll need to let the system know.

To do this add the MediaRouter jetpack library to your app.

dependencies {
    implementation 'androidx.mediarouter:mediarouter:1.2.0-alpha02'`
}

Seamless media transfer is supported from 1.2.0-alpha02.

Then, add the MediaTransferReceiver class to your Android manifest.

<receiver android:name="androidx.mediarouter.media.MediaTransferReceiver" />

Now in your app, obtain the MediaRouter singleton - this is an object that maintains the state of all currently available media routes.

router = MediaRouter.getInstance(this)

Create a MediaRouteSelector and specify the route categories which your app supports. The categories you define here determine the routes which are displayed in the output switcher.

Here we'll just specify the "remote playback" category which is used for Cast devices.

routeSelector = MediaRouteSelector.Builder() // Add control categories that this media app is interested in.
            .addControlCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK)
            .build()

If you want to support transfer from remote to local devices, you need to explicitly enable this using setTransferToLocalEnabled:

router.routerParams = MediaRouterParams.Builder().setTransferToLocalEnabled(true).build()

We can now use our selector when adding a media router callback.

router.addCallback(routeSelector, MediaRouterCallback(),
             MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);

We also supply a callback object so we can be informed of changes to media routes.

Here's the callback class:

    private class MediaRouterCallback : MediaRouter.Callback() {
        override fun onRouteSelected(
            router: MediaRouter,
            route: MediaRouter.RouteInfo,
            reason: Int
        ) {
            if (reason == MediaRouter.UNSELECT_REASON_ROUTE_CHANGED) {
                Timber.d("Unselected because route changed, continue playback")
            } else if (reason == MediaRouter.UNSELECT_REASON_STOPPED) {
                Timber.d("Unselected because route was stopped, stop playback")
            }
        }
    }

The method we override is onRouteSelected which will be called whenever a new media route has been selected.

When this happens we need to take into account the reason why it was selected.

If the existing route was disconnected (for example, bluetooth headphones were switched off) we should pause or stop playback.

If the route was actively changed, for example when switching from a phone to a Cast device, then we should continue playing the media from its previous playback position - this is the "seamless" part of "seamless media transfer" :)

Get started

To get started with media controls and related features on Android 11 take a look at the official documentation. Also be sure to check out UAMP which contains a reference implementation for many of the features mentioned in this article.

Good luck and remember to play nicely!

New language features and more in Kotlin 1.4

Posted by Wojtek Kaliciński, Developer Advocate, Android

When we adopted Kotlin as a supported language on Android, and then shifted to a Kotlin-first approach, one of the main drivers was the excitement and adoption from the developer community. As Kotlin has grown, we’ve seen continued investment in the language from JetBrains (Kotlin's creators), the open source community, and increasingly our own teams at Google.

Today we are excited to share the news about the Kotlin 1.4 release, the next milestone in the evolution of Kotlin, which contains new language features, improved compilers and tools. Below you'll find a brief rundown of some exciting new features in this release. You can read more about Kotlin 1.4 in the official announcement.

New language features

New language features introduced in Kotlin 1.4 improve the ergonomics of writing Kotlin code. Here's just one example:

SAM conversions for Kotlin interfaces

Previously, only functional interfaces (i.e. having just a Single Abstract Method - SAM) defined in the Java programming language benefited from the shorthand syntax in Kotlin:

executor.execute { println("This is shorthand for passing in a Runnable") }

In Kotlin 1.4 you can now mark your Kotlin interfaces as functional and get them to work in a similar manner by adding the fun keyword:

fun interface Transformer<T, U> {
   fun transform(x: T): U
}
val length = Transformer {
   x: String -> x.length
}

You can read more about new language features such as: mixing named and positional arguments, trailing comma, callable reference improvements, and using break and continue inside when included in loops on the Kotlin 1.4 release notes page.

Explicit API mode

One additional feature is the new Explicit API mode for authors of libraries written in Kotlin.

It enforces certain language properties of Kotlin that are normally optional, such as specifying visibility modifiers, as well as explicit typing for any public declarations, in order to prevent mistakes when designing the public API of your library. Refer to the linked documentation for instructions how to enable Explicit API mode and start using these additional checks.

Compiler improvements

The language features mentioned above are some of the most developer-facing changes in Kotlin 1.4, however the bulk of work went into improving the overall quality and performance of the Kotlin compiler.

One of the benefits all developers can take advantage of right now is the new, more powerful type inference algorithm, which is now enabled by default. It will help developers be more productive by supporting more smart-casts and cases where types can be inferred automatically.

Other than the type inference algorithm, Kotlin 1.4 also brings in optional, Alpha stability compiler backends for Kotlin/JVM and Kotlin/JS, which generate code in what's called internal representation (IR) also used in the Kotlin/Native backend.

The Kotlin/JVM IR backend is a requirement for Jetpack Compose, and Google engineers are working together with JetBrains to make it the default JVM compiler backend in the future.

That's why, even if you're not currently developing with Jetpack Compose, we encourage you to try out the new Kotlin/JVM backend, currently in alpha, and to file any issues and feature requests to the issue tracker.

To enable the new JVM IR backend, specify an additional compiler option in your Gradle build script:

kotlinOptions.useIR = true

Try Kotlin 1.4 now!

There are two steps to updating your projects and IDE to Kotlin 1.4.

First, make sure you are on the latest version of Android Studio to maximize the performance benefits and compatibility with the newest Kotlin plugin. Android Studio will prompt you when a Kotlin 1.4.0 plugin that is compatible with your IDE version is available. Alternatively, you can go to Preferences | Plugins and manually trigger the update.

Once the plugin is enabled, you can upgrade your app project to use Kotlin 1.4 by updating the Kotlin Gradle plugin version in your build.gradle scripts. Depending on how you manage your plugins, you either have to update the version in the top-level project's buildscript block:

buildscript {
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0"
    }
}

Or change the version number in the plugins block in a module level build.gradle file:

plugins {
    id 'org.jetbrains.kotlin.android' version '1.4.0'
}

Make sure to read the language changes carefully and update your project's code to ensure compatibility with the latest release. Enjoy Kotlin 1.4!

Java is a registered trademark of Oracle and/or its affiliates.

What’s new for Android game developers: August update

Posted by Greg Hartrell, Head of Product Management, Games on Android & Google Play

Android

Welcome to our latest Android games update and the start of our #11WeeksOfAndroid week focused on games, media and 5G. With all of your interest and feedback in our developer previews, tools and services, we have lots to share in our ongoing efforts to help you better understand your game’s performance, expand your reach to more devices and new audiences, and support your go-to-market with Google Play.

Get the latest updates below and follow us at @AndroidDev for additional games resources and more.

Android tools for mobile game development

  • Android Studio 4.1: We've enhanced the CPU Profiler to expose more data with an improved UI, and we've added memory visualization, startup profiling capabilities, and sampling rate configuration to our Native Memory Profiler. Additionally, you can now open the Android Studio Profilers in a standalone UI. Checkout the System Trace and Native Memory blog posts for more details, and update Android Studio today for better profiling.
  • Android Game Development Extension: For developers building games on multiple platforms with C/C++, we continue to invest in our extension for Visual Studio, including adding support for Visual Studio 2019 and launching standalone Android Studio Profilers. Sign up for the developer preview to integrate with your Visual Studio workflow.
  • Android GPU Inspector: Look into the GPU of Android devices to better understand the bottlenecks and utilize the insights to optimize the graphical performance of your game experiences. Sign up for the developer preview and stay tuned for our upcoming open beta.

Reach more devices and users

  • Android Performance Tuner: Deliver higher quality game experiences to more Android users with less effort. Measure your frame rate performance and graphical fidelity and optimise between them to achieve stable frame rates at scale across the whole Android device ecosystem. Integrate the Unity plug-in or do a custom integration. Learn more in our new session.
  • Android Game SDK: Achievieving smoother frame rates and managing input latency on Android has become even easier! Now that the Game SDK is part of Jetpack, it’s simple to integrate our gaming libraries, such as the Frame Pacing API or the Android Performance Tuner, into your game. Grab the SDK or integrate it now through Jetpack.
  • Play Asset Delivery: Improve your user experience while reducing delivery costs and the size of your game with Play Asset Delivery’s flexible delivery modes, auto-updates and delta patching. Gameloft used PAD to improve user retention, resulting in 10% more new players than with their previous asset delivery system. App bundle format will be required for all new apps starting August 2021. As part of this, we will deprecate legacy APK expansion files (OBBs), making Play Asset Delivery the standard option for publishing games over 150MB.
  • Protect game integrity and fairness with Google Play tools: Protect your game, players, and business by reducing costs fighting monetization and distribution abuse. Some partners have seen up to a 40% decrease in potential hacks and up to a 30% decrease in fraudulent purchase attempts using our integrity and commerce APIs. Express interest in the automatic integrity protection EAP.

Boost your go-to-market

  • Play Games Services - Friends: Now in open beta, help players easily find and play with friends across Android games. Millions of players have a new platform-level friends list that you can access to bootstrap and enhance your in-game friend networks and have your games surfaced in new clusters in the Play Games app. Start using Google Play Games Services - Friends in your game today.
  • Pre-registration: Boost early installs with pre-registration and day 1 auto install. Early experiments show a +20% increase in day 1 installs when using this new feature. We have also optimized our day 1 notifications to pre-registered users. Try out the new pre-registration menu in the Play Developer Console to access this feature.
  • Play store updates: We’re updating games home with a much greater visual experience, showcasing rich game graphics and engaging videos. This provides a more arcade-like browse experience helping users discover new games that match what they like to play. Learn how to optimize your store listing page with the best quality assets.
  • In-app reviews: Give users the ability to leave a review from within your game, without heading back to the app details page, using our new in-app review API, part of the Play Core Library. Learn more in our recent blog post.

Check out d.android.com/games to learn about these tools and more, and stay up to date by signing up for the games quarterly newsletter.


How useful did you find this blog post?

11 Weeks of Android: Beyond phones

Posted by Product Leads for Android TV, Android for cars, Wear OS, and Chrome OS

Android

This blog post is part of a weekly series for #11WeeksOfAndroid. Each week we’re diving into a key area of Android so you don’t miss anything. This week, we spotlighted Android Beyond Phones; here’s a look at what you should know.

With Android, people can experience the apps and services that they love across many devices & surfaces. Beyond phones, Android offers distinct yet familiar experiences on devices of all shapes and sizes, ranging from the smallest smartwatch screens, to larger displays on foldables and Chromebooks, to in-car entertainment systems, and all the way up to the largest television screens. For the past 4 days, we featured a daily deep dive into each of these exciting form factors that are providing developers with new and growing ways to engage people. Read on for a recap.

Android TV

We kicked off the week with Android TV, which is now partnering with 7 of the top 10 OEMs and over 160 television operators across the globe. The Android TV team highlighted 6 upcoming launches, like instant app trials right from Google Play and an updated Gboard, to help developers acquire more users, more easily monetize, and build even more engaging experiences. Then, new resources were published to help developers build their first Android TV app, or even go deep on new integrations like Cast Connect and frictionless subscriptions. If you’re excited about developing for TV, pick up an ADT-3, learn the latest from the training pathway, and bring your Android app to the biggest screen in the home!

Android for Cars

We shared new ways to reach more drivers on Android for cars. Android Auto, which allows you to connect your phone to your car display, is currently available with nearly every major car manufacturer and is on track to reach 100 million cars. Soon, new app categories including navigation, parking, and electric vehicle charging will be available and the experience for Android Auto users will become even more seamless as car manufacturers continue to add support for wireless connectivity. We also highlighted the launch of the first car powered by Android Automotive OS with Google apps and services built in — the Polestar 2. As more manufacturers ship cars with this embedded functionality, we’re making it even easier for developers to build media apps on Android Automotive OS with updated documentation and emulators. Get started today to bring your app to cars!

Large Screens

We covered large screens starting with the announcement of ChromeOS.dev — a dedicated resource for technical developers, designers, product managers, and business leaders. We’ve showcased our growth in device sales in Chrome OS, seeing Chromebook unit sales grew 127% year over year between March and June this year1, as well as some of the new features coming, such as customizable Linux Terminal and Android Emulator support. We’ve also continued to see growth in apps optimized for larger screen experiences, with over 1 million apps optimized for tablets and large screens available in the Google Play store. To help you develop the best-in-class apps for Chrome OS, foldables and tablets, we are continuing to release new features and updates. We released new design recommendations for your app as well as a few updates made in Android Studio. Check out the new sessions and some of the resurfaced content to learn more about bringing the best experiences to your users on these large-screen devices.

Wear OS

To round out the week, we talked about Wear OS where we are investing in the fundamentals with a focus on performance and faster app startup times, which you’ll see in the latest platform release coming in the fall. Wear OS will be launching updates to cornerstone features like Weather in the coming months, and is investing in helpful experiences, such as our recent hand-wash timer to help people maintain hand-hygiene in the Covid-19 pandemic. The team is working hard to bring the best of Android 11 to Wear OS.

Learning paths

Are you building your apps with different screen sizes and form factors in mind? Check out all the resources for Wear OS and Android for cars, and if you’re looking for an easy way to pick up the highlights of this week for Android TV and large screens, consider completing the pathway for each. These include codelabs, videos, articles and blog posts. A virtual badge is awarded to each user who passes the quiz.

We hope that you found the Android Beyond Phones week useful, and we're excited to see all the great experiences that you'll build on these platforms!

Resources

You can find the entire playlist of #11WeeksOfAndroid video content here, and learn more about each week here. We’ll continue to spotlight new areas each week, so keep an eye out and follow us on Twitter and YouTube. Thanks so much for letting us be a part of this experience with you!

Sources:
1 The NPD Group, Inc., U.S. Retail Tracking Service, Notebook Computers, based on unit sales, April–June 2020 and March–June 2020​.

11 Weeks of Android: Beyond phones

Posted by Product Leads for Android TV, Android for cars, Wear OS, and Chrome OS

Android

This blog post is part of a weekly series for #11WeeksOfAndroid. Each week we’re diving into a key area of Android so you don’t miss anything. This week, we spotlighted Android Beyond Phones; here’s a look at what you should know.

With Android, people can experience the apps and services that they love across many devices & surfaces. Beyond phones, Android offers distinct yet familiar experiences on devices of all shapes and sizes, ranging from the smallest smartwatch screens, to larger displays on foldables and Chromebooks, to in-car entertainment systems, and all the way up to the largest television screens. For the past 4 days, we featured a daily deep dive into each of these exciting form factors that are providing developers with new and growing ways to engage people. Read on for a recap.

Android TV

We kicked off the week with Android TV, which is now partnering with 7 of the top 10 OEMs and over 160 television operators across the globe. The Android TV team highlighted 6 upcoming launches, like instant app trials right from Google Play and an updated Gboard, to help developers acquire more users, more easily monetize, and build even more engaging experiences. Then, new resources were published to help developers build their first Android TV app, or even go deep on new integrations like Cast Connect and frictionless subscriptions. If you’re excited about developing for TV, pick up an ADT-3, learn the latest from the training pathway, and bring your Android app to the biggest screen in the home!

Android for Cars

We shared new ways to reach more drivers on Android for cars. Android Auto, which allows you to connect your phone to your car display, is currently available with nearly every major car manufacturer and is on track to reach 100 million cars. Soon, new app categories including navigation, parking, and electric vehicle charging will be available and the experience for Android Auto users will become even more seamless as car manufacturers continue to add support for wireless connectivity. We also highlighted the launch of the first car powered by Android Automotive OS with Google apps and services built in — the Polestar 2. As more manufacturers ship cars with this embedded functionality, we’re making it even easier for developers to build media apps on Android Automotive OS with updated documentation and emulators. Get started today to bring your app to cars!

Large Screens

We covered large screens starting with the announcement of ChromeOS.dev — a dedicated resource for technical developers, designers, product managers, and business leaders. We’ve showcased our growth in device sales in Chrome OS, seeing Chromebook unit sales grew 127% year over year between March and June this year1, as well as some of the new features coming, such as customizable Linux Terminal and Android Emulator support. We’ve also continued to see growth in apps optimized for larger screen experiences, with over 1 million apps optimized for tablets and large screens available in the Google Play store. To help you develop the best-in-class apps for Chrome OS, foldables and tablets, we are continuing to release new features and updates. We released new design recommendations for your app as well as a few updates made in Android Studio. Check out the new sessions and some of the resurfaced content to learn more about bringing the best experiences to your users on these large-screen devices.

Wear OS

To round out the week, we talked about Wear OS where we are investing in the fundamentals with a focus on performance and faster app startup times, which you’ll see in the latest platform release coming in the fall. Wear OS will be launching updates to cornerstone features like Weather in the coming months, and is investing in helpful experiences, such as our recent hand-wash timer to help people maintain hand-hygiene in the Covid-19 pandemic. The team is working hard to bring the best of Android 11 to Wear OS.

Learning paths

Are you building your apps with different screen sizes and form factors in mind? Check out all the resources for Wear OS and Android for cars, and if you’re looking for an easy way to pick up the highlights of this week for Android TV and large screens, consider completing the pathway for each. These include codelabs, videos, articles and blog posts. A virtual badge is awarded to each user who passes the quiz.

We hope that you found the Android Beyond Phones week useful, and we're excited to see all the great experiences that you'll build on these platforms!

Resources

You can find the entire playlist of #11WeeksOfAndroid video content here, and learn more about each week here. We’ll continue to spotlight new areas each week, so keep an eye out and follow us on Twitter and YouTube. Thanks so much for letting us be a part of this experience with you!

Sources:
1 The NPD Group, Inc., U.S. Retail Tracking Service, Notebook Computers, based on unit sales, April–June 2020 and March–June 2020​.

What’s happening in Wear OS by Google

Posted by Karen Ng, Director of Product and Robert Simpson, Product Manager

This blog post is part of a weekly series for #11WeeksOfAndroid. For each week, we’re diving into a key area and this week we’re focusing on Android Beyond Phones. Today, we’ll share what’s happening with Wear OS by Google.

Wearable technologies help people lead healthier lives and connect with important, timely information. Today, we're sharing our areas of investment focusing on the fundamentals, bringing even more helpful experiences to more watches, and giving users more choice in a device ecosystem.

Focusing on fundamentals

Wearables are designed to instantly connect people with what's important throughout the day. That's why we're focused on fundamentals like performance and power.

In the next OTA update coming in the fall, we’re improving performance by making it faster to access your info and start your apps. We’re simplifying the pairing process to make onboarding easier. You’ll see improvements to our SysUI for more intuitive controls for managing different watch modes and workouts. And with CPU core improvements, you’ll also see up to a 20% speed improvement in startup time for your apps.

Finally, we continue to support advancements in technology to bring new functionality, such as LTE, and expand levels of performance with the new Qualcomm® Snapdragon Wear™ 4100 and 4100+ platforms. We are excited by the kinds of wearable experiences that can be enabled in the future.

More helpful experiences

Wearables showcase important information at a glance. Some of the most used features of Wear OS by Google are hands-free timers and tracking fitness metrics. In response to COVID-19, we built a handwashing timer that helps ensure users practice good hygiene.

And later this year, you’ll see a beautiful new weather experience for Wear OS by Google. It aims to be easier to read while on the go, with an hourly breakdown of today’s weather to help you plan ahead and provide information about important weather alerts in your area.

Wearable OS image Wearable OS image Wearable OS image

We’re always imagining new ways wearables can help people stay healthy, present and connected. Stay tuned for more in 2021!

More choice than ever

We’re excited to welcome new watch OEMs to the Wear OS by Google family -- Oppo, Suunto, and Xiaomi. This means new watches that fit your style and needs -- such as the Suunto 7 with rich sports capabilities, or the new LTE watches from Oppo that will keep you connected on the go.

Bringing the best of Android to wearables

We’re also working to bring the best of Android 11 to wearables. Many of the things you’ve seen in modern Android development -- from Android Studio, a great language with Kotlin, and Jetpack libraries to make common tasks easier will be part of what you can expect as a developer building wearable apps. We’ve just released a release candidate for androidx.wear 1.1.0, and would love feedback on things you’d like to see as you get started building a wearable app.

We can’t wait to see what helpful experiences you’ll build!

ChromeOS.dev — A blueprint to build world-class apps and games for Chrome OS

Posted by Iein Valdez, Head of Chrome OS Developer Relations

This article originally appeared on ChromeOS.dev.

While people are spending more time at home than on the go, they’re relying increasingly on personal desktops and laptops to make everyday life easier. Whether they’re video-chatting with friends and family, discovering entertaining apps and games, multitasking at work, or pursuing a passion project, bigger screens and better performance have made all the difference.

This trend was clear from March through June 2020: Chromebook unit sales grew 127% year over year (YOY) while the rest of the U.S. notebook category increased by 40% YOY.1 Laptops have become crucial to people at home who want to use their favorite apps and games, like Star Trek™ Fleet Command and Reigns: Game of Thrones to enjoy action-packed adventure, Calm to manage stress, or Disney+ to keep the whole family entertained.

Device Sales YOY

To deliver app experiences that truly improve people’s lives, developers must be equipped with the right tools, resources, and best practices. That’s why we’re excited to introduce ChromeOS.dev — a dedicated resource for technical developers, designers, product managers, and business leaders.

ChromeOS.dev, available in English and Spanish (with other languages coming soon), features the latest news, product announcements, technical documentation, and code samples from popular apps. Whether you’re a web, Android, or Linux developer who’s just getting started or a certified expert, you’ll find all the information you need on ChromeOS.dev.

Hear from our experts at Google and Chrome OS, as well as a variety of developers, as they share practical tips, benefits, and the challenges of creating app experiences for today’s users. Plus, you can review the updated Chrome OS Layout and UX App Quality guidelines with helpful information on UI components, navigation, fonts, layouts, and everything that goes into creating world-class apps and games for Chrome OS.

Even better, as a fully open-source online destination, ChromeOS.dev is designed considering all the principles and methods for creating highly capable and reliable Progressive Web Apps (PWAs), ensuring developers always have quick, easy access to the information they need — even when they’re offline.

Check out a few of the newest updates and improvements below, and be sure to install the ChromeOS.dev PWA on your device to stay on top of the latest information.

New features for Chrome OS developers

Whether it’s developing Android, Linux, or web apps, every update on ChromeOS.dev is about making sure all developers can build better app experiences in a streamlined, easy-to-navigate environment.

Customizable Linux Terminal

The Linux (Beta) on Chrome OS Terminal now comes equipped with personalized features right out of the box, including:

  • Integrated tabs and shortcuts
    Multitask with ease by using windows and tabs to manage different tasks and switch between multiple projects. You can also use familiar shortcuts such as Ctrl + T, Ctrl + W, and Ctrl + Tab to manage your tabs, or use the settings page to control if these keys should be used in your Terminal for apps like vim or emacs.
  • Themes
    Customize your Terminal by selecting a theme to switch up the background, frame, font, and cursor color.
  • Redesigned Terminal settings
    The settings tab has been reorganized to make it easier to customize all your Terminal options.

Developers can now start using these and other customizable features in the Terminal app.

Android Emulator support

Supported Chromebooks can now run a full version of the Android Emulator, which allows developers to test apps on any Android version and device without needing the actual hardware. Android app developers can simulate map locations and other sensor data to test how an app performs with various motions, orientations, and environmental conditions. With the Android Emulator support in Chrome OS, developers can optimize for different Android versions and devices — including tablets and foldable smartphones — right from their Chromebook.

Deploy apps directly to Chrome OS

Building and testing Android apps on a single machine is simpler than ever. Now, developers who are running Chrome OS M81 and higher can deploy and test apps directly on their Chromebooks — no need to use developer mode or to connect different devices physically via USB. Combined with Android Emulator support, Chrome OS is equipped to support full Android development.

Improved Project Wizard in Android Studio

An updated Primary/Detail Activity Template in Android Studio offers complete support to build experiences for larger screens, including Chromebooks, tablets, and foldables. This updated option provides multiple layouts for both phones and larger-screen devices as well as better keyboard/mouse scaffolding. This feature will be available in Android Studio 4.2 Canary 8.

Updated support from Android lint checks

We’ve improved the default checks in Android’s lint tool to help developers identify and correct common coding issues to improve their apps on larger screens, such as non-resizable and portrait-locked activities. This feature is currently available for testing in Canary channel.

Unlock your app’s full potential with Chrome OS

From day one, our goal has been to help developers at every skill level create simple, powerful, and secure app experiences for all platforms. As our new reality creates a greater need for helpful and engaging apps on large-screen devices, we’re working hard to streamline the process by making Chrome OS more versatile, customizable, and intuitive.

Visit ChromeOS.dev and install it on your Chromebook to stay on top of the latest resources, product updates, thought-provoking insights, and inspiring success stories from Chrome OS developers worldwide.






Sources:
1 The NPD Group, Inc., U.S. Retail Tracking Service, Notebook Computers, based on unit sales, April–June 2020 and March–June 2020​.

ChromeOS.dev — A blueprint to build world-class apps and games for Chrome OS

Posted by Iein Valdez, Head of Chrome OS Developer Relations

This article originally appeared on ChromeOS.dev.

While people are spending more time at home than on the go, they’re relying increasingly on personal desktops and laptops to make everyday life easier. Whether they’re video-chatting with friends and family, discovering entertaining apps and games, multitasking at work, or pursuing a passion project, bigger screens and better performance have made all the difference.

This trend was clear from March through June 2020: Chromebook unit sales grew 127% year over year (YOY) while the rest of the U.S. notebook category increased by 40% YOY.1 Laptops have become crucial to people at home who want to use their favorite apps and games, like Star Trek™ Fleet Command and Reigns: Game of Thrones to enjoy action-packed adventure, Calm to manage stress, or Disney+ to keep the whole family entertained.

Device Sales YOY

To deliver app experiences that truly improve people’s lives, developers must be equipped with the right tools, resources, and best practices. That’s why we’re excited to introduce ChromeOS.dev — a dedicated resource for technical developers, designers, product managers, and business leaders.

ChromeOS.dev, available in English and Spanish (with other languages coming soon), features the latest news, product announcements, technical documentation, and code samples from popular apps. Whether you’re a web, Android, or Linux developer who’s just getting started or a certified expert, you’ll find all the information you need on ChromeOS.dev.

Hear from our experts at Google and Chrome OS, as well as a variety of developers, as they share practical tips, benefits, and the challenges of creating app experiences for today’s users. Plus, you can review the updated Chrome OS Layout and UX App Quality guidelines with helpful information on UI components, navigation, fonts, layouts, and everything that goes into creating world-class apps and games for Chrome OS.

Even better, as a fully open-source online destination, ChromeOS.dev is designed considering all the principles and methods for creating highly capable and reliable Progressive Web Apps (PWAs), ensuring developers always have quick, easy access to the information they need — even when they’re offline.

Check out a few of the newest updates and improvements below, and be sure to install the ChromeOS.dev PWA on your device to stay on top of the latest information.

New features for Chrome OS developers

Whether it’s developing Android, Linux, or web apps, every update on ChromeOS.dev is about making sure all developers can build better app experiences in a streamlined, easy-to-navigate environment.

Customizable Linux Terminal

The Linux (Beta) on Chrome OS Terminal now comes equipped with personalized features right out of the box, including:

  • Integrated tabs and shortcuts
    Multitask with ease by using windows and tabs to manage different tasks and switch between multiple projects. You can also use familiar shortcuts such as Ctrl + T, Ctrl + W, and Ctrl + Tab to manage your tabs, or use the settings page to control if these keys should be used in your Terminal for apps like vim or emacs.
  • Themes
    Customize your Terminal by selecting a theme to switch up the background, frame, font, and cursor color.
  • Redesigned Terminal settings
    The settings tab has been reorganized to make it easier to customize all your Terminal options.

Developers can now start using these and other customizable features in the Terminal app.

Android Emulator support

Supported Chromebooks can now run a full version of the Android Emulator, which allows developers to test apps on any Android version and device without needing the actual hardware. Android app developers can simulate map locations and other sensor data to test how an app performs with various motions, orientations, and environmental conditions. With the Android Emulator support in Chrome OS, developers can optimize for different Android versions and devices — including tablets and foldable smartphones — right from their Chromebook.

Deploy apps directly to Chrome OS

Building and testing Android apps on a single machine is simpler than ever. Now, developers who are running Chrome OS M81 and higher can deploy and test apps directly on their Chromebooks — no need to use developer mode or to connect different devices physically via USB. Combined with Android Emulator support, Chrome OS is equipped to support full Android development.

Improved Project Wizard in Android Studio

An updated Primary/Detail Activity Template in Android Studio offers complete support to build experiences for larger screens, including Chromebooks, tablets, and foldables. This updated option provides multiple layouts for both phones and larger-screen devices as well as better keyboard/mouse scaffolding. This feature will be available in Android Studio 4.2 Canary 8.

Updated support from Android lint checks

We’ve improved the default checks in Android’s lint tool to help developers identify and correct common coding issues to improve their apps on larger screens, such as non-resizable and portrait-locked activities. This feature is currently available for testing in Canary channel.

Unlock your app’s full potential with Chrome OS

From day one, our goal has been to help developers at every skill level create simple, powerful, and secure app experiences for all platforms. As our new reality creates a greater need for helpful and engaging apps on large-screen devices, we’re working hard to streamline the process by making Chrome OS more versatile, customizable, and intuitive.

Visit ChromeOS.dev and install it on your Chromebook to stay on top of the latest resources, product updates, thought-provoking insights, and inspiring success stories from Chrome OS developers worldwide.






Sources:
1 The NPD Group, Inc., U.S. Retail Tracking Service, Notebook Computers, based on unit sales, April–June 2020 and March–June 2020​.

ChromeOS.dev — A blueprint to build world-class apps and games for Chrome OS

Posted by Iein Valdez, Head of Chrome OS Developer Relations

This article originally appeared on ChromeOS.dev.

While people are spending more time at home than on the go, they’re relying increasingly on personal desktops and laptops to make everyday life easier. Whether they’re video-chatting with friends and family, discovering entertaining apps and games, multitasking at work, or pursuing a passion project, bigger screens and better performance have made all the difference.

This trend was clear from March through June 2020: Chromebook unit sales grew 127% year over year (YOY) while the rest of the U.S. notebook category increased by 40% YOY.1 Laptops have become crucial to people at home who want to use their favorite apps and games, like Star Trek™ Fleet Command and Reigns: Game of Thrones to enjoy action-packed adventure, Calm to manage stress, or Disney+ to keep the whole family entertained.

Device Sales YOY

To deliver app experiences that truly improve people’s lives, developers must be equipped with the right tools, resources, and best practices. That’s why we’re excited to introduce ChromeOS.dev — a dedicated resource for technical developers, designers, product managers, and business leaders.

ChromeOS.dev, available in English and Spanish (with other languages coming soon), features the latest news, product announcements, technical documentation, and code samples from popular apps. Whether you’re a web, Android, or Linux developer who’s just getting started or a certified expert, you’ll find all the information you need on ChromeOS.dev.

Hear from our experts at Google and Chrome OS, as well as a variety of developers, as they share practical tips, benefits, and the challenges of creating app experiences for today’s users. Plus, you can review the updated Chrome OS Layout and UX App Quality guidelines with helpful information on UI components, navigation, fonts, layouts, and everything that goes into creating world-class apps and games for Chrome OS.

Even better, as a fully open-source online destination, ChromeOS.dev is designed considering all the principles and methods for creating highly capable and reliable Progressive Web Apps (PWAs), ensuring developers always have quick, easy access to the information they need — even when they’re offline.

Check out a few of the newest updates and improvements below, and be sure to install the ChromeOS.dev PWA on your device to stay on top of the latest information.

New features for Chrome OS developers

Whether it’s developing Android, Linux, or web apps, every update on ChromeOS.dev is about making sure all developers can build better app experiences in a streamlined, easy-to-navigate environment.

Customizable Linux Terminal

The Linux (Beta) on Chrome OS Terminal now comes equipped with personalized features right out of the box, including:

  • Integrated tabs and shortcuts
    Multitask with ease by using windows and tabs to manage different tasks and switch between multiple projects. You can also use familiar shortcuts such as Ctrl + T, Ctrl + W, and Ctrl + Tab to manage your tabs, or use the settings page to control if these keys should be used in your Terminal for apps like vim or emacs.
  • Themes
    Customize your Terminal by selecting a theme to switch up the background, frame, font, and cursor color.
  • Redesigned Terminal settings
    The settings tab has been reorganized to make it easier to customize all your Terminal options.

Developers can now start using these and other customizable features in the Terminal app.

Android Emulator support

Supported Chromebooks can now run a full version of the Android Emulator, which allows developers to test apps on any Android version and device without needing the actual hardware. Android app developers can simulate map locations and other sensor data to test how an app performs with various motions, orientations, and environmental conditions. With the Android Emulator support in Chrome OS, developers can optimize for different Android versions and devices — including tablets and foldable smartphones — right from their Chromebook.

Deploy apps directly to Chrome OS

Building and testing Android apps on a single machine is simpler than ever. Now, developers who are running Chrome OS M81 and higher can deploy and test apps directly on their Chromebooks — no need to use developer mode or to connect different devices physically via USB. Combined with Android Emulator support, Chrome OS is equipped to support full Android development.

Improved Project Wizard in Android Studio

An updated Primary/Detail Activity Template in Android Studio offers complete support to build experiences for larger screens, including Chromebooks, tablets, and foldables. This updated option provides multiple layouts for both phones and larger-screen devices as well as better keyboard/mouse scaffolding. This feature will be available in Android Studio 4.2 Canary 8.

Updated support from Android lint checks

We’ve improved the default checks in Android’s lint tool to help developers identify and correct common coding issues to improve their apps on larger screens, such as non-resizable and portrait-locked activities. This feature is currently available for testing in Canary channel.

Unlock your app’s full potential with Chrome OS

From day one, our goal has been to help developers at every skill level create simple, powerful, and secure app experiences for all platforms. As our new reality creates a greater need for helpful and engaging apps on large-screen devices, we’re working hard to streamline the process by making Chrome OS more versatile, customizable, and intuitive.

Visit ChromeOS.dev and install it on your Chromebook to stay on top of the latest resources, product updates, thought-provoking insights, and inspiring success stories from Chrome OS developers worldwide.






Sources:
1 The NPD Group, Inc., U.S. Retail Tracking Service, Notebook Computers, based on unit sales, April–June 2020 and March–June 2020​.