Get it on Google Play تحميل تطبيق نبأ للآندرويد مجانا

Jetpack XR SDK core libraries reach beta: The next milestone for Android XR

Android Developers Blog

Posted by Amy Zeppenfeld, Developer Relations Engineer, Greg Underwood, Software Engineering Manager, Yasmine Evjen, Senior Product Manager, Android XR




Since introducing the Android XR SDK, developers have transformed their ideas into innovative, immersive experiences for XR headsets and wired XR glasses. As the ecosystem expands, you can more easily take those experiences from preview to production and reach users wherever they are.

Today, we're excited to announce that Jetpack SceneCore, ARCore for Jetpack XR, and XR Runtime have reached beta with Jetpack Compose for XR to follow soon! This means the APIs are stabilizing, making it a great time to start integrating them into your production workflows and creating for Android XR. 

Why the Jetpack XR SDK?

The Jetpack XR SDK includes all the tools and libraries you need to build immersive and augmented experiences for Android XR. Whether you're porting an existing 2D app or creating a new 3D XR app from scratch, you can do so using the familiar Android development tools you already know and love.

To support your development, this release focuses on providing the fundamental building blocks across the SDK:

What's new in Beta?

Direct feedback from the developer previews helped shape these beta releases, introducing several important API refinements to ensure these libraries are ready for production.

See the full release notes for each library to check out specific details on naming and API changes.

Get started and provide feedback

To add these dependencies, include the Google Maven repository in your project and add the newest XR libraries to your build.gradle files.

dependencies {
    implementation("androidx.xr.scenecore:scenecore:1.0.0-beta02")
    implementation("androidx.xr.arcore:arcore:1.0.0-beta02")
    implementation("androidx.xr.runtime:runtime:1.0.0-beta02")
    implementation("androidx.xr.compose:compose:1.0.0-alpha17")
}

The ecosystem of Android XR devices that power immersive experiences is expanding, ranging from XR headsets to wired XR glasses. There’s never been a better time to start building immersive experiences with the Jetpack XR SDK Beta. Dive in and start building and testing on Samsung Galaxy XR or Android XR Emulator today.

August 20th 2026, 7:27 pm

What's new in the Jetpack Compose August '26 release

Android Developers Blog

Posted by Nick Butcher, Product Manager, Jetpack Compose


Today, the Jetpack Compose August ‘26 release is stable! This release brings version 1.12 across core Compose modules (see the full BOM mapping), introducing rich visual APIs like Mesh Gradients and Wide Color Gamut (WCG) support, structural layout features like named areas in Grid, seamless integration with Android’s Credential Manager, and significant testing and performance improvements.

To update your project to today’s release, upgrade your Compose BOM version to 2026.08.00:

implementation(platform("androidx.compose:compose-bom:2026.08.00"))

Breaking Changes

AGP & Compile SDK: Compose 1.12 updates compileSdk to API 37, requiring a minimum AGP 9.1.1. As a reminder, Compose will always target the latest compileSdk. Learn more about this change here.

Modifier.onFirstVisible() is deprecated: Migrate to Modifier.onVisibilityChanged(), which provides more precise visibility threshold tracking.

Graphics

Mesh Gradients

Compose 1.12 introduces MeshGradientPainter to help you create multi-point, organic color gradients.



val rows = 1
val columns = 1

val gradientPainter = remember {
    MeshGradientPainter(rows, columns) {
        // Parameters: row, column, position, color
        setVertex(0, 0, Offset(0f, 0f), Color.Red)     // Top-Left
        setVertex(0, 1, Offset(1f, 0f), Color.Blue)    // Top-Right
        setVertex(1, 0, Offset(0f, 1f), Color.Green)   // Bottom-Left
        setVertex(1, 1, Offset(1f, 1f), Color.Yellow)  // Bottom-Right
    }
}

Box(
    modifier = modifier
        .aspectRatio(16/9f)
        .fillMaxWidth()
        .paint(gradientPainter)
)

For more information and examples, see the documentation.

Wide Color Gamut & HDR Support

Modern displays offer extended color fidelity and higher dynamic range. In Compose 1.12, full pipeline support for Wide Color Gamut (P3) and HDR rendering has been enabled across Compose graphics, paint, and shaders. Colors defined in non-sRGB color spaces (such as Display P3) are preserved through to platform rendering without color clamping. Colors will safely fall back to sRGB if they use an unsupported color space (e.g. CieXyz, CieLab, or Oklab), rely on a color space on an unsupported Android version (e.g Bt2020Hlg on Android 13 and below), or if the app is running on Android 9 (API 28) and below.

Other notable changes:

  • LayerOutsets was added to GraphicsLayer & Modifier.graphicsLayer, which you can use to increase the visual bounds of the layer beyond its measured size. Apply LayerOutsets to avoid the implicit clipToBounds behavior when the layer is promoted to an offscreen buffer.

Styles

At Google I/O, we shared our early vision for the Compose Styles API—a unified, performant way to style components. Since then, we have continued building the underlying architecture to guarantee strict type safety and predictable correctness, and to support building custom design systems.

To ensure we get this foundational layer correct, the API will remain experimental, and you can expect breaking changes.

Runtime Optimizations

Keyed SideEffect Overload

SideEffect now supports key arguments, which lets you fire one-shot side effects whenever specific keys change. This can lead to better performance compared to using a LaunchedEffect or DisposableEffect when you don’t need the coroutine or dispose block. SideEffect is up to 90% faster than LaunchedEffect and around 20% faster than DisposableEffect. Note that SideEffect runs its effect before DisposableEffect and LaunchedEffect, so use caution if migrating existing effects to this API, especially for LaunchedEffects that rely on being dispatched to start after the current frame is completed.

@Composable
fun AnalyticsTracker(userId: String, screenName: String) {
    SideEffect(key1 = userId, key2 = screenName) {
        analytics.logScreenView(userId, screenName)
    }
}

Animation

DeferredTargetAnimation has graduated out of experimental status.

Interactive Two-Stage Transitions

New composables: DeferredAnimatedContent and DeferredAnimatedVisibility allow creating delightful two-stage transitions, e.g. for predictive back gesture tracking.

Manual animation control: During a transition's deferred phase, animated properties (like scale or offset) can now be manually manipulated in real-time (e.g., tracking a swipe gesture).

Seamless handoff: Once the deferred phase ends, the transition engine takes over and performs a seamless handoff, including velocity transfer, to the automatic transition.

Shared element support: A new permitTransformDuringDeferredTransition flag in SharedContentConfig controls whether shared elements visually transform along with their parent containers during the deferred transition phase.

val state = remember { DeferredTransitionState(initialScreen) }
val transition = rememberDeferredTransition(state)

if (predictiveBackInProgress) {
    state.defer(targetScreen)
} else {
    state.animateTo(targetScreen)
}

transition.DeferredAnimatedContent(
    targetState = targetScreen,
    mutableTransformSpec = {
       MutableContentTransform {
           // Manually manipulate properties during the deferred phase
           initialContentTransform { scale = swipeProgress }
       }
    }
) { screen ->
    ScreenContent(screen)
}

Below are two demos of use cases where a gesture-driven animation is handed off to a triggered animation:



Text, Input & Platform Integrations

Editable Text Formatting

New APIs offer rich-text formatting for editable text in BasicTextField. You can now programmatically apply and manipulate inline character and paragraph formatting using SpanStyle and ParagraphStyle via the new addStyle() method inside a TextFieldBuffer scope (such as inside textFieldState.edit { ... } or an InputTransformation). Additionally, TextFieldBuffer provides getSpanStyles() and getParagraphStyles() APIs that return TrackedRange objects, allowing you to read, update, or remove applied styles. To complement formatting creation, TextFieldState now exposes a read-only textStyles property for querying active styles across ranges, while TextFieldBuffer provides originalTextStyles to inspect formatting state prior to an edit. Text formatting and custom annotations are persisted across configuration changes.

val state = rememberTextFieldState("Formatted text in Compose 1.12")

// Apply bold and color styles to a range of text
state.edit {
    addStyle(
        SpanStyle(fontWeight = FontWeight.Bold, color = Color.Blue),
        start = 0,
        end = 9
    )
}

// Query active styles from TextFieldState
val currentStyles = state.textStyles

Text Selection

A new SelectionState API provides programmatic control and observability over text selection within a SelectionContainer. Hoisting a SelectionState object via rememberSelectionState() and passing into SelectionContainer exposes selectedTexts as a reactive list of AnnotatedStrings and provides methods like selectAll(), clear(), select(TextRange), and extendSelectionByWord().

Additionally, use getSelectableTexts() to retrieve all selectable text items in layout order and select text across composables in the SelectionContainer using a global range.

@Composable
fun ProgrammaticSelectionExample() {
    val selectionState = rememberSelectionState()

    Column {
        Button(
            onClick = { selectionState.selectAll() },
            modifier = Modifier.disableSelectionClearOnTap()
        ) {
            Text("Select All")
        }

        SelectionContainer(state = selectionState) {
            Text("Text content to be selected programmatically.")
        }
    }
}

Credential Manager Integration

Compose text fields now natively integrate with Android’s Credential Manager (API 34+) via the Autofill framework (below API 34 is handled by androidx.credentialslibrary). By attaching the new credentialRequest semantics property with CredentialRequestData, text inputs can prompt passkeys, saved credentials, or sign-in requests directly within the user input flow.

@Composable
fun LoginField(textFieldState: TextFieldState) {
    val credentialData = remember {
        CredentialRequestData(
            // Specify Credential Manager request options
        )
    }

    BasicTextField(
        state = textFieldState,
        modifier = Modifier.semantics {
            credentialRequest = credentialData
        }
    )
}

Other notable changes:

  • Support for font variation settings in downloadable fonts.
  • Enabled auto-scrolling when dragging text selection beyond the viewport in SelectionContainer.
  • Added support for automatic interaction sounds (clicks and focus navigation) to Compose components, with a new SoundEffectOnInteraction composable to allow opt-out. Note that as a consequence of this change, semantics click listeners must now be called from the main thread, which may affect a small number of test cases.
  • KeyboardType now includes Date, Time, DateTime, and SignedDecimal.
  • BasicSecureTextField now uses TextObfuscationMode.System by default, while RevealLastTyped serves as an absolute override.

Layout Enhancements

Named Areas in Grid Layout

Building complex 2D layouts is now easier with named areas in the @Experimental Grid component. Rather than managing numeric column and row indices across items, you can define semantic regions in your GridConfigurationScope and position composables by area name.

@OptIn(ExperimentalGridApi::class)
@Composable
fun DashboardLayout() {
    Grid(
        config = {
            area("header", row = 0, column = 0, rowSpan = 1, columnSpan = 2)
            area("sidebar", row = 1, column = 0)
            area("content", row = 1, column = 1)
            gap(16.dp)
        }
    ) {
        HeaderSection(modifier = Modifier.gridItem(areaId = "header"))
        NavigationSidebar(modifier = Modifier.gridItem(areaId = "sidebar"))
        MainContentView(modifier = Modifier.gridItem(areaId = "content"))
    }
}
For more information, see the documentation.

Performance

As with every release, we continue to invest in Compose's performance to ensure that the framework helps you to build beautiful, performant apps. In this release we've focused on improving startup performance and are now seeing Time to Initial Display (the time it takes for an app to produce its first frame) that is comparable to Views in our benchmarks.


Testing & Tooling Upgrades

Test Synchronization

Compose 1.12 introduces new test APIs designed to reduce test execution times and eliminate flakiness during state sampling:

  • hasPendingWork: Passively checks if the UI has pending work without advancing the clock, which is ideal for manual animation loops.

  • runWithoutImplicitWait: Temporarily disables implicit synchronization when stepping through manual clock frames (e.g. animation tests).

  • @Test
    fun testAnimationStateFast() {
    
    composeTestRule.mainClock.autoAdvance = false
        
        while (composeTestRule.hasPendingWork()) {
            composeTestRule.mainClock.advanceTimeByFrame()
            composeTestRule.waitForIdle()
            
            composeTestRule.runOnUiThread {
                composeTestRule.runWithoutImplicitWait {
                    // This is most effective when querying multiple nodes in a single frame. 
                    // It prevents the redundant synchronization overhead that would 
                    // otherwise occur on every individual query.
                    val box1 = composeTestRule.onNodeWithTag("Box1").fetchSemanticsNode()
                    val box2 = composeTestRule.onNodeWithTag("Box2").fetchSemanticsNode()
                    
                    assertThat(box1.boundsInRoot.right).isAtMost(box2.boundsInRoot.left)
                }
            }
        }
    }

    Other notable changes:

    • The captureToImage API now allows you to capture a popup or dialog together with its anchor in a single bitmap.
    • Added onRootWithViewInteraction to scope Compose semantic searches to specific Android Views. This simplifies testing hybrid UIs, such as RecyclerViews, without requiring unique test tags in production code.
    • @PreviewWrapper annotations can now be applied to custom @MultiPreview classes, enabling reusable preview setups (such as custom themes) across multiple components.

    Happy Composing!

    Compose 1.12 makes app development easier and more expressive than ever, with mesh gradients, wide color gamut support, downloadable variable fonts, Credential Manager integration, and faster testing tools. As always, we value your input, so please share your feedback on these changes or what you'd like to see next on our issue tracker. Happy composing!


    August 20th 2026, 7:27 pm

    Celebrating 5 years of Jetpack Compose

    Android Developers Blog

    Posted by Rebecca Franks, Developer Relations Engineer, Nick Butcher, Product Manager, Loryn Hairston, Product Marketing Manager, Android



    Today, we officially celebrate five years since the release of Jetpack Compose 1.0. From version 1.0, announced on July 28th, 2021, to our latest 1.11 release, we’ve seen the APIs evolve significantly over the years, and we’re taking a moment to celebrate.

    When we officially announced the 1.0 release, we promised a simpler, faster, and more intuitive way to build native interfaces on Android. Looking back, it's safe to say that Compose didn’t just deliver on that promise, but also completely changed the Android ecosystem, with more than 68% of the top 1,000 apps using it in production today.

    History

    Over the last five years, Compose has grown steadily. In the early days, we explored showing you how to build layouts with the basic Box, Row, and Column. Today, we’ve expanded Compose to work not just on mobile devices, but to other form factors such as Compose for TV, WearOS, Glance for Widgets, and even display glasses with Jetpack Compose Glimmer.



    We recorded an Android Developers Backstage episode with Clara Bayarri, Engineering Lead for Jetpack, and two former leads of the team, Romain Guy and Chet Haase, along with Tor Norbye, Senior Engineering Director. In this episode, they discuss the history of Compose and the early days of development.




    Compose highlights over the years

    Looking back

    The beginnings of Compose were very different from what you know today. Two projects were happening in parallel inside the Android team.

    At the time, the Views toolkit team was thinking of unbundling the UI Toolkit into a library to help with development speed, and make it easier for developers to adopt and control updates. Meanwhile, a team was working on a novel idea to build declarative layouts by embedding XML inside Kotlin, which looked something like this:



    Those two efforts merged to produce what you know today - a fully declarative UI Toolkit that utilizes the power of a compiler plugin, runtime, and Kotlin:

    @Composable
    fun Newsfeed(stories: List<Story>) {
        LazyColumn {
            items(stories) { story ->
                Card {
                    val author = story.author
                    Image(painterResource(author.profilePhoto),
                        contentDescription = author.name)
                    Text(author.name)
                    Text(story.content)
                    if (story.hasCommentsEnabled()) {
                        for(comment in story.comments) {
                            Text(comment.mainContent)
                        }
                    }
                }
            }
        }
    }

    And you, the community, helped us very early on! Before 2021, Compose had a pre-alpha phase, which helped ensure Compose was fit to solve the problems of our developers.

    One of our favorite memories is the Android Dev Challenge. We challenged the community to build four different tasks with Compose, filling our feeds with Puppy apps, clocks, and weather apps, and giving us a ton of direct feedback that helped shape the 1.0 release.

    Compose has continued to evolve, from launching with a set of Material 2 components to now supporting Material 3 Expressive.

    Material 2 in Compose

    Material 3 Expressive in Compose

    Looking ahead

    As of today, Compose 1.11 is the latest version with 1.12 coming soon, offering so much more than 1.0, 5 years ago. This year, we introduced more adaptive APIs, such as FlexBox, Grid, MediaQuery, and Styles. These APIs let you advance to the next level of premium, adaptive UI development with Compose.

    At Google I/O 2026, we announced that we are now Compose-first, meaning that all future UI development will happen only in Compose, while the Views toolkit enters maintenance mode. Material Design is also shifting focus entirely to Compose, signaling an end to the findViewById era.

    Community is at the heart of Compose 

    Over the years, you’ve inspired us with creative examples of how you’ve used Compose, and we’d love to highlight a few more examples of where we’ve seen exciting work. JetBrains has been a great partner for Google with Compose, expanding Compose to work across platforms with Compose Multiplatform and enabling desktop, iOS, and web developers to also enjoy the benefits of Compose.

    We’ve really enjoyed following our most beloved newsletters from JetpackCompose.app’s Dispatch, AndroidWeekly, to jetc - helping Android Developers stay up-to-date with the latest in the world of Compose and Android.

    Another standout contributor is sinasamaki. They’ve created many delightful experiences using Compose, such as this fun ribbon modifier and the glitchy effect:


    Saket Narayan has also always been an inspiration when it comes to creating useful tools for Compose, such as telephoto, a library featuring support for pan and zoom gestures and automatic sub-sampling of large images, or the latest library, Touch Robot, which allows you to easily test interaction animations:

    paparazzi.gif(end = 3_000) {
      DebitCard(
        Modifier.testTag("card")
      )
    
      val touchRobot = rememberTouchRobot()
      LaunchedEffect(Unit) {
        touchRobot.onNode(hasTestTag("card")).performGesture {
          draw(
            path = createAndroidHeadPath(),
            duration = 3.seconds,
          )
        }
      }
    }
    
    /** A path drawing the Android head. */
    fun createAndroidHeadPath(bounds: Rect): Path = TODO()

    Jake Wharton, who has used Compose in innovative ways (like molecule, and even building UI with Compose for the terminal with mosaic). Chris Banes, who has built many Compose libraries over the years, with our most recent favourite - Haze for background blurring, and many of the Android Google Developer Experts like Akshay Chordiya, Huyen Tue Dao, and Katie Barnett, who’ve contributed to the success of Compose. But this is not about selecting individuals - there have been so many great contributors to the Compose codebase, and many of you continue to inspire us with your fun examples, libraries, and in-depth talks. Without the community, Jetpack Compose wouldn’t be as successful as it is today.

    Cheers to the next 5 years, and more! 

    Jetpack Compose has grown from an experimental idea into the standard for Android UI Development. Thank you to the entire Toolkit team at Google, and to the incredible global developer community that wrote libraries, filed bugs, and pushed the boundaries of what declarative UI can do.

    This week, we’ll be celebrating with some in-person birthday parties across the globe, and a live “Birthday party” on the Android Developers YouTube channel on July 30th at 13:00 UTC. During this time, we’ll hang out and discuss Compose and answer your questions!

    Cheers to the next 5 years, and happy composing!

    August 20th 2026, 7:27 pm

    Delivering safer, age-appropriate experiences on Google Play

    Android Developers Blog

    Posted by Paul Feng, VP of Product Management, Google Play




    Providing a safe online experience and protecting users from harm is a top priority at Google Play. We take this responsibility seriously and have been investing continuously to offer baseline protections on our platform while also empowering parents with the tools they need to make decisions for their families. Importantly, we also want to empower Play developers with the capabilities to deliver age-appropriate experiences based on their app's content.

    To support this, today, we are taking another big step in our ongoing partnership with parents and developers by announcing the expansion of the Google Play Age Signals API to all Play developers globally. Building on current availability in Brazil, we will expand this experience first to users in Australia and Canada by mid-August, with a full global rollout to all users later this year.

    Empowering developers to create age-appropriate experiences

    The Play Age Signals API is a privacy-preserving tool that puts parents in the driver's seat allowing them to share their child's age range (e.g. 16-17) directly with apps. It also enables adults to easily share their age when prompted by the app developer. In turn, developers receive the signals they need to tailor their own in-app safety experiences and content for users in an age-appropriate way.

    We want to give developers the ability to choose the right protections for the nature of their app. A weather app, for example, shouldn't need the same safety settings as entertainment or media apps. Rather than enforcing one-size-fits-all rules, we give developers the flexibility to choose how they integrate safety signals. With this reliable signal, you retain complete agency to tailor your app's content, features, and settings to match your audience.

    Users have a choice to share their age range in a privacy-friendly way

    Simplifying controls for parents

    Parents shouldn't have to manage complex safety settings across dozens of different apps to keep their children safe. The Play Age Signals API simplifies this by putting age-sharing controls in one place, directly inside the Google Family Link app. Parents have a choice to share their child’s age range, and if they choose to share, all Play apps that use Play Age Signals API can receive age signals. This lets children jump straight into age-appropriate content without parents having to manually configure settings inside these apps. Age ranges are never shared by default, and parents can update or turn off these settings at any time.

    Centralized and easy way to manage age sharing settings for parents via Family Link App

    Building on our broader safety tools

    The Play Age Signals API builds upon a strong foundation of established safety features and strict policies we have long enforced on Google Play. Today, we already mandate that apps designed for families meet rigorous safety standards, and we continuously review and scan applications to ensure they are safe for children. For developers, we also offer built-in tools like Restrict Minor Access in the Play Console to help them manage who can discover their apps. For parents, Google Family Link remains a trusted, central dashboard where they can manage screen-time limits, PIN-based content filters, and app download approvals.

    Expanding the Play Age Signals API globally adds a powerful new tool to our existing safety suite, helping parents and developers work together to make Google Play an even safer, more trustworthy place for families.


    August 20th 2026, 7:27 pm

    Inside Android Skills - Built for deprecation

    Android Developers Blog

    Posted by Jose Alcérreca, Developer Relations Engineer, Android Developer Relations

    We released the official Android Skills in April, and the response surpassed all our expectations. In this blog post, I'll address some of the feedback we received, explaining the philosophy and methodology behind the project. Hopefully, this will also help you understand what happens behind the scenes when you install and use skills, allowing you to make better use of tokens and your own time.

    Why are there so few official skills?

    Currently, we only consider new skills when there's a verifiable knowledge gap in state-of-the-art (SOTA) models. Put simply: you don't need to teach the model what it already knows. (Though there are a few exceptions—read on!)

    We’ve released around 20 official skills so far, and they intentionally target highly specific, fast-moving areas that standard models aren't fully grounded on yet—things like AGP 9, Navigation 3, advanced Camera APIs, and Perfetto SQL.

    What about core, more general, skills? Every installed skill injects 100–200 tokens into the baseline context of every task you start. If that skill actually activates, that count can quickly jump into the thousands. In most cases, hoarding basic skills is both counterproductive and expensive. Before installing a skill for writing basic Kotlin or Compose, consider if your LLM of choice really needs it, or if it knows those topics well enough already.

    Evaluating skills

    Before their release, each skill is tested against a comprehensive set of evals that prove that the skill delivers clear value. These evals should pass when the skill is active, and fail otherwise. Evals are to skills what integration tests are to code.

    timeout_s: 1200
    repository:
      url: [redacted - internal git repo]
      working_dir: wear_compose_m3_empty_app
    category_ids:
      - wear
    prompt: |-
      Add a horizontal pager to MainActivity.kt. Have three pages in the pager. Each page should contain
      the text "Page 1", "Page 2", and "Page 3" respectively in the center of the screen.
    commands:
      build:
        - ./gradlew assembleDebug
    acceptance_criteria:
      project_builds: true
      llm_diff_judge:
        - Must use `HorizontalPagerScaffold`.
        - Each page should use `AnimatedPage` to wrap a `ScreenScaffold`.

    Example eval that checks the correct implementation of a horizontal pager on a wear app

    At a minimum, we test the skill in Android Studio using the latest Gemini Flash model. Depending on the skill, we also ensure compatibility with other models such as Gemini Pro and other agents such as Antigravity, and third-party systems.

    All of the evals run with access to the Knowledge Base, so if the information is in the documentation, and models decide to search for it, we don't publish a skill for it.

    Using the Android Knowledge Base (Android Studio or Android CLI)

    If you develop Android apps, you should always use the Android Knowledge Base to have access to the official documentation. If you use the agent in Android Studio, it's already available as a tool, but if you use another agent, install Android CLI. Among other things, it contains the docs command, which gives your agent access to the official Android documentation. Having a single tool is much more efficient than installing hundreds of skills.

    If your model is acting overconfident, and you want it to consult the documentation more often, a very common way to motivate it is to add "Always consult the official Android documentation when dealing with Android APIs" to your AGENTS.md file or equivalent. Of course, you can also force this by asking the agent to check the documentation directly in your prompts.

    Why are pull requests disabled?

    Because our evaluation framework depends on internal infrastructure that cannot be open-sourced, we are unable to accept direct pull requests for new skills—without this infrastructure, we would have no way to re-evaluate incoming PR changes. However, we actively monitor community feedback. If you want to report a bug, suggest an optimization, or request a new official skill, please file an issue!

    When do core or basic skills make sense?

    While SOTA models generally don't need basic skills, there are some scenarios where enabling core or community-built skills adds real value. For example:

    Where can I find core skills?

    The Android community has your back. Chris Banes has a comprehensive collection of skills for Compose and Kotlin, Ivan Morgillo published a skill that audits Compose projects, and Jaewoong Eum created two on testing and performance.

    Always download skills from reputable sources! I personally wouldn't trust repositories containing dozens or hundreds of Android skills as they're probably AI-generated and untested, and they could even contain malicious or biased instructions. Also, don't install general software engineering skills blindly; a lot of them are tailored for web development.

    Goal: deprecation

    Loosely paraphrasing Karpathy: Skills of today will be in the models of tomorrow. As SOTA models keep improving, we expect skills to be obsolete, especially those built around new APIs. To figure out when to retire them, we run our evals when new models drop. If they pass, we'll keep them around for a few months until most users have transitioned over.

    August 20th 2026, 7:27 pm

    Enhance your app for the new Pixel lineup: Unveiled at Made by Google

    Android Developers Blog

    Posted by Fahd Imtiaz, Senior Product Manager, Loryn Hairston, Product Marketing Manager, and Tracy Agyemang, Product Marketing Manager, Android Developer




    Made by Google expands what's possible across the Android ecosystem. With the introduction of the Pixel 11 Pro Fold, Pixel Watch 5, and the entire Pixel family, users are moving seamlessly across diverse screen sizes, unique postures, and intelligent experiences. For you, the developer, this represents a massive opportunity: foldable users spend about 14x more than standard phone users. To help you elevate your existing experience without starting from scratch, we’re sharing our latest platform guidance alongside real-world examples from developers already putting these features into production.

    Deliver adaptive experiences across foldables and expanded displays

    The Pixel 11 Pro Fold gives your app a chance to flex its capabilities with an expanded inner display and a standard size outer screen. Building for the foldable form factor requires dropping hardcoded layout rules and designing around available window space. Leveraging Jetpack Compose APIs like Navigation 3 with Scene strategies or our newest layout APIs like Grid and FlexBox allows your layout containers to automatically wrap, span, and reflow. You can also use the experimental MediaQuery API to dynamically adapt your UI to environmental signals like foldable posture, and keyboard states.

    Building adaptively requires tracking actual app dimensions rather than physical device size, especially during split-screen and multitasking flows. Using Window Size Classes from the WindowManager library allows your layout to respect folds and hinges as natural content separators.

    For instance, Notability leveraged Material 3 Window Size Classes to create a responsive two-pane layout that transitions smoothly between folded and expanded screens. As Ryan Shea, Android Engineering Manager at Notability, shared, tracking the window itself allows their layout and canvas zoom to ensure notes stay fit to the page through every fold, rotation, or split-screen resize, noting that they wanted the app "to feel native at every size, not just stretched to fit."

    Notability’s quiz UI adapted for expanded screens

    Ensuring these transitions feel seamless also requires state preservation across configuration changes. Using ViewModel retains UI state so interactions like scroll position, form inputs, and open dialogs remain uninterrupted when transitioning between inner and outer screens.

    Taking this approach, Flo Health used Jetpack Compose state primitives, ViewModel, and Window Size Classes to make their highest-traffic user journeys resilient to rotation, fold/unfold and resizing transitions. As Aleksandr Kolodiazhnyi, Senior Android Engineer at Flo Health, shared, “Android's adaptive guidance turned what looked like a major refactor into a templated rollout," allowing them to adopt Compose primitives without a rewrite, "cutting [their] state-preservation code by roughly 30% while fixing lifecycle and analytics correctness issues that improved the app on every form factor."




    To take full advantage of the foldable form factor, leverage FoldingFeature updates to trigger posture-specific layouts. When a user partially folds their device into tabletop posture, you can split your UI automatically by placing primary controls on the lower display and main content or viewfinders on the upper display.

    Handling camera previews across foldable state changes, requires managing orientation shifts carefully. Migrating to the CameraX library ensures automatic handling of sensor rotation and display scaling across screens, while existing Camera2 codebases can also achieve stability using the CameraViewfinder library. These camera and display capabilities allow you to power dual-screen previewing and high-resolution rear camera selfies with minimal custom logic.

    Prepare your app for these form factors today by exploring our complete adaptive development guidance at Build adaptive apps.

    Bring delightful, gesture-driven experiences to the wrist

    The new Pixel Watch 5 is here, and we’ve optimized it to take advantage of the intelligent, power-efficient, touch-free convenience of Wear OS 7. Thanks to system-wide performance optimizations and a collection of new features built to help users complete tasks efficiently, you can provide rich experiences that require only a single user action to complete.

    The one-handed gestures framework provides a convenient way for users to interact with their watches without needing to touch the screen with their opposite hand. Starting with the 1.7 beta release of Compose for Wear OS 7, you can seamlessly integrate one-handed gesture control into your Wear Compose apps with simple physical inputs on the watch-wearing arm, like a double-pinch or wrist turn.

    Spotify is adopting this framework to make controlling media more effortless. By mapping Wear OS gesture events directly to the media player state, users will be able to pause or resume playback using a simple double-pinch, keeping music controls accessible even when their hands are full.


    Pause Spotify media with a pinch gesture

    Wear OS 7 also brings Live Updates directly to the wrist to surface real-time information like live sports scores, workout progress, and delivery status, which can also appear in the At-a-Glance surface on Pixel Watch 5. For example, Just Eat uses Live Updates to keep users informed on order arrival times at a glance. You can publish updates locally from your watch app or leverage phone notification bridging on supported devices to deliver real-time tracking across screens.

    Live Updates from Just Eat delivering real-time status and delivery ETAs at a glance

    You can also extend glanceable interactions across watch surfaces on Wear OS 7 by using Wear Widgets, powered by Jetpack Glance and RemoteCompose. Wear Widgets with Compose offer greater expressiveness and consistency than the old Tiles framework, and the two available widget layouts—small and large– align perfectly with the 2x1 and 2x2 formats on mobile, ensuring your designs feel cohesive across devices.

    On top of all these great new features, Wear OS 7 delivers up to a 10 percent improvement in battery life over Wear OS 6, making the Pixel Watch 5 a truly indispensable all-day companion for your users.

    To get started developing for Wear OS 7, use the new emulator, and check out all of our Wear OS resources and guidance at Build apps for the wrist with Wear OS.

    Unlock on-device intelligence with Gemini Nano 4


    Pixel 11 devices are built to run Gemini Nano 4, bringing fast, responsive, on-device intelligence to the hardware. By running AI workflows directly on device, you can offer low-latency, real-time interactions that feel instant and integrated without needing round trips to the cloud.

    Through the ML Kit GenAI Prompt API, you can send natural language requests directly to Gemini Nano on device. The model supports over 140 languages, better multimodal understanding, and much more. Build intelligent on-device features using advanced capabilities like structured output and thinking mode.

    Build smart capabilities into your app using our self-service tools and Gemini models.

    Shape the next generation of experiences for the Pixel ecosystem today

    Made by Google showcases what's possible when hardware and software evolve together, and you are at the center of that innovation. You can begin optimizing your apps today by exploring our updated adaptive guidance, creating glanceable experiences for Wear OS 7, and integrating on-device AI with ML Kit.

    To help you implement these updates even faster, you can now leverage Android skills, which provide AI-optimized instructions for agents and tools. Whether you are using Gemini in Android Studio or running the Android CLI through other agents, Android skills give your AI tools the context needed to execute complex workflows automatically. For instance, you can prompt your agent with the CameraX skill to handle camera display scaling across foldables, or use the Adaptive skill to set up dynamic Compose layouts without additional manual work.

    Take advantage of these new surfaces, accelerate your workflow with agentic tools, and share your latest builds with the Android community! Head over to developer.android.com to access full documentation, explore the Android skills GitHub repository, and start building today.







    August 20th 2026, 7:27 pm

    Media3 1.11 - What's new?

    Android Developers Blog

    Posted by Toni Heidenreich, Software Engineer, Android


    Media3 1.11 is out. Powering the vast majority of top Android media apps, this release brings new features, bug fixes, and improvements across playback, editing, and UI components. We're expanding our Jetpack Compose UI modules with customizable Player slots and easy to use defaults, interactive gestures, state observers, and short-form video preloading using PlayerPool. We also modernized the Media3 Cast integration with SystemUI Output Switcher support, introduced a new Ktor HTTP client network extension, and added new muxing utilities for Ogg and WAV files.

    Read on for key highlights, and check out the full release notes for a comprehensive list of changes.

    Playback UI and Compose

    With Android becoming Compose-first, we are continuing to expand the media3-ui-compose and media3-ui-compose-material3 modules. This update introduces more granular control over your player layout, richer interaction patterns, and deeper integration with Material3.

    Customizable Player layout

    The Material 3 Player Composable now supports dedicated content slots for topControls, centerControls, bottomControls, and errorOverlay. You can drop in your own Composables or use the ready-made defaults published in PlayerDefaults:

    Player(
      player = player,
      topControls = { PlayerDefaults.TopControls(player) },
      centerControls = { PlayerDefaults.CenterControls(player) },
      bottomControls = { PlayerDefaults.BottomControls(player) },
    )

    The Player Composable also integrates FocusRequester support, enabling seamless D-pad and keyboard navigation on Android TV, foldables, and desktop environments. 

    Example for a Composable Player with customized controls

    Gestures and playback speed control

    PlaybackSpeedState now provides a fast-forward/slow-motion API. The demo-compose app showcases this with a long-press gesture to fast-forward playback and seeking with double tap. Combined with the ProgressSlider introduced in 1.10, the Compose player UI now offers rich touch and gesture interactions out of the box.

    Short-form video preloading with PlayerPool

    For apps with sliding-window media feeds (for example, short-form vertical video), managing multiple ExoPlayer instances efficiently is a common challenge. Media3 1.11 introduces PlayerPool (in common-ktx) and rememberPooledPlayer (in ui-compose) to handle player recycling and preloading automatically.

    The new ShortFormPlayerScreen in demo-compose shows this in action, a vertically paging feed where players are pooled, preloaded, and seamlessly recycled as the user scrolls.

    MiniController

    A new MiniController Composable in media3-ui-compose-material3 provides a compact playback bar displaying the current item's title, artist, artwork, and progress alongside play/pause controls. As all our default Composables in media3-ui-compose-material3, the MiniController supports Material3 Dynamic Color integration, allowing it to automatically adapt to the user's wallpaper theme.This is ideal for persistent bottom-sheet or mini-player affordances, for example while the user browses content or during active Cast sessions.

    The Media3 MiniController showing album art, media metadata and basic controls

    Expanded state holders for metadata and errors

    We added several new reactive state holders to media3-ui-compose:

    • rememberCurrentMediaItemState – observe metadata about the currently playing item
    • rememberPlaylistState – observe the full playlist and active indices
    • rememberErrorState – track playback errors, with a matching ErrorText Composable and default ErrorOverlay in Material3

    We'll continue working on new additions and more customization options in upcoming releases. Please share your thoughts on the project issue tracker.

    Modernized Cast integration

    Media3 1.11 updates the Cast extension with programmatic configuration options and support for OS-level routing.

    CastParams and SystemUI Output Switcher

    You can now configure the Cast extension using CastParams:

    val castParams = CastParams.Builder()
      .setShowSystemOutputSwitcherOnCastButtonClick(true)
      .build()
    
    Cast.getSingletonInstance(context).initialize(castParams)

    Setting setShowSystemOutputSwitcherOnCastIconClick(true) configures the MediaRouteButton to open Android's native SystemUI Output Switcher on supported platform versions, providing a unified output picker experience.

    Reactive MediaRouteButton state in Compose

    Apps using Jetpack Compose can now easily add the Media routing button (also known as Cast button), which automatically observes the dialog state and updates accordingly. No further logic needed when used together with Media3's CastPlayer!

    @Composable
    fun TopAppBarWithCast() {
      Row {
        Text(text = "App Title")
        MediaRouteButton()
      }
    }
    Media3 media route button in an app launching the default output switcher dialog

    Core playback and session enhancements

    Eclipsa Video - HAGC dynamic HDR metadata (API 37+)

    Eclipsa Video promises a more consistent HDR experience across devices, with a consistent baseline HDR white, adaptive headroom depending on the screen and the surroundings, ensuring the creative intent is preserved on all devices.

    ExoPlayer now supports playback of the necessary HAGC (ST 2094-50) timed metadata for progressive media (MP4, Matroska). The player automatically merges HAGC metadata tracks with the associated video track and delivers the metadata out-of-band to the decoder on API 37+ devices. On older devices, ExoPlayer seamlessly falls back to providing a standard HDR playback experience without the adjustments.

    Illustration to show benefits of Eclipsa Video HDR, like more consistent color contract

    New Ktor HTTP client extension

    A new media3-datasource-ktor extension module provides KtorDataSource, backed by the Ktor HTTP stack. This offers a Kotlin-first, coroutine-friendly alternative to the existing Cronet and OkHttp data source modules.

    Asynchronous MediaSession connections

    MediaSession.Callback now includes onConnectAsync(), which lets you process controller connection attempts asynchronously — for example, to verify authorization before accepting a connection. You can return an immediate Future with Futures.immediateFuture(ConnectionResult) for the same behavior as the existing onConnect.

    override fun onConnectAsync(
      session: MediaSession,
      controller: MediaSession.ControllerInfo
    ): ListenableFuture<MediaSession.ConnectionResult> {
      return authenticateControllerAsync(controller)
    }

    Safer MediaSession defaults

    For apps that don’t override onConnect or onConnectAsync in MediaSession.Callback, the library now defaults to a more secure configuration. Specifically, session data is no longer shared by default with untrusted controllers, meaning third-party or non-system apps lacking notification access are restricted from accessing session data unless you explicitly implement these callback methods to authorize the connection.

    New Muxer implementations & container parsing

    OggMuxer and WavMuxer

    We've added two new dedicated muxers: OggMuxer for muxing OPUS and VORBIS streams into standard .ogg files, and WavMuxer for generating uncompressed and floating-point PCM .wav audio files.

    Container parsing and track references

    • MP4 Track References (tref): Mp4Muxer.addTrackReference allows linking dependent metadata or aux tracks to primary video streams.
    • Chapter Extraction: QuickTime and Nero chapter from MP4 files (.m4a, .m4b), and Matroska chapters, are now extracted as Chapter metadata entries for audiobook and podcast navigation.

    Please use the issue tracker to report any bugs, or if you have questions or feature requests. We look forward to hearing from you!

    August 20th 2026, 7:27 pm

    Bring one-handed gestures to your Wear OS app

    Android Developers Blog

    Posted by Chiara Chiappini, Developer Relation Engineer, Android Developer Relations


    One-handed gestures offer a convenient and touch-free way for users to interact with their watches, enabling them to perform key actions using only the hand on which the device is worn. 

    First introduced on Pixel Watch with Wear OS 6.1, one-handed gestures made quick interactions effortless, such as starting and stopping a timer, accepting calls, and controlling media. 

    Now, with Wear OS 7, we're expanding this functionality with a new Gestures framework that allows OEMs to map gestures to primary actions and dismissals, and an API to bring gesture control to the developer community.

    Starting with the 1.7 beta release of Compose for Wear OS, you can seamlessly integrate gesture control into your Wear Compose apps. To use this release, upgrade your Wear Compose dependency to:

    androidx.wear.compose:compose-material3:1.7.0-beta01

    Designing for one-handed interaction

    The one-handed gestures framework is designed around two primary interaction patterns that allow users to take action without touching the screen:

    These gestures are currently available on Pixel Watch 3 and newer, and the Wear OS gesture framework is available to all Wear OS device manufactures to adopt.

    Check out our new design guidance for integrating one-handed gestures into your Wear app.

    Integrating gestures with Compose on Wear OS

    To provide seamless gesture support in Wear OS 7, we are introducing a new Modifier.oneHandedGesture that you can apply to any existing interactive composable to make it gesture-aware. 

    Implementing gestures with Compose on Wear OS requires these steps:

    1. Define the gesture configuration. Start by using rememberOneHandedGestureConfiguration to define the nature of the interaction. This configuration dictates the basic behavior by providing the GestureAction (e.g. tracking a primary pinch or a dismiss wrist flick).
    2. Initialize the indicator state. Depending on your UI component, initialize a specific state object, such as OneHandedGestureClickIndicatorState for buttons or OneHandedGestureScrollIndicatorState for scrollable lists. This state is used to coordinate visual feedback between the gesture detection modifier and the visual UI indicators, seamlessly managing visibility, timing, and animations.
    3. Apply Modifier.oneHandedGesture to your interactive component. You'll pass in your configuration and state, and you’ll provide standard callbacks: onGestureAvailable to activate the visual hint when the system prepares the gesture, and onGesture to execute your action when the gesture happens.

    The following sample shows how those three steps translate into code when configuring an IconButton:


    val gestureConfig = rememberOneHandedGestureConfiguration(action = OneHandedGestureAction.Primary)
    val indicatorState = remember { OneHandedGestureClickIndicatorState() }
    val coroutineScope = rememberCoroutineScope()
    
    OutlinedIconButton(
        onClick = onPlayPauseButtonClicked,
        modifier = Modifier.touchTargetAwareSize(IconButtonDefaults.LargeButtonSize)
            .oneHandedGesture(
                gestureConfiguration = gestureConfig,
                interactionSource = interactionSource,
                onGestureLabel = "play or pause",
                onGestureAvailable = { 
                    coroutineScope.launch { indicatorState.showIndicator() } 
                },
                onGesture = onPlayPauseButtonClicked,
            ),
    ) {
        // button content goes here
        // See "Guided discovery with gesture indicators" section of this post for recommendations on adding a gesture indicator.
    }

     

    The GestureAction.Primary can also be used to scroll when the content is the end goal of the user journey, or there is a gesture actionable button off screen that the user can scroll to. Some examples include:


    val scrollGestureConfig = rememberOneHandedGestureConfiguration(action = GestureAction.Primary)
    val scrollIndicatorState = remember { OneHandedGestureScrollIndicatorState() }
    val coroutineScope = rememberCoroutineScope()
    
    TransformingLazyColumn(
        state = scrollState,
        contentPadding = contentPadding,
        modifier = Modifier
            .fillMaxSize()
            .oneHandedGesture(
                gestureConfiguration = scrollGestureConfig,
                onGestureLabel = "scroll",
                onGestureAvailable = { 
                    coroutineScope.launch { scrollIndicatorState.showIndicator() } 
                },
                onGesture = { OneHandedGestureDefaults.scrollDown(scrollState) }
            )
    ) {
        // list content goes here
        // See "Guided discovery with gesture indicators" section of this post for recommendations on adding a gesture indicator.
    }

    Guided discovery with gesture indicators

    To help users learn which gestures are available, gesture indicators work as hints to help discovery about which gestures are available on a screen.

    These hints provide animated cues that inform users where they can perform a gesture. The framework manages the cadence and appearance of these hints, ensuring that they are helpful without being intrusive. System settings let users change the cadence to something less frequent if desired.

    To integrate with hints, the API provides the following gesture indicator components:

    The following example shows how to use the OneHandedGestureClickIndicator for a Button. See another example for using the OneHandedGestureScrollIndicator in our guidance.


    val gestureConfig = rememberOneHandedGestureConfiguration(action = GestureAction.Primary)
    val indicatorState = remember { OneHandedGestureClickIndicatorState() }
    val coroutineScope = rememberCoroutineScope()
    
    OutlinedIconButton(
        onClick = onPlayPauseButtonClicked,
        modifier = Modifier.touchTargetAwareSize(IconButtonDefaults.LargeButtonSize)
            .oneHandedGesture(
                gestureConfiguration = gestureConfig,
                interactionSource = interactionSource,
                onGestureLabel = "play or pause",
                onGestureAvailable = { 
                    coroutineScope.launch { indicatorState.showIndicator() } 
                },
                onGesture = onPlayPauseButtonClicked,
            ),
    ) {
        OneHandedGestureClickIndicator(
            gestureConfiguration = gestureConfig,
            indicatorState = indicatorState,
        ) {
            val icon = if (playerUiModel.playbackState.isPlaying) Icons.Filled.Pause else Icons.Filled.PlayArrow
            Icon(icon, contentDescription = "Play or Pause")
        }
    }

    Sample app showing gesture hint for media controls

    We are already seeing early adoption of these APIs from partners like Spotify, who are using one-handed gestures to make music control more seamless on the go. By adopting the Modifier.oneHandedGesture into their Wear OS app, Spotify allows users to play or pause their music with the primary gesture action, which on Pixel Watch devices is the double-pinch gesture. This action triggers the same behavior as the physical play/pause button, and the user doesn’t  need to touch the screen.

    Spotify app with gesture integration

    Bring one-handed gestures to your app

    You can begin experimenting with one-handed gestures today in the 1.7 beta release of Compose for Wear OS.

    Ensure your app is running on Wear OS 7, which provides the underlying platform support for gesture detection. Check out our new one-handed gestures developer guide  to see how you can start building more convenient experiences for your users.

    August 20th 2026, 7:27 pm

    Tinder cuts app cold starts by 47% with new R8 Configuration Analyzer

    Android Developers Blog

    Posted by Ajesh R Pai, Developer Relations Engineer, Ulises Uriel Verduzco Diaz, Software Engineer, Tinder, and Tracy Agyemang, Product Marketing Manager


    Tinder is on a mission to power and inspire real connections by making meeting easy and fun for every new generation of singles. However, as their Android application codebase grew in size, so did its complexity. Prior to their latest optimization efforts, approximately 70% of the application was not optimized, carrying 17 dex files,including three dedicated just to startup. Although they had enabled R8, much of its optimization potential was blocked due to keep rules, and the team was unable to identify which specific rules were preventing optimization. To reduce startup time and decrease user-perceived Application Not Responding (ANR) errors, Tinder turned to the new R8 Configuration Analyzer to tackle these challenges.

    By utilizing the R8 Configuration Analyzer, Tinder successfully identified and removed unintentional optimization blockers. The results were immediate and impactful: Tinder achieved a 47% reduction in app cold starts, shrank their app download size by 28.98% (down to 61.5 MB), and reduced user-perceived ANRs by 28%.

    Configuration analyzer

    The R8 Configuration Analyzer shows R8 optimization by tracking shrinking, optimization, and obfuscation scores to show available refinement areas. It shows the broad, redundant, or obsolete keep rules, including those from external libraries so that you can analyse the keep rule impact and refine the keep rules.

    Key metrics shown in Configuration Analyzer include:

    • Shrinking Score: Code percentage available for R8 shrinking.
    • Optimization Score: Code percentage open to optimization (for example, method inlining, horizontal class merging).
    • Obfuscation Score: Percentage of classes, methods and fields that can be renamed by R8 to decrease size.

    Use the analyzer to audit keep rules and their impacts:

    • Find broad rules: Narrow the scope of package-wide rules that restrict R8 optimization, and identify the specific classes, methods, and fields excluded from shrinking, optimization, and obfuscation.
    • Refine rules: Target only specific classes/methods requiring reflection to unlock optimization
    • Remove redundant rules: Remove rules that match zero classes, methods, or fields in your current build.
    • Identical rules: Identical keep rules means rules that target the same classes, fields, and methods or duplicate declarations of keep rule in same or across keep rule files.
    • Find subsumed rules: Clean up specific rules already covered by broader configurations.
    • Identify problematic libraries: Check the combined optimization impact of merged consumer keep rules from all libraries.



    R8 Configuration Analyzer report of a sample application

    To assist you in using the R8 Configuration Analyzer with agentic tools, we have published an R8 Analyzer skill. This skill optimizes automated development workflows by summarizing the R8 Configuration Analyzer report to display key metrics: optimization, obfuscation, and shrinking scores. It also highlights the five most impactful keep rules, giving you clear insight into what blocks code optimization.

    Pinpointing hidden optimization blockers



    Prior to integrating the R8 Configuration Analyzer, Tinder's Android app suffered from significant technical debt due to a heavily unoptimized codebase. This lack of optimization directly degraded the user experience, leading to users experiencing slow cold starts

    To resolve these issues, the Tinder team utilized the R8 Configuration Analyzer to comprehensively audit their R8 configuration. The analyzer showed the R8 optimization of the codebase was around 28% even with R8 full mode. With R8 Configuration Analyzer, Tinder identified that an in-house library was introducing a broad, unscoped keep rule.

    # Prevents optimization in all public classes along with all of their public and protected members
    
    -keep public class * {
        public protected *;
    }

    This "wide" rule unintentionally covered various dependencies across the entire app, preventing optimization in a large number of classes. Because the over-inclusive rule prevented runtime crashes, developers frequently missed adding new rules for new features that used reflection, allowing hidden issues to compound over time.

    By leveraging the insights provided by the R8 Configuration Analyzer, the team successfully traced and analyzed the specific classes affected by the broad keep rule from the library. The team immediately discovered that optimization was being blocked in larger, non-dynamically invoked classes where R8 could do optimization. Refining this specific keep rule allowed Tinder to unlock substantial optimization capabilities, untangle their legacy configurations, and drastically improve their overall optimization numbers, with R8 scores increasing from 28% to 50%, driving immediate performance gains across the application, and the Tinder team is actively working to further improve this figure.

    • Faster Loading: The team achieved a 47% reduction on users experiencing slow cold starts of the app.
    • Smaller Footprint: The App download size went from 86.6MB down to 61.5 MB (28.98% decrease).
    • Improved Stability: User-perceived Application Not Responding (ANR) errors decreased from 0.35% to 0.28%, bringing them significantly closer to the peer median numbers
    • Reduced Complexity: The total number of DEX files was cut down from 17 to 11, including just two startup files.

    Beyond these technical performance enhancements, the increased application optimization directly translated into tangible business growth and higher user engagement, particularly in resource-constrained markets.

    • Regional Engagement: Countries where Low RAM devices take a huge portion of the market, presented the largest increase in engagement, and decreasing the ANR rates was key to improving engagement in this vast market.
    • Engagement Growth: Engagement has increased 3% since the increase in app optimization.


    Safeguarding future performance with continuous integration

    Addressing code minification isn't just a one-time fix; it requires continuous vigilance. Inspired by the massive gains achieved through the R8 Configuration Analyzer, Tinder’s Android team proactively integrated optimization monitoring into their daily workflow to prevent regressions.

    Tinder’s team added a new job in their CI/CD pipeline to report changes in the optimization stats so everyone can see how their contribution is affecting optimization. When advising other developers considering R8 configuration integration, the team emphasizes the importance of auditing internal dependencies. While most popular third-party libraries come with well-defined rules, internal company projects that are considered "stable" might actually be introducing wide rules that negatively impact overall optimization.

    Key Takeaways

    Faced with a heavily unoptimized codebase and a high volume of DEX files, Tinder needed a way to cleanly audit their app’s minification rules. The R8 Configuration Analyzer provided the ideal tooling necessary to identify overly broad internal library rules, the classes affected by the keep rule, allowing the team to confidently optimize their codebase. As a result, Tinder successfully cut cold starts by nearly half, shrank their APK size by over 28%, and established a healthier, more performant foundation for their users, with the team actively working to further improve these numbers.

    How to Use R8 Configuration Analyzer

    The R8 Configuration Analyzer and its standalone features can be utilized based on your current Android Gradle Plugin (AGP) version:

    • AGP 9.3 Release: The R8 Configuration Analyzer is fully integrated and released with AGP 9.3. When running an R8 release build, the report will be generated in the build/outputs/mapping/release/configanalyzer.html folder.
    • Standalone Gradle Task: AGP 9.3 introduces a standalone Gradle task that allows you to generate the analyzer report without running a full release build, providing a much faster feedback loop when refining keep rules locally:
      ./gradlew :app:analyzeReleaseR8Config
      The report is generated at build/reports/r8/r8-config-analyzer-release.html.
    • Usage on Older AGP Versions: If you are using a version below AGP 9.3, you do not need to migrate your entire AGP version to analyze your configuration. You can update the R8 version independently to 9.3.7-dev or higher by following the Replacing R8 in AGP instructions. To generate the report locally, run your build with the property specified:
      ./gradlew assembleRelease  -Dcom.android.tools.r8.dumpkeepradiushtmltodirectory=<output_directory>

    To learn more, see the R8 Configuration Analyzer documentation.

    August 20th 2026, 7:27 pm

    Preparing your app for broader memory limits

    Android Developers Blog

    Posted by Blair Harmon, Director of Product Management, Android Platform



    A great user experience is central to Android's mission, and delivering on that promise requires keeping devices fast, responsive, and reliable. This is why memory optimization is more critical than ever. Across the ecosystem, new devices are maintaining or even decreasing their physical memory capacity in response to memory price increases, yet users continue to expect the same seamless, high-performance app experience.

    In Android 17, we introduced per-app memory limits, starting with Pixel devices, to help protect the overall user experience from applications using excess memory and causing system-wide slowdowns. Over the coming year, an increasing number of manufacturers will leverage the Android per-app memory limits across their portfolio of device RAM configurations from 4GB to 16GB+ devices. If your app exceeds these limits, it will be slowed down and may be terminated. Optimizing your app's memory footprint is essential to preventing OS throttling and maintaining a seamless user experience.

    In this post, we’ll explore how these limits work under the hood, how to measure your memory footprint using new Android vitals metrics, and actionable steps to optimize your app or game.

    Understanding Memory Limits

    When your app exceeds its memory budget, Android takes progressive action to protect device responsiveness:

    1. zRAM Swapping: If your app reaches its allocated limit, the system forces your app's pages into zRAM (compressed RAM). While zRAM prevents immediate eviction, compressing and decompressing pages adds CPU overhead, which can result in noticeable UI jank and experience slowdowns.
    2. Process Termination: If your app continues to increase its memory usage beyond the zRAM threshold, it will be terminated by the system. To determine if your app session was impacted by these constraints in the field, you can call getDescription() within ApplicationExitInfo. If the system applied a limit, the exit reason is reported as REASON_OTHER and the description string will contain "MemoryLimiter:AnonSwap". You can also leverage trigger-based profiling using TRIGGER_TYPE_ANOMALY to automatically capture heap dumps when the memory limit is reached.

    To learn more about per-app memory limits and system enforcement, review the Android 17 App Memory Limits documentation. To test your application on different device configurations use the Memory Limiter adb commands.

    Monitoring and Diagnosing Memory Issues

    You can't optimize what you can't measure. Identifying memory leaks, excessive heap allocations, and Out-Of-Memory (OOM) crashes across the Android ecosystem requires leveraging complementary monitoring tools:

    • Macro-level health with Android vitals: For broad, population-level visibility without additional overhead, Google Play Console’s Android vitals provides essential metrics like Memory Usage (Anonymous RSS + swap) and Bitmap Memory Usage. This gives you a clear snapshot of memory distribution across different process states (foreground, background, user-perceived services, and cached) and RAM class ranges, helping you spot memory outliers.
    • Memory Limiter exits & OOM tracking with Firebase Crashlytics: To stay informed about severe memory degradation before it impacts your key metrics, Crashlytics version 20.1.0 introduces additional debug data to help you catch, prioritize, and fix Out-Of-Memory exceptions and memory limiter kills. Tracking these events alongside custom logs and key-value metadata gives you immediate context into process status when a memory failure occurs.
    • In-field traces with ProfilingManager: For teams able to maintain a performance observability framework, the ProfilingManager API introduced in Android 15 (API level 35) allows your app to programmatically request and collect detailed memory debug artifacts such as Java heap dumps and heap profiles directly from production devices. You can also trigger heap dump captures based on specific system signals, such as TRIGGER_TYPE_OOM and TRIGGER_TYPE_ANOMALY.

    Read our documentation to learn more about other memory monitoring techniques.

    Summary & What's Next

    With Android broadening per-app memory limits across all RAM classes, now is the time to audit your memory footprint:

    1. Prioritize memory optimizations: Prevent your app from being impacted by app memory limits by using best practices.
    2. Monitor memory use: Monitor your app’s memory behavior to detect and resolve anomalous behavior.
    3. Optimize your game: Follow the latest guidance for games and complex multimedia apps to maximize memory savings across process states.

    Helpful Resources & References

    August 20th 2026, 7:27 pm

    Optimize for Android (Go edition): Lessons from Google apps - Part 1

    Android Developers Blog

    Posted by Niharika Arora, Developer Relations Engineer

    The Android operating system brings the power of computing to everyone. This vision applies to all users, including those on entry-level phones that face real constraints across data, storage, memory, and more.
    This was especially important for us to get right because, when we first announced Android (Go edition) back in 2017, people using low-end phones accounted for 57% of all device shipments globally (IDC Mobile Phone Tracker).


    What is Android (Go edition)?

    Android (Go edition) is a mobile operating system built for entry-level smartphones with less RAM. Android (Go edition) runs lighter and saves data, enabling Original Equipment Manufacturers (OEMs) to build affordable, entry-level devices that empower people with possibility. RAM requirements are listed below, and for full Android (Go edition) device capability specifications, see this page on our site.

    Year

    2018

    2019

    2020

    2021

    2022

    2023

    Release

    Android 8

    Android 9

    Android 10

    Android 11

    Android 12

    Android 13

    Min RAM

    512MB

    512MB

    512MB

    1GB

    1GB

    2GB



    Android (Go edition) provides an optimized experience for low-RAM devices. By tailoring the configuration and making key trade-offs, we’re able to improve speed and performance for low-end devices and offer a quality phone experience for more than 250M people around the world.


    Recent Updates

    We are constantly making phones powered by Android (Go edition) more accessible with additional performance optimizations and features designed specifically for new & novice internet users, like translation, app switching, and data saving.

    Below are the recent improvements we made for Android 12:

    Faster App Launches

    Longer Battery Life 

    Easier App Sharing 

    More Privacy Control





    Why build for Android (Go edition)?

    With the fast growing & easily accessible internet, and all the features available at low cost, OEMs and developers are aiming & building their apps specifically for Android (Go edition) devices.

    Fast forward to today — over 250 million+ people worldwide actively use an Android (Go edition) phone. And also considering the big OEMs like Jio, Samsung, Oppo, Realme etc. building Android (Go edition) devices, there is a need for developers to build apps that perform well especially on Go devices.

    But the markets with the fast growing internet and smartphone penetration can have some challenging issues, such as:
    • Your app is not starting within the required time limit.
    • A lot of features/required capabilities increases your app size 
    • How to handle memory pressure while working on Go apps?


    Optimize your apps for Android (Go edition)

    To help your app succeed and deliver the best possible experience in developing markets, we have put together some best practices based on experience building our own Google apps Gboard & Camera from Google.


    Approach

    Define Metrics & breakdowns → Benchmark Metrics → Identify bottlenecks → Optimize bottlenecks → Add regression tests.        ↑_________________________________↓

    Phases

    Description

    DefineBefore starting any optimization effort, it’s important to define the goals. Key Performance Indicators (KPIs) have to be defined for the app.
    • KPIs can be common across different apps and some can be very specific. Some examples of KPIs can be  
    KPICategory
    App Startup Latency
    Common to all apps
    App Crash Rate
    Common to all apps
    End to end latency for CUJ - Camera Shot
    Specific to Camera app
    App Not Responding RateCommon to all apps
    • Once KPIs are defined the team should agree on the target thresholds. This can be derived from the minimum user experience/benchmarks in mind.
    • KPIs should ideally be defined from the perspective of balancing User Experience and technical complexity.
    BreakdownOnce KPIs are defined, the next steps could be to break down a given KPI into individual signal metrics.
    • For example → End to end latency for CUJ (shots in Camera) can be divided into → Frame capture latency, image processing latency, time spent on saving a processed image to disk etc.
    • Similarly, App Crash Rate can be bucketed into → Crash due to unhandled errors, Crash due to high memory usage, Crash due to ANR etc.
    BenchmarkBenchmark or measure the KPI values and individual metrics to identify current performance.
    If KPI targets are met, things are good. If not → identify the bottlenecks by looking at the individual breakdowns.
    Repeat the process


    After optimizing a certain bottleneck go back and benchmark the metrics again to see if the KPI targets are met. If not, repeat the process. If yes, great job!
    Add Regular regression testThat either runs for every change or in some frequency to identify regressions in KPIs. It is more difficult to debug and find sources of regressions or bugs than to not allow them to get into the codebase. Don’t allow the changes that fail the KPI goals unless the decision is to update the KPI targets.
    • Try to invest in building a regression infrastructure to deal with such issues in early stages.
    • Decide on how often tests should run? What should be the optimal frequency for your app?



    Optimize App Memory

    GBoard used the onTrimMemory() signal to trim unneeded memory while it goes in the background and there is not enough memory to keep as many background processes running as desired, for example, trimming unneeded memory usage from expressions, search, view cache or openable extensions in background. It helped them reduce the number of times being low memory killed and the average background RSS. Resident Set Size(RSS) is basically the portion of memory occupied by your app process that is held in main memory (RAM). To know more about RSS, please refer here. 
    • Check if malloc can be replaced with mmap when accessing read-only & large files: mmap is only recommended for reading a large file onto memory ('read-only memory mapped file'). The kernel has some special optimizations for read-only memory mapped files, such as unloading unused pages.
    Typically this is useful for loading large assets or ML models.
    • Scheduling tasks which require similar resources(CPU, IO, Memory) appropriately: Concurrent scheduling could lead to multiple memory intensive operations to run in parallel and leading to them competing for resources and exceeding the peak memory usage of the app. The Camera from Google app found multiple problems, ensured a cap to peak memory and further optimized their app by appropriately allocating resources, separating tasks into CPU intensive, low latency tasks(tasks that need to be finished fast for Good UX) & IO tasks. Schedule tasks in right thread pools / executors so they can run on resource constrained devices in a balanced fashion.
    • Find & fix memory leaks: Fighting leaks is difficult but there are tools like Android Studio Memory Profiler/Perfetto specifically available to reduce the effort to find and fix memory leaks.
    Google apps used the tools to identify and fix memory issues which helped reduce the memory usage/footprint of the app. This reduction allowed other components of the app to run without adding additional memory pressure on the system.

    An example from Gboard app is about View leaks
    A specific case is caching subviews, like this: 
     

    void onKeyboardViewCreated(View keyboardView) {
      this.keyButtonA = keyboardView.findViewById(...);
      ...
    }
     

    The |keyboardView| might be released at some time, and the |keyButtonA| should be assigned as null appropriately at some time to avoid the view leak.

    Lessons learned:
      • Always add framework/library updates after analyzing the changes and verifying its impact early on.
      • Make sure to release memory before assigning new value to a pointer pointing to other object allocation in heap in Java. (native backend java objects) 
    For example :
    In Java it should be ok to do
     

    ClassA obj = new ClassA("x");
    // ... something
    obj = new ClassB("y");

     
    GC should clean this up eventually.
     
    if ClassA allocates native resources underneath and doesn't cleanup automatically on finalize(..) and requires caller to call some release(..)  method, it needs to be like this 
     

    ClassA obj = new ClassA("x");
    // ... something

    // Explicit cleanup.
    obj.release();

    obj = new ClassB("y");

     
    else it will leak native heap memory. 
    • Optimize your bitmaps: Large images/drawables usually consume more memory in the app. Google apps identified and optimized large bitmaps that are used in their apps. 
    Lessons learned :
      • Prefer Lazy/on-demand initializations of big drawables.
      • Release view when necessary.
      • Avoid using full colored bitmaps when possible. 
    For example: Gboard’s glide typing feature needs to show an overlay view with a bitmap of trails, which can only has the alpha channel and apply a color filter for rendering.
     

    // Creating the bitmap for trails.

    trailBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ALPHA_8);

    ...

    // Setup paint for trails.

    trailPaint.setColorFilter(new ColorMatrixColorFilter(new ColorMatrix(new float[] {

      0, 0, 0, 0, (color >> 16) & 0xFF,

      0, 0, 0, 0, (color >> 8) & 0xFF,

      0, 0, 0, 0, color & 0xFF,

      0, 0, 0, 1, 0

    })));

    ...

    // onDraw

    @Override

    protected void onDraw(Canvas canvas) {

      super.onDraw(canvas);

      if (trailBitmap != null) {

        canvas.drawBitmap(trailBitmap, 0, 0, trailPaint);

      }

    }

     
    A screenshot of glide typing on Gboard
    • Check and only set the alpha channel for the bitmap for complex custom views used in the app. This saved them a couple of MBs (per screen size/density).
    • While using Glide, 
      • The ARGB_8888 format has 4 bytes/pixel consumption while RGB_565 has 2 bytes/pixel. Memory footprint gets reduced to half when RGB_565 format is used but using lower bitmap quality comes with a price too. Whether you need alpha values or not, try to fit your case accordingly.
      • Configure and use cache wisely when using a 3P lib like Glide for image rendering.
    • Try to choose other options for GIFs in your app when building for Android (Go edition) as GIFs take a lot of memory.
    • The aapt tool can optimize the image resources placed in res/drawable/ with lossless compression during the build process. For example, the aapt tool can convert a true-color PNG that does not require more than 256 colors to an 8-bit PNG with a color palette. Doing so results in an image of equal quality but a smaller memory footprint. Read more here.
    • You can reduce PNG file sizes without losing image quality using tools like pngcrush, pngquant, or zopflipng. All of these tools can reduce PNG file size while preserving the perceptive image quality.
    • You could use resizable bitmaps. The Draw 9-patch tool is a WYSIWYG editor included in Android Studio that allows you to create bitmap images that automatically resize to accommodate the contents of the view and the size of the screen. Learn more about the tool here

    Recap

    This part of the blog outlines why developers should consider building for Android (Go edition), a standard approach to follow while optimizing their apps and some recommendations & learnings from Google apps to improve their app memory and appropriately allocate resources.

    In the next part of this blog, we will talk about the best practices on Startup latency, app size and the tools used by Google apps to identify and fix performance issues.

    September 8th 2022, 1:06 pm

    #WeArePlay | Meet Sam from Chicago. More stories from Peru, Croatia and Estonia.

    Android Developers Blog

    Posted by Leticia Lago, Developer Marketing

    A medical game for doctors, a language game for kids, a scary game for horror lovers and an escape room game for thrill seekers! In this latest batch of #WeArePlay stories, we’re celebrating the founders behind a wonderful variety of games from all over the world. Have a read and get gaming! 


    To start, let’s meet Sam from Chicago. Coming from a family of doctors, his Dad challenged him to make a game to help those in the medical field. Sam agreed, made a game and months later discovered over 100,000 doctors were able to practice medical procedures. This early success inspired him to found Level Ex - a company of 135, making world-class medical games for doctors across the globe. Despite his achievements, his Dad still hopes Sam may one day get into medicine himself and clinch a Nobel prize.


    Next, a few more stories from around the world:

    • Vladimir, Tomislav and Boris from Croatia - founders of Pine Studio. They won the Indie Games Festival 2021 with their game Cats In Time. 

    • Kelly, Mikk, Reimo and Madde from Estonia - founders of ALPA kids. Their language games for children have a huge impact on early education and language preservation.

    Check out all the stories now at g.co/play/weareplay and stay tuned for even more coming soon.


    How useful did you find this blog post?


    September 7th 2022, 1:26 pm

    Privacy Sandbox: Developer Preview 5 is here!

    Android Developers Blog

    Posted by Fred Chung, Android Developer Relations

    Today, we’re releasing the Privacy Sandbox on Android Developer Preview 5 ‒ it’s a major milestone that will become the foundation for upcoming Privacy Sandbox Beta releases.

    We appreciate that many of you have tested the Developer Preview and have reported issues and shared your feedback. This feedback has helped us evolve the Privacy Sandbox design. For example, we have modified the SDK Runtime design to allow reflection API usage, and have published additional design proposals on FLEDGE services, mediation, and app-to-web measurement.

    Let’s have a look at the specifics in this release.



    What’s in Developer Preview 5?

    Developer Preview 5 includes additional functionality, data validation enhancements, and API signature changes across the privacy preserving APIs and the SDK Runtime. See the release notes for details.


    Attribution Reporting API



    FLEDGE on Android API

    • To provide up-to-date data for auctions, you can set up a daily fetch URL to update custom audience AdData lists and other metadata.
    • This release incorporates various API signature changes and additional parameter validation to ensure robustness. Refer to the release notes for details. Be sure to update the sample code and your test projects using previous Developer Preview releases.


    SDK Runtime

    • Apps get additional control on runtime enabled SDK lifecycle events, such as when the SDK is unexpectedly terminated by the platform. Implementing the SdkSandboxLifecycleCallback allows the app to take appropriate actions to recover.
    • After successfully loading an SDK, apps now have access to an IBinder interface to facilitate 2-way communications with the runtime-enabled SDK.


    Topics API

    • Updated taxonomy for classification of mobile apps.


    AdServices permissions

    • App developers must now declare AdServices permissions to access the privacy preserving APIs. Learn more.

    In the coming months, we’ll continue to use the Developer Previews to innovate and implement new features. We’ll publish more details about the Beta and these future releases in the coming months.


    Get started with Developer Preview 5

    With today’s Developer Preview release, we hope to continue working with the industry and developers to get prepared for Privacy Sandbox on Android. The release provides the resources you need to begin early testing of features and share feedback. To get started developing, see instructions to set up the SDK and system images on the emulator or supported Pixel devices.

    For more information on the Privacy Sandbox on Android Developer Preview, visit the developer site and sign up for our newsletter to receive regular updates.

    September 7th 2022, 1:26 pm

    Announcing the new guide to Android app modularization

    Android Developers Blog

    Posted by Miłosz Moczkowski, Developer Relations Engineer, Android

    As your app grows in size and complexity, it becomes increasingly difficult to manage, build and scale. One way to address this challenge is a software technique called modular programming, or modularization in short. It’s a practice of organizing a codebase into loosely coupled and independent entities - modules.

    We know that modularization has been a hot topic among the Android developers community for quite some time now. Recently, we ran a survey to ask you about your experiences in this topic. 86% of developers said that they work on multi-module codebases regularly, while over 90% stated that modularization is a practice they would recommend considering.

    All large apps are fundamentally modular, and at Google, we’ve been utilizing modularization to develop our most popular applications such as YouTube, Play Store or Google News. This is what Google News team has to say about this practice:

    “Modularity of code is critical to managing complexity, stability, readability, and testability in an ever-growing codebase.”

    On the other hand though, over 54% responders mentioned that it’s difficult to find good learning materials on this topic and almost 95% claimed that currently available materials on developer.android.com are insufficient! In response to this popular demand, we’ve launched the guide to Android app modularization. The guide is split into two parts. The overview page gives you a high level, theoretical overview of the matter and addresses the following questions:
    The common modularization patterns page dives deep into practical examples in the context of the modern Android architecture and gives answer to the these problems:

    To see modularization in action, check out the Now in Android project. It's a fully functional app which has a multi-module codebase, and there's a handy modularization learning journey which outlines what the modules do and how they communicate with each other.

    Is this for you?


    This modularization guide is targeted to intermediate and advanced developers. The guide focuses on modularization from a software architecture point of view. If you’re a beginner, only starting your Android developer journey, you should familiarize yourself with our guide to app architecture first. Modularization guide assumes you are familiar with our recommended app architecture.

    It’s just a beginning


    We’re not done yet. With modularization being such a wide topic, the two recently released pages are only a beginning. Help us shape the guidance by giving us feedback and telling us which issues you want us to cover. You can find us on social media or use the documentation issue tracker to report bugs.

    September 6th 2022, 1:51 pm

    Google Play announces the winners of the Indie Games Festival and the Accelerator class of 2022

    Android Developers Blog

    Posted by Patricia Correa, Director, Global Developer Marketing

    Today, at the finals of our Indie Games Festival, thousands of people came together to celebrate the passion, creativity and innovation of small games studios.

    Players, jury members, and industry experts attended the event - hosted in a custom virtual world - where they discovered the finalist games and met the people who made them. They were also the first to find out who the winners are, who will receive prizes and promotions that will help them boost their visibility.

    At the event we also announced the studios selected to join our Indie Games Accelerator. These companies will receive exclusive education and mentorship over a 10-week virtual program, to help them build and grow successful businesses.

    Please join us in congratulating each of the winning games and studios.

    Meet the festival winners

    Europe

    Dungeons of Dreadrock by Christoph Minnameier, from Germany
    Please, Touch The Artwork by Thomas Waterzooi, from Belgium
    Quadline by Ivan Kovalov, from Ukraine

    Check out the European winning games and Top 10 on Google Play


    South Korea

    Dungeon Log: Legendary Adventurer by Giant Dice
    Lost Page - The Beginning of the Bridle by Gpicrew
    The Greater by IM GAME

    Users' Choice Award:
    Nyang Tower: Square Logic by Studio Box Cat

    Check out the South Korean winning games on Google Play

    Japan

    Catastrophe Restaurant by Zxima.llc
    RASPBERRY MASH by IGNITION M
    SOULVARS by ginolabo


    Indie Games Accelerator | Class of 2022

    Americas

    Asantee Games - Brazil
    Fiveamp Hawaii - US
    MegaJogos - Brazil
    Niebla Games - Chile
    Northern Forge Studios - Canada
    SHD Games Inc. - Canada
    Skyborne Games Inc. - US
    Solaris Mobile - Brazil
    Starling Team - Brazil
    Temple Gates Games - US
    Asia Pacific

    Drakemount - South Korea
    Eternal Dream Studio - Indonesia
    Gambir Studio - Indonesia
    Hoit Studio - South Korea
    Ranida Games - Philippines
    Rigged Box Softworks - Indonesia
    SweatyChair - Australia
    The Sane Studio - South Korea
    THEAND COMPANY - South Korea
    Vnstart LLC - Vietnam
    Europe, Middle East & Africa

    Alcore Games - Ukraine
    Appox AB - Sweden
    Hammurabi Games - Turkiye
    JE Software AB - Sweden
    LoopyMood - Ukraine
    PocApp Studios AB - Sweden
    Rarepixels Indie Games - Spain
    Rikzu Games - Portugal
    Rojeh Maher - Egypt
    Štěpán Fiala - Prague


    Didn’t make it?

    If you missed the event or would like to explore further, you can still log in to the virtual world and discover more about the finalists. Available for a limited time only. Explore now.

    Stay tuned for more programs helping small games companies grow on Google Play.



    How useful did you find this blog post?

    September 4th 2022, 7:42 pm

    CameraX 1.2 is now in Beta

    Android Developers Blog

    Posted by Donovan McMurray, CameraX Developer Relations Engineer

    As part of Android Jetpack, the CameraX library makes complex camera functionality available in an easy-to-use API, helping you create a best-in-class experience that works consistently across Android versions and devices. As of today, CameraX version 1.2 is officially in Beta. Update from version 1.1 to take advantage of the latest game-changing features: our new ML Kit integration, which can reduce your boilerplate code when using ML Kit in a CameraX app, and Zero-Shutter Lag, which enables faster action shots than were previously possible.

    These two advanced features are simple to implement with CameraX 1.2, so let’s take a look at each of them in depth.

    ML Kit Integration

    Google’s ML Kit provides several on-device vision APIs for detecting faces, barcodes, text, objects, and more. We’re making it easier to integrate these APIs with CameraX. Version 1.2 introduces MlKitAnalyzer, an implementation of ImageAnalysis.Analyzer that handles much of the ML Kit setup for you.


    You can use MlKitAnalyzer with both cameraController and cameraProvider workflows. If you use the cameraController.setImageAnalysisAnalyzer() method, then CameraX can also handle the coordinates transformation between the ML Kit output and your PreviewView.

    Here’s a code snippet using setImageAnalysisAnalyzer() to set a BarcodeScanner on a cameraController to detect QR codes. CameraX automatically handles the coordinate transformations when you pass COORDINATE_SYSTEM_VIEW_REFERENCED into the MlKitAnalyzer. (Use COORDINATE_SYSTEM_ORIGINAL to prevent CameraX from applying any coordinate transformations.)

    val options = BarcodeScannerOptions.Builder()

      .setBarcodeFormats(Barcode.FORMAT_QR_CODE)

      .build()

    val barcodeScanner = BarcodeScanning.getClient(options)


    cameraController.setImageAnalysisAnalyzer(

      executor,

      new MlKitAnalyzer(List.of(barcodeScanner),

        COORDINATE_SYSTEM_VIEW_REFERENCED,

        executor, result -> {

          // The value of result.getResult(barcodeScanner)

          // can be used directly for drawing UI overlay.

        }

      )

    )



    Zero-Shutter Lag

    Have you ever lined up the perfect photo, but when you click the shutter button the lag causes you to miss the best moment? CameraX 1.2 offers a solution to this problem by introducing Zero-Shutter Lag.

    Prior to CameraX 1.2, you could optimize for quality (CAPTURE_MODE_MAXIMIZE_QUALITY) or efficiency (CAPTURE_MODE_MINIMIZE_LATENCY) when calling ImageCapture.Builder.setCaptureMode(). CameraX 1.2 adds a new value (CAPTURE_MODE_ZERO_SHOT_LAG) that reduces latency even further than CAPTURE_MODE_MINIMIZE_LATENCY. Note: for devices that cannot support Zero-Shutter Lag, CameraX will fallback to CAPTURE_MODE_MINIMIZE_LATENCY.

    We accomplish this by using a circular buffer of photos. On image capture, we go back in time in the circular buffer to get the frame closest to the actual press of the shutter button. No DeLorean needed. Great Scott!

    Here’s an example of how this works in a CameraX app with Preview and ImageCapture use cases:


    1. Just like any other app with a Preview use case, CameraX sends images from the camera to the UI for the user to see.
    2. With Zero-Shutter Lag, CameraX also sends images to a circular buffer which holds multiple recent images.
    3. When the user presses the shutter button, there is inevitably some lag in sending the current camera image to your app. For this reason, Zero-Shutter Lag goes to the circular buffer to fetch an image.
    4. CameraX finds the photo in the circular buffer closest to the actual time when the user pressed the shutter button, and returns that photo to your app.
    There are a few limitations to keep in mind with Zero-Shutter Lag. First, please be mindful that this is still an experimental feature. Second, since keeping a circular buffer of images is computationally intensive, you cannot use CAPTURE_MODE_ZERO_SHOT_LAG while using VideoCapture or extensions. Third, the circular buffer will increase the memory footprint of your app.


    Next steps


    Check our full release notes for CameraX 1.2 for more details on the features described here and more! If you’re ready to try out CameraX 1.2, update your project’s CameraX dependency to 1.2.0-beta01 (or the latest version at the time you’re reading this).

    If you would like to provide feedback on any of these features or CameraX in general, please create a CameraX issue. As always, you can also reach out on our CameraX Discussion Group.

    September 4th 2022, 7:42 pm

    Celebrating 5 years of Kotlin on Android

    Android Developers Blog

    Posted by Márton Braun, Developer Relations Engineer

    Five years ago, at the 2017 Google I/O Keynote, we did something we had never done before: we announced official support for a new programming language to build Android apps with: Kotlin. It was great to see how excited the Android developer community was about this announcement.


    Since then, JetBrains and Google have been collaborating around the development of Kotlin, and the Kotlin Foundation was co-founded by the two companies.

    As highlighted in those initial I/O announcements, Kotlin is interoperable, mature, production-ready, and open source. It also has outstanding IDE support, as JetBrains develops both the language and its tooling.

    Now, five years have passed since the original announcement. To celebrate the amazing language that now powers modern Android app development, we’re taking a quick look at the journey of Kotlin on Android. This post includes quotes from a handful of people who were involved in making Kotlin on Android a success, who are joining us for this celebration.

    Early years

    The Kotlin adoption story started before official support from Google, within the Android developer community. The excitement in the community was one of the main reasons to invest in official support.
    “The decision by Google to add support for Kotlin, I think we underestimate how wild of a notion that was at the time. The odds of another company that size making a similar decision based on community support and enthusiasm is very low.“ (Christina Lee, Android engineer at Pinterest, Kotlin and Android GDE)

    After the 2017 announcement, Android Studio started shipping with built-in support for Kotlin. Lots of documentation and samples were updated to use Kotlin.

    In 2018, we launched the Android KTX libraries, which provide Kotlin-friendly extensions wrapping the APIs of the Android framework and several AndroidX libraries. Tooling improved further, too, with Kotlin-specific live templates, lint checks, and optimizations in R8 and ART. The reference documentation for Android was also published in Kotlin for the first time.


    Going Kotlin-first

    At Google I/O 2019, we committed to Kotlin-first Android development, further increasing our investments in the language.
    “If you look at a Kotlin new users graph, you immediately notice the two most significant spikes – one in May 2017 and another in May 2019. We have an inside joke about it: ‘Marketing a programming language is easy. All you have to do is make the largest operating system in the world call it an official language during the annual keynote’” (Egor Tolstoy, Kotlin Product Lead at JetBrains)

    Being Kotlin-first means that we now design our documentation, samples, training content, new libraries and tools for the Kotlin language first, while still supporting users of the Java programming language.

    ”Now when we want to start a Jetpack Library, we are writing it in Kotlin unless we have a very, very, very good reason not to do that. It’s clear that Kotlin is the first-class language.” (Yigit Boyar, early proponent of Kotlin within Google, currently leading the development of a handful of Jetpack libraries)


    Some examples of Kotlin-first Jetpack libraries are Paging 3 and DataStore, which are both powered by coroutines and Flows for asynchronous operations.


    Jetpack Compose, Android’s modern UI toolkit is our greatest commitment to Kotlin so far, as it’s Kotlin-only. It’s powered by a Kotlin compiler plugin, and it makes extensive use of advanced language features like coroutines, top-level functions, and trailing lambdas.

    “Kotlin is here to stay and Compose is our bet for the future. Right now, for developers that are starting to learn Android, we’re already recommending the Android Basics with Compose course.” (Florina Muntenescu, Jetpack Compose developer relations lead)


    Kotlin beyond Android

    Even though Kotlin is a great fit for Android, it’s a general-purpose language and not solely for use on Android. For teams within Google, Kotlin is now generally available to use for both Android and server-side projects. Thousands of Google engineers are writing Kotlin code, and our internal codebase contains more than 8.5 million lines of Kotlin code to date. This number has been increasing rapidly as well, doubling year over year.
    “We’ve been working to bring Kotlin to Google engineers for the last few years by adding Kotlin support to all the tools they use. This includes the build system, static analysis tools, libraries and APIs. We’ve talked a lot about encouraging developers to use Kotlin for Android app development, and we strongly encourage using Kotlin for server-side development as well.” (Kevin Bierhoff, lead of the Kotlin at Google team, which supports Google engineers writing Kotlin code)

    gRPC Kotlin and Kotlin for protocol buffers are examples of Kotlin projects Google uses both in Android apps and on servers that have been open sourced and are now receiving community adoption and contributions. Kotlin is also supported on Google Cloud.


    Collaboration with JetBrains

    There is close collaboration between JetBrains and Google around the development of Kotlin. The Kotlin Foundation was co-founded by the two companies, and it ensures that the language and ecosystem age well.

    Google engineers have also been working on improving the compiler and on creating important tooling for the language.
    “My team is helping JetBrains with rewriting the Kotlin compiler right now, and we also work on Kotlin Symbol Processing, which is the first compiler-related Kotlin project that’s been completely done at Google. We work more closely with JetBrains than some other parts of Google." (Jeffrey van Gogh, member of the Kotlin Foundation, lead of the Kotlin engineering team at Google)

    JetBrains and Google also coordinate new releases of the language and the accompanying tooling so that developers are able to use the latest releases as smoothly as possible.
    “The collaboration gets stronger over time, and I’m really excited to see its impact on Kotlin’s future. Our coordinated pre-release checks are getting better and better." (Liliia Abdulina, Kotlin QA team lead at JetBrains)


    Learn more and share your own stories

    You can read more stories about Kotlin from our interviewees in the accompanying Medium post. We’d also love to hear your stories of learning and adopting Kotlin for Android development! Share them on social media using the hashtag #Hi5KotlinOnAndroid!

    Finally, let’s appreciate these kind words about Kotlin’s accomplishments to conclude our story.

    “Technology can really change people's lives and it can really make people happier at work. We normally focus on ‘there's null safety’ or ‘there's type inference’ or all these other technical parts. But when you take a step back, there's a whole story in there about all of the people who had their passion for coding ignited or reignited because Kotlin is such a wonderful language. It's just so impressive that the team is able to do what they're able to do and that the community is as good as it is." (Christina Lee, Android engineer at Pinterest, GDE for Android and Kotlin)

    Have a nice Kotlin on Android!

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

    September 4th 2022, 7:42 pm

    Precise Improvements: How TikTok Enhanced its Video Social Experience on Android

    Android Developers Blog

    Posted by The Android Developer Relations team

    TL;DR


    TikTok serves a wide range of user groups. With users around the world, it’s inevitable that some of them experience network issues such as slow, intermittent, or expensive connectivity. Other users are using entry level devices with limited memory and storage. Ensuring an excellent app experience in all these scenarios is paramount. TikTok's team was able to significantly improve their overall performance by following Android’s performance guidance, and employing their deep understanding of development tools such as Android Gradle Plugin and Jetpack libraries. If you want to learn how the TikTok team improved their app experience to achieve better business performance, please read our business article here.

    Intro


    TikTok is one of the most popular community-driven entertainment platforms with 1 billion people across the globe publishing and browsing video content every day.

    A diverse user base naturally means diverse network bandwidth conditions and devices with different screen sizes, available memory and processing power. All users want a smooth, responsive app experience, no matter which device they use. If the app is slow to load, or playback gets stuck, users will feel frustrated and might abandon the app altogether. To avoid issues like these, the TikTok team continuously tracks the overall app performance through ongoing data monitoring, peer benchmarks, and user surveys.

    TikTok is constantly introducing new features. But a rapid increase in functionality sometimes leads to an upsurge in technical requirements. The engineering team identified three reasons that slowed down the app : janky frames, video playback lag, and network issues. To solve these issues, the TikTok team looked to Android tools to start their app improvement journey.

    From Discovery to Solution


    Reducing app startup time, a smoother user experience with reduced jank and better video playback experience were three major goals that the team prioritized. They also discussed how to measure the effects of performance optimization to prevent the occurrence of regression.

    1. Faster startup: refactor startup framework

    App startup time is one of the metrics in Android Vitals. Making sure the app startup time is no longer than the Android Vital’s recommendation is the best way to ensure the app loads and starts responding to user activity as quickly as possible. The App Startup library is an Android Jetpack library to help developers initialize app components simply and efficiently.

    The team studied the App Startup library in depth and refactored the app's startup framework to achieve on-demand loading and meticulous scheduling of components. In order to further reduce the execution time of creating Views on the main thread, the team even used a background thread to load View components asynchronously, thus improving the overall speed of app startup.

    TikTok used Simpleperf to analyze the code execution time, and Android Studio's Profiler to monitor the usage of resources such as memory, CPU, and network to optimize I/O, threads, and resource locks.

    2. Smoother user interface

    To ensure a smoother user interface, the team needed to tackle two challenges: 1) simplify the View hierarchy, so that the app only renders what is necessary on screen, and 2) reduce the number of task executions in each frame so that the app can have a steady frame rate.

    The TikTok team used the Layout Inspector in Android Studio to pinpoint the unnecessary layout contents. The layout boundaries of each View are clearly visible in the inspector, so the team can easily simplify the View hierarchy of the interface and reduce excessive and unnecessary content drawing.

    In many cases, TikTok used doFrame() to perform frame-by-frame tasks. Trying to fit too much work in a single frame will inevitably cause a jank. TikTok's approach was to use allocation algorithms to distribute tasks into different frames to ensure that the application has a steady frame rate.

    3. Better video playback experience: reuse resources

    TikTok users can create audio and video content in various ways, and different codecs are used to play different types of content. Android provides the MediaCodec class to help access the underlying codec. To further improve the speed of video playback, it is good practice to provide different media player instances for different codecs. The TikTok team created a pool of media player instances throughout the application to neatly provide for various media contents. They even run each media player instance in different threads to minimize interference between one another

    Network connection speed is another contributor to video lag . The team tested different solutions, including optimizing connections and reusing sockets, and developed algorithms to dynamically adjust buffer length when streaming content to reduce lag during playback.

    They also used on-device video super-resolution to generate high-resolution frames based on low-resolution video content, further improving the quality of video playback without increasing network pressure.

    Preloading (loading the next video ahead of time) and pre-rendering (rendering the first frame of the video ahead of time) are critical components to ensure that users have a smooth experience when playing multiple videos in succession. TikTok drew a Surface in advance only adding it into the screen when it is actually needed, to reduce the pressure of drawing it on the spot.

    4. Avoid regressions

    The team continues to maintain a detailed understanding of performance and works to fine-tune elements when necessary. Luckily, Android has tools in place for this exact purpose, like Systrace to capture traces so developers can export system activities (including CPU scheduling, disk activities, and app threads) for detailed analysis. The team also relies heavily on tools like Perfetto and Android Studio CPU profiler to track the execution time of various events, especially for I/O and class loading.

    Better Performance, Better Experience


    TikTok creatively leveraged the Android toolchain to track, quantify, and optimize their app’s performance for its business priorities, resulting in improved user experience and an increase in user satisfaction

    The app startup time was reduced by 45%, and the smoothness (the chance of the frame rate being lower than the target value) has been optimized by 49%. When playing a video, the first frame of the video appeared 41% faster, and the chance of video lag was reduced by 27%.

    Users are now more willing to use TikTok: active days per user in 30 days increased by 1%as did the average of session duration. User surveys and TikTok’s rating in Google Play also show a significant increase in user satisfaction.

    The Next Stage for TikTok


    By constantly optimizing app performance and adapting to the latest Android 13 platform, TikTok has created a more seamless app experience, encouraging more users to discover, create, and share the content they love.

    With more than 250 million active large-screen Android devices globally, the team has also been focusing on large-screen devices, including foldable devices. By adopting the app to large screens, the team has brought a more immersive experience to TikTok users.

    To learn more about how TikTok optimized its Android app to improve user experience and business performance, read the article here.

    Get Guidance on Performance


    To learn how you can get started to inspect, improve and monitor your app's performance visit our developer guide. The fastest way to improve your app's launch speed is by adding a baseline profile to your next release.

    September 4th 2022, 7:38 pm

    Monitor all your deep links in one place on this new Play Console page

    Android Developers Blog

    Posted by Yafit Becher, Product Manager, Google Play and Luís Dorelli, Engineer, Google Play

    Deep links are a great way to improve engagement with your in-app content and the overall user experience by accepting traffic from external sources, including the web. Keeping your deep links in good shape, however, can be a challenge, so many apps have partial, broken, or no deep links configured. For some developers, even answering basic questions like “is this URL deep-linked?” or “why is this deep link not working?” can be difficult to answer.

    That’s why we’re making it easier for you to keep your deep links in good shape with a new, dedicated Play Console page. This page collects all the information and tools related to your app’s deep links in one convenient place, giving you a quick but comprehensive snapshot of your current setup to help you identify and troubleshoot issues at a glance.

    See a comprehensive snapshot of your deep links so you can easily identify and troubleshoot issues.

    On the new deep links page, you’ll find a quick summary of possible issues with your app’s deep links and the steps to take to fix them. The page also lists all web domains your app is configured to accept traffic from, as well as information about the user experience from those domains. In cases where the user experience could be improved, you’ll see step-by-step guidance on how to fix the issue, showing you exactly what’s missing from your app or website association with code snippets to make sure you get it right.

    Get step-by-step guidance on how to fix issues with your deep links.

    Lastly, the new deep links page offers a full drill-down of your deep links app configuration, listing details of all intent filters and the sources they are configured to receive traffic from. Again, you can see if each line item is properly configured, and if not, get specific instructions about how to fix it.

    We’re very excited to share this first release of the deep links page with you, making it much easier to make sense of your setup and fix broken deep links. The next release, coming later this year, will also highlight important website URLs that aren’t yet configured as deep links, so that you don’t miss an opportunity to drive more quality traffic to your app.

    Check out the new deep links page today to see the status of your deep links and fix any setup issues.

    How useful did you find this blog post?




    September 4th 2022, 7:38 pm

    Google Play Coffee break with iMumz | From start-up to scale-up

    Android Developers Blog

    Posted by Tamzin Taylor, Head of Google Play Partnerships, Western Europe

    Today I’m excited to announce that we are launching the second episode of Google Play Coffee breaks. In this episode I enjoyed a virtual coffee with Ravi Teja Akondi, co-founder and CEO of iMumz. iMumz caters to expecting and new parents to help them practice wellbeing and mindfulness during the early stages of parenthood. Ravi and his team recently graduated from Appscale Academy, an initiative aimed at supporting promising Indian app start-ups and helping them grow into global businesses. It’s great to see their continued growth and to hear them share tips and learnings they picked up along the way.

    Watch the full Coffee breaks episode and get my take on it below:



    The team at iMumz created their app with the mission to help expecting and new parents easily follow a healthy lifestyle every day, encouraging them to practice mindfulness daily. The app provides support to parents focusing on well-being during the first 1,000 days of pregnancy; that is 270 days of pregnancy and the first two years of parenthood. Today, the app helps over 600,000 people achieve these goals.

    Ravi recalled how in the early days the iMumz team sent out actionable insights to their audience via a messenger app. They started by customizing small daily routines for those seeking to learn more about wellness during pregnancy and parenthood. By tracking the completion rates and retention rates, the team were able to see that they were really creating something valuable and gained the confidence to take the business from a messaging service to a full mobile application.

    Growing a sustainable business

    The first step for the iMumz team was to work on building out a community of early adopters. After conducting initial market research the team realized those in tier one cities - the metro cities in India - were the most likely to become early adopters. As they expanded to more and more parents, they learnt how important it was to tailor their pricing to different types of audiences. Experimentation was key to understanding what their different audiences were willing to pay. Remember that beyond the really useful data you can gather from running experiments, you can also get incredibly valuable direct and written feedback from users by inviting them into closed testing groups you can easily set up in the Play Console, without this feedback impacting your star rating.

    Nurturing your app community

    Through experimenting and listening to users, iMumz learnt that parents-to-be wanted to connect with others like them, and the team quickly realized that the people using their app needed a community. People wanted to connect with others going through similar life events. By building out community spaces the team was able to help initiate discussions on specific topics; such as breastfeeding, baby-led weaning, and self care postpartum. The community has since helped important conversations develop naturally, and provides iMumz users with another level of peer support. Today, their community is vibrant, with more than 5,000 conversations taking place every day!

    When it comes to building out a community it’s important that your messaging to users feels genuine and authentic. This was especially important for iMumz, given the app caters to a sensitive and important set of life moments for parents. To start, as with any message, making message content relevant and timely is critical. For example, consider the time of day when determining the best time to post new content, updates, or sending push notifications, and remember different time zones when you’re dealing with a global audience. Additionally, it can help to put a relatable person or character behind the message (remember to localize this to your audience though).

    Ravi also shared two key learnings he felt made the biggest difference to the growth of his app:

    1) Experiment. There are so many ideas you might find counterintuitive - don’t automatically discount any or jump to conclusions until you test them. Be data driven. That's going to help you provide more value, faster.

    2) Narrow down what you’re working on, so you focus on one task or challenge at a time. You might be tempted to do many things at once, but narrowing down will help give you amplified results.

    To where does the future lead? 

    Moving forward, the team at iMumz plan to stay focused on their mission; making the future generation healthier, happier, and more intelligent. They also have global aspirations and they plan to launch across a few selected geographies soon, launching localized versions of the app.

    It was such a pleasure to speak to Ravi about his experiences and I can’t wait to see iMumz’s continued growth and next steps. I get so much inspiration from speaking with the people behind apps like iMumz, and I know that inspires my team to continue investing in and developing initiatives such as Appscale Academy.

    We are looking forward to continuing to learn from more businesses, and see what you all do next. Stay tuned for the next episode of Coffee Breaks.

    • Tamzin Taylor, Head of Play Partnerships, Western Europe
    Do you have any questions for iMumz? What are your own tips for other app or game businesses? Let us know on Twitter.


    September 4th 2022, 7:38 pm

    Announcing Cross device SDK Developer Preview for building rich multi-device experiences on Android

    Android Developers Blog

    Posted by Alex Rocha - Developer Relations Engineer Manager, Ryan Ausanka-Crues - Eng Manager, Multi-device development, Stella Loh - Product Manager, Multi-device development

    Today we’re launching our Developer Preview of the new Cross device SDK for Android. First announced during the Google I/O ‘22 Multi-device development session, our Cross device SDK allows developers to build rich multi-device experiences with a simple and intuitive set of APIs. This SDK abstracts away the intricacies involved with working with device discovery, authentication, and connection protocols, allowing you to focus on what matters most—building delightful user experiences and connecting these experiences across a variety of form factors and platforms.

    What’s in Developer Preview

    This initial release contains a set of rich APIs centered around the core functionality of Device discovery, Secure connections, and Multi-device Sessions.

    1. Device discovery: Easily find nearby devices, authorize peer-to-peer communication, and start the target application on receiving devices.
    2. Secure connections: Enable encrypted, low-latency bi-directional data sharing between authorized devices.
    3. Multi-device Sessions: Enable transferring or extending an application’s user experience across multiple devices.

    In turn, this will allow you to build compelling cross-device experiences by enabling and simplifying the following use cases:

    Starting today with a Developer Preview for Android phones and tablets, the Cross device SDK will be available later for other Android surfaces and non-Android OSs.

    Under The Hood

    The Cross device SDK provides a software abstraction layer that handles all aspects of cross-device connectivity, leveraging wireless technologies such as Bluetooth, Wi-Fi, and Ultra-wide band; our SDK does all the heavy-lifting under the hood, offering you a modular,connectivity-agnostic API that supports bi-directional communication between devices and is backward compatible to Android 8. In addition, apps will not have to declare or request Runtime Permissions for any of the underlying connectivity protocols used (such as BLUETOOTH_CONNECT, BLUETOOTH_SCAN, ACCESS_FINE_LOCATION, etc.), and the user can allow apps to connect to only the device(s) they selected.

    Getting started with Developer Preview

    Head over to our developer guide to get started and try out the Developer Preview of the Cross device SDK for Android. Make sure to check out our Rock Paper Scissor sample app (Kotlin and Java) on GitHub for a demonstration on how to work with the various APIs and our Google I/O ‘22 Multi-device development session for a general overview of the SDK.

    Feedback

    We’d love to hear from you during this initial Developer Preview launch to help us shape the SDK and influence future roadmapping, so please share your feedback and let us know your experience with the SDK!

    September 4th 2022, 7:38 pm

    #WeArePlay | Meet George from the UK. More stories from Croatia, USA and Kenya.

    Android Developers Blog

    Posted by Leticia Lago, Developer Marketing

    Our celebration of app and game businesses continues with more #WeArePlay stories. Today, we’re starting with George from Bristol, UK - a young entrepreneur taking the streetwear industry by storm.

    After spending hours and hours searching for the latest styles in sneakers and streetwear, George realised there’s a market in helping fellow enthusiasts find the latest drops. At just 16 years old, he took it upon himself to learn to code and created his app, Droplist. It points people to upcoming special collections from major labels around the world. Find out more about his story.

    Today we also spotlight few more stories from around the world:




    Check out all the stories now at g.co/play/weareplay and stay tuned for even more coming soon.

    How useful did you find this blog post?

    September 4th 2022, 7:38 pm

    Android 13 is in AOSP!

    Android Developers Blog

    Posted by Seang Chau, VP of Engineering

    Today we’re pushing the Android 13 source to the Android Open Source Project (AOSP) and officially releasing the newest version of Android. For developers, Android 13 is focused on our core themes of privacy and security as well as developer productivity, making it easier for you to build great experiences for users. We’ve also continued to make Android an even better OS for tablets and large screens, giving you better tools to take advantage of the 270+ million of these devices in use across the world. You can read more about Android 13 for consumers in our Keyword blog post

    Android 13 is rolling out to Pixel devices starting today. Later this year, Android 13 will also roll out to more of your favorite devices from Samsung Galaxy, Asus, HMD (Nokia phones), iQOO, Motorola, OnePlus, Oppo, Realme, Sharp, Sony, Tecno, vivo, Xiaomi and more.

    As always, we thank you for the feedback you’ve shared, and we appreciate the work you’ve done to make your apps compatible with today’s release. Your support and contributions are what make Android a great platform for everyone!


    What’s in Android 13 for developers?

    Here’s a look at some of what’s new in Android 13 - make sure to check out the Android 13 developer site for details on all of the new features.


    Developer productivity and tools

    Themed app icons - Android 13 extends Material You dynamic color to all app icons, letting users opt-in to icons that inherit the tint of their wallpaper and other theme preferences. All your app needs to supply is a monochromatic app icon and a tweak to the adaptive icon XML. More here.

    Themed app icons adapting to wallpapers colors and dark theme (left).

    Per-app language preferences - Android 13 makes it easier to support multilingual users who want to use your apps in a language that’s different from the system language. Android now provides a standard “App language” Settings panel for apps that have opted-in, and you can call a new platform API to get or set the user’s preferred locale at runtime, helping to reduce boilerplate code and improve compatibility. More here.

    Per-app languages in Settings

    Improved text support - Android 13 includes text and language improvements that help you deliver a more polished experience. Faster hyphenation optimizes hyphenation performance by as much as 200% so you can now enable it in your TextViews with almost no impact on rendering performance. Text conversion APIs make searching and autocompletion faster when using phonetic lettering input for languages like Japanese, Chinese, and others. Android 13 also improves line heights for non-latin scripts (such as Tamil, Burmese, Telugu, and Tibetan), eliminating clipping and making them easier to read. More here.

    Improved line height for non-Latin scripts in apps targeting Android 13 (bottom).

    Color vector fonts - Android 13 adds rendering support for COLR version 1 (spec, intro video) fonts and updates the system emoji to the COLRv1 format. COLRv1 is a new, highly compact, font format that renders quickly and crisply at any size. For most apps this will just work, and the system handles everything. More here.

    COLRv1 vector emoji (left) and bitmap emoji.

    Quick Settings Placement API - For apps that provide custom Quick Settings tiles, Android 13 makes it easier for users to discover and add your tiles. Using a new tile placement API, your app can now prompt the user to directly add your custom Quick Settings tile in a single step, without leaving your app. More here.

    Programmable shaders - Android 13 introduces programmable RuntimeShader objects, with behavior defined using the Android Graphics Shading Language (AGSL). You can use these shaders to create ripple, blur, stretch, and similar advanced effects in your apps. More here.

    Media controls derived from PlaybackState - For apps targeting Android 13, the system now derives media controls from PlaybackState actions, providing a richer set of controls that are consistent across phones and tablet devices and align with other Android platforms such as Android Auto and Android TV. More here.

    Android 13 media controls are consistent on phones and tablets.

    Bluetooth LE Audio - Low Energy (LE) Audio is the next-generation wireless audio built to enable new use cases like sharing and broadcasting audio to friends and family, or subscribing to public broadcasts for information, entertainment, or accessibility. It’s designed to ensure that users can receive high fidelity audio without sacrificing battery life, and lets them seamlessly switch between different use cases. Android 13 adds built-in support for LE Audio, so developers can use the new capabilities on compatible devices. More here.

    MIDI 2.0 - Android 13 adds support for the new MIDI 2.0 standard, including the ability to connect MIDI 2.0 hardware through USB. This updated standard offers features such as increased resolution for controllers, better support for non-Western intonation, and more expressive performance using per-note controllers. More here.

    OpenJDK 11 updates - Android 13 Core Libraries now align with the OpenJDK 11 LTS release, with both library updates and Java 11 programming language support for app and platform developers. We plan to bring these Core Library changes to more devices through Google Play system updates, as part of an ART module update for devices running Android 12 and higher. More here.

    Predictive back gesture - Android 13 introduces new APIs that let your app tell the system that it will handle back events in advance, a practice we call the "ahead-of-time" model. This new approach is part of a multi-year effort to help you prepare your app to support the predictive back gesture, which is available for testing in this release through a developer option. More here.

    Built for tablets

    Android 13 extends the 12L update that we released earlier this year, and it delivers an even better experience on tablets. You’ll find features like an enhanced multitasking taskbar, more large-screen layouts and optimizations in system UI and apps, improved compatibility modes for apps, and more. We’re continuing to invest to give you the tools you need to build great experiences for tablets as well as Chromebooks and foldables. You can learn more about how to get started optimizing for large screens, and be sure to check out our large screens developer resources.

    Multitasking on tablets with Android 13.

    Privacy and security

    Photo picker and APIs - A new system photo picker now gives users a standard, privacy-protecting way to share local and cloud-based photos. Photo picker extends Android’s long-standing document picker and makes it easy for users to share specific photos and videos with an app, without giving the app permission to view all media files on the device. Photo picker provides a dedicated experience for photos and videos and includes APIs for apps to access the shared media files. The photo picker experience is now available to users who receive Google Play system updates, on devices (excepting Go devices) running Android 11 and higher. More here.


    Photo picker lets users share specific photos and videos with an app.

    Notification permission - To help users focus on the notifications that are most important to them, Android 13 introduces a new notifications runtime permission. Apps now need to request the notification permission from the user before posting notifications. For apps targeting Android 12 or lower, the system will handle the upgrade flow on your behalf. More here.

    Notification permission dialog in Android 13.

    Nearby device permission for Wi-Fi - Android 13 introduces the NEARBY_WIFI_DEVICES runtime permission for apps that manage a device's connections to nearby access points over Wi-Fi. The new permission is required for many commonly-used Wi-Fi APIs and enables apps to discover and connect to nearby devices over Wi-Fi without also needing to acquire the location permission. More here.

    Granular permissions for media file access - Photo picker is our recommended solution for user-friendly, permissionless sharing of photos and videos, but for apps that haven’t moved to photo picker yet or for audio use cases, Android 13 adds new granular media permissions. These new permissions replace the READ_EXTERNAL_STORAGE permission and provide access to specific types of media files, including images, video, or audio. We highly recommend moving your app to photo picker if possible; otherwise, use the granular media permissions when targeting Android 13. More here.
    Requesting permission to access audio files.

    Developer downgradable permissions - Starting in Android 13, apps that no longer require permissions previously granted by the user can use a new API to downgrade the permissions. By removing unused permissions, your app can show that it’s using the minimum permissions needed, which can improve user trust. More here.

    Safer exported Intent filters - Android 13 applies stricter rules when delivering explicit intents to exported intent filters in another app that’s targeting Android 13. For intents that specify actions, the system now delivers the intents to the exported component only if the intent matches the receiver’s declared <intent-filter> elements. More here.


    Performance for apps

    Android 13 improves performance and efficiency for all apps through updates to the ART runtime. We plan to bring these improvements to more Android users through Google Play system updates, as part of our ongoing ART module updates for devices running Android 12 and higher.

    Improved garbage collection - A new garbage collector based on the Linux kernel feature userfaultfd is coming to ART on Android 13 devices in an upcoming Google Play system update. The new garbage collector eliminates the read barrier and its fixed overhead per object loaded, reducing memory pressure and leading to as much as ~10% reduction in compiled code size. It’s more efficient at GC-time as well, since pages are freed as compaction progresses. Overall, the new garbage collector helps to save battery, avoid jank during GC operations, and protect apps from low-memory kills.

    Optimizations throughout ART - In Android 13, ART makes switching to and from native code much faster, with JNI calls now up to 2.5x faster. We’ve also reworked the runtime’s reference processing to make it mostly non-blocking, which further reduces jank. We’ve exposed a new public API, Reference.refersTo(), which is useful in reclaiming unreachable objects sooner, and we’ve made the interpreter faster by optimizing class/method lookups. Lastly, ART now performs more byte-code verification at install time, avoiding the expense of verification at runtime and keeping app startup times fast. More here.


    Get your apps ready!

    Now with today’s public release of Android 13 to AOSP, we’re asking all Android developers to finish your compatibility testing and publish your updates as soon as possible, to give your users a smooth transition to Android 13.

    To test your app for compatibility, just install it on a device running Android 13 and work through the app flows looking for any functional or UI issues. Review the Android 13 behavior changes for all apps first, to focus on areas where your current app could be affected. Here are some of the top changes to test:

    • Notifications runtime permission - Make sure you understand how this new permission works with your app’s notifications, and plan on targeting Android 13 (API 33) as soon as possible to help support users. More here.
    • Clipboard preview - Make sure your app hides sensitive data in Android 13’s new clipboard preview, such as passwords or credit card information. More here.
    • JobScheduler prefetch - JobScheduler now tries to anticipate the next time your app will be launched and will run any associated prefetch jobs ahead of that time. If you use prefetch jobs, test that they are working as expected. More here.
    Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

    Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for apps targeting Android 13 for this, and use the compatibility framework to help detect issues quickly.


    Tablet and large-screens support

    With Android 13 bringing a better experience to tablets, make sure your apps look their best. You can test large-screen features by setting up an Android emulator in Android Studio, or you can use a large screen device from our Android 13 Beta partners. Here are some areas to watch for:

    • Taskbar interaction - Check how your app responds when viewed with the new taskbar on large screens. Make sure your app's UI isn't cut off or blocked by the taskbar. More here.
    • Multi-window mode - Multi-window mode is now enabled by default for all apps, regardless of app configuration, so make sure the app handles split-screen appropriately. You can test by dragging and dropping your app into split-screen mode and adjusting the window size. More here.
    • Improved compatibility experience - if your app isn’t optimized for tablets yet, such as using a fixed orientation or not being resizable, check how your app responds to compatibility mode adjustments such as letterboxing. More here.
    • Media projection - If your app uses media projection, check how your app responds while playing back, streaming, or casting media on large screens. Be sure to account for device posture changes on foldable devices as well. More here.
    • Camera preview - For camera apps, check how your camera preview UI responds on large screens when your app is constrained to a portion of the screen in multi-window or split-screen mode. Also check how your app responds when a foldable device's posture changes. More here.
    You can read more about the tablet features in Android 13 and what to test here.


    What’s next?

    Android 13 is rolling out to Pixel devices starting today.

    If you’re currently enrolled in the Android Beta program, you’ll get the Android 13 final release and remain enrolled to receive ongoing Beta updates for Android 13 feature drops, starting later this year. If you’d like to opt out of ongoing Beta updates without needing to wipe your device, just visit the Android Beta site and opt out after you get the Android 13 final release and before taking the first beta for Android 13 feature drops.

    System images for Pixel devices are available here for manual download and flash, and you can get the latest Android Emulator system images via the SDK Manager in Android Studio. If you're looking for the Android 13 source, you'll find it here in the Android Open Source Project repository under the Android 13 branches.

    Thanks again for participating in our program of early previews and Betas! We're looking forward to seeing your apps on Android 13!


    Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

    September 4th 2022, 7:38 pm

    Wear OS Tiles Material Library: Build Tiles, Fast.

    Android Developers Blog

    Posted by Anna Bernbaum, Product Manager, Ataul Munim, Developer Relations Engineer

    We are excited to announce the launch of the Tiles Material library! Now, instead of building buttons, progress arcs and more from scratch, you can use our pre-built Material components and layouts to create tiles that embrace the latest Material design for Wear OS. You can use these together with the Tiles Design Kit to easily follow the Tiles Design Guidelines.

    Tiles provide Wear OS users glanceable access to the information and actions they need in order to get things done quickly. They also are one of the most used surfaces on Wear OS. Just one swipe away from the watch face, users can quickly access the most important information or actions from an app, like starting a timer or getting the latest weather forecast.

    Tiles carousel on Wear OS

    We have built the following components for elements commonly used in tiles:

    These components also make it faster to build tiles. For example, creating a button for your tile takes just a few lines of code:

    val clickable: Clickable = generateClickable()

    val button: Button = Button.Builder(this, clickable)
        .setIconContent("icon_exercise")

        .setContentDescription("Start workout")

        .build()



    We have also created some predefined layouts to kickstart your tiles development. These already follow our design guidelines on how your tile layout should be formatted.

    For example, we can build this tile using a predefined layout:

    val theme = Colors(

        /*primary=*/ 0xFFD0BCFF.toInt(), /*onPrimary=*/ 0xFF381E72.toInt(),

        /*surface=*/ 0xFF202124.toInt(), /*onSurface=*/ 0xFFFFFFFF.toInt()

    )

    val buttonColors = ButtonColors.secondaryButtonColors(theme)

    val chipColors = ChipColors.primaryChipColors(theme)

    val timeline = Timeline.fromLayoutElement(
        PrimaryLayout.Builder(deviceParameters)

            .setPrimaryLabelTextContent(

                Text.Builder(this, "1 run this week")

                    .setTypography(Typography.TYPOGRAPHY_CAPTION1)

                    .setColor(argb(theme.primary))

                    .build()

            )

            .setContent(

                MultiButtonLayout.Builder()

                    .addButtonContent(

                        Button.Builder(this, clickable)

                            .setIconContent("icon_run")

                            .setButtonColors(buttonColors)

                            .setContentDescription("Run")

                            .build()

                    )

                    .addButtonContent(

                        Button.Builder(this, clickable)

                            .setIconContent("icon_yoga")

                            .setButtonColors(buttonColors)

                            .setContentDescription("Yoga")

                            .build()

                    )
                    .addButtonContent(

                        Button.Builder(this, clickable)

                            .setIconContent("icon_cycle")

                            .setButtonColors(buttonColors)

                            .setContentDescription("Cycle")

                            .build()

                    )

                    .build()

            )

            .setPrimaryChipContent(

                CompactChip.Builder(this, "More", clickable, deviceParameters)

                    .setChipColors(chipColors)

                    .build()

            )

            .build()

    )


    What's in the library

    This library contains components and layouts that are in-line with Material guidelines and easy to use. The included components are:
    • Button - clickable, circular-shaped object, with either icon, text or image with three predefined sizes.
    • Chip - clickable, stadium-shaped object that can contain an icon, primary and secondary labels, and has fixed height and customizable width.
    • CompactChip & TitleChip - two variations of the standard Chip that have smaller and larger heights, respectively, and can contain one line of text.
    • CircularProgressIndicator - colored arc around the edge of the screen with the given start and end angles, which can describe a full or partial circle with the full progress arc behind it.
    • Text - styled text which uses the recommended Wear Material typography styles.
    All these components have their own colors object that can be built with the main Colors class to easily apply the same theme over all components. In addition to colors, there is a Typography class to easily get FontStyle objects using the typography name.

    In addition to components, there are recommended tile layouts:
    • PrimaryLayout - a layout which can be customized by adding primary or secondary labels, content in the middle, and a primary chip at the bottom. The main content within this layout could be added as a MultiSlotLayout or MultiButtonLayout object.
    • EdgeContentLayout - a layout for hosting CircularProgressIndicator around the edge with main content inside and primary or secondary label around it.
    • MultiButtonLayout - a layout that can contain between 1 - 7 buttons, arranged in line with the Material guidelines depending on their number.
    • MultiSlotLayout - a row-like style layout with horizontally aligned and spaced slots (for icons or other small content).
    All layouts have recommended padding and styles applied that are within Material guidelines.


    Tools for tiles

    Android Studio Dolphin includes the Direct Surface Launch feature. This lets developers install and launch a tile directly from Android Studio, instead of having to manually add it from the tile selector on the target device. Get started with Direct Surface Launch by creating a new Run Configuration and selecting Wear OS Tile, then choosing the module and TileService class.

    Horologist Tiles is also recommended to save time during tile development. This library gives you the ability to preview a tile UI straight from Android Studio, making the write-test loop a lot shorter. Horologist Tiles also includes Kotlin friendly abstractions, like CoroutinesTileService so you can use what you're already familiar with.


    Get started with Tiles Material

    For a quick start, take a look at the new Tiles codelab, the code sample and the docs.

    Please share your feedback on the issue tracker and let us know what you think of Tiles Material!









    September 4th 2022, 7:38 pm

    Google Play Indie Games Festival: Finalists revealed

    Android Developers Blog

    Posted by Patricia Correa, Director, Global Developer Marketing

    The Indie Games Festival shines a spotlight on some of the best games on Google Play, and celebrates the passion and creativity that small games studios bring to gamers worldwide. This year we are hosting Festival in South Korea, Japan and Europe, for local developers and gamers from all over the world.

    Earlier this summer, we opened submissions, and today we’re revealing the finalists. Scroll down to see the shortlisted games!

    Join the finals

    September 3rd will be a jam packed day for indie games fans. Everyone is invited to attend the finals for the three Festivals, starting with South Korea at 2pm KST, followed shortly after by Japan at 3pm JST, and wrapping up with Europe at 11am CET.

    The finals will be held in a custom virtual world where you can meet the people behind the finalist games, explore the titles, have fun with gamers from around the world, and be the first to discover the winners.

    The events will be hosted by Julia Hardy (Europe), Inho Jung (Korea) and Kajisac (Japan).

    At the European finals we will also reveal the class of 2022 of the Indie Games Accelerator, a program that helps small game studios take their game to the next level by providing them training and mentorship.

    Without further ado, please meet the finalists and join us in congratulating them!

    Europe

    (in alphabetical order, also in this collection)

    Blacken Slash

    DT Space Races

    Dungeons of Dreadrock

    Find Hidden Objects Game (AR)

    Fury Unleashed

    Get Together: A Coop Adventure

    Gladiators: Survival in Rome

    Hygge is...

    Kingdom: Idle Gold Tycoon

    Kitty Q

    Light It Up: Energy Loops

    Luna Ravel

    Paths: Beatrice's adventure

    Pawnbarian

    Please, Touch The Artwork

    Quadline

    Rhythmer_

    Square Valley

    sugar game

    Wingspan

    —--

    Japan

    (in alphabetical order)

    A Year of Springs

    Attack on Tankette

    Brave Farm Survival

    Cards and Dragons Sealed

    Catastrophe Restaurant

    Crazy Donuts

    DeathAntique (Early Access not yet available globally)

    Dungeon and Gravestone

    exp!A

    GenEi AP: Empty Heart

    HUNGRY PIG

    Jack & Detectives

    Raspberry Mash

    SOULVARS

    Statute of Limitations "1 minute" world

    SUSHI ALONE

    Sushi Food Cart

    Time for Coffee in the Strange Forest

    Train's Run

    UnionShooter360

    —--

    Korea

    (in alphabetical order)

    Bingo Star

    Calibur League

    Connect

    Counting Star

    Cube Of Life: Resurrection

    Drawing Beats!

    Dungeon Rogue

    FIND ALL 3D

    Idle Ghost Hotel

    Lost Pages

    Meow Tower: Nonogram

    Merge of Mini : with your legion

    Pa!nt

    Random Card

    Shambles

    Soul Launcher

    SuperBattle

    The Greater

    Uglyhood

    Undead vs Demon

    More about the Indie Games Festival and the Indie Games Accelerator

    At Google Play we’re committed to helping developers of all sizes succeed on our platform. Programs like the Festival and the Accelerator are here to help small games studios:

    Learn more about the programs.

    For more updates about all of our programs, resources and tools for indie game developers, follow us on Twitter @GooglePlayBiz and Google Play business community on LinkedIn.

    How useful did you find this blog post?

    August 2nd 2022, 10:27 am

    Prepare your app to support predictive back gestures

    Android Developers Blog

    Posted by Jason Tang, Product Management, Diego Zuluaga, Developer Relations, and Michael Mauzy, Developer Documentation

    Since we introduced gesture navigation in Android 10, users have signaled they want to understand where a back gesture will take them before they complete it.

    As the first step to addressing this need, we've been developing a predictive back gesture. When a user starts their gesture by swiping back, we’ll show an animated preview of the destination UI, and the user can complete the gesture to navigate to that UI if they want – as shown in the following example.

    Although the predictive back gesture won’t be visible to users in Android 13, we’re making an early version of the UI available as a developer option for testing starting in Beta 4. We plan to make the UI available to users in a future Android release, and we’d like all apps to be ready. We’re also working with partners to ensure it’s consistent across devices.

    Read on for details on how to try out the new gesture and support it in your apps. Adding support for predictive back gesture is straightforward for most apps, and you can get started today.

    We also encourage you to submit your feedback.

    Try out the predictive back gesture in Beta 4

    To try out the early version of the predictive back gesture available through the developer option, you’ll need to first update your app to support the predictive back gesture, and then enable the developer option.

    Update your app to support predictive back gesture

    To help make predictive back gesture helpful and consistent for users, we're moving to an ahead-of-time model for back event handling by adding new APIs and deprecating existing APIs.

    The new platform APIs and updates to AndroidX Activity 1.6+ are designed to make your transition from unsupported APIs (KeyEvent#KEYCODE_BACK and OnBackPressed) to the predictive back gesture as smooth as possible.

    The new platform APIs include OnBackInvokedCallback and OnBackInvokedDispatcher, which AndroidX Activity 1.6+ supports through the existing OnBackPressedCallback and OnBackPressedDispatcher APIs.

    You can start testing this feature in two to four steps, depending on your existing implementation.

    To begin testing this feature:


    1. Upgrade to AndroidX Activity 1.6.0-alpha05. By upgrading your dependency on AndroidX Activity, APIs that are already using the OnBackPressedDispatcher APIs such as Fragments and the Navigation Component will seamlessly work when you opt-in for the predictive back gesture. 

    // In your build.gradle file:
    dependencies {

      // Add this in addition to your other dependencies
      implementation "androidx.activity:activity:1.6.0-alpha05"


    2. Opt-in for the predictive back gesture. Opt-in your app by setting the EnableOnBackInvokedCallback flag to true at the application level in the AndroidManifest.xml.

    <application

        ...

        android:enableOnBackInvokedCallback="true"

        ... >

    ...

    </application>


    If your app doesn’t intercept the back event, you're done at this step.

    Note: Opt-in is optional in Android 13, and it will be ignored after this version.

    3. Create a callback to intercept the system Back button/event. If possible, we recommend using the AndroidX APIs as shown below. For non-AndroidX use cases, check the platform API mentioned above.

    This snippet implements handleOnBackPressed and adds the OnBackPressedCallback to the OnBackPressedDispatcher at the activity level.

     val onBackPressedCallback = objectOnBackPressedCallback(true) {

       override fun handleOnBackPressed() {

         // Your business logic to handle the back pressed event

       }

     }

     requireActivity().onBackPressedDispatcher

       .addCallback(onBackPressedCallback)


    4. When your app is ready to stop intercepting the system Back event, disable the onBackPressedCallback callback.
     

    onBackPressedCallback.isEnabled = webView.canGoBack()



    Note: Your app may require using the platform APIs (OnBackInvokedCallback and OnBackPressedDispatcher) to implement the predictive back gesture. Read our documentation for details.

    Enable the developer option to test the predictive back gesture

    Once you’ve updated your app to support the predictive back gesture, you can enable a developer option (supported in Android 13 Beta 4 and higher) to see it for yourself.

    To test this animation, complete the following steps:
    1. On your device, go to Settings > System > Developer options.
    2. Select Predictive back animations.
    3. Launch your updated app, and use the back gesture to see it in action.

    Learn more

    In addition to our detailed documentation, try out our predictive back gesture codelab in an actual implementation.

    If you need a refresher on system back and predictive back gesture on Android, we recommend watching Basics for System Back.


    Thank you again for all the feedback and being a part of the Android Community - we love collaborating together to provide the best experience for our users.

    July 29th 2022, 6:07 pm

    Jetpack Compose 1.2 is now stable!

    Android Developers Blog

    Posted by Jolanda Verhoef, Android Developer Relations Engineer

    Today, we’re releasing version 1.2 of Jetpack Compose, Android's modern, native UI toolkit, continuing to build out our roadmap. This release contains new features like downloadable fonts, lazy grids, and improvements for tablets and Chrome OS with better focus, mouse, and input handling.

    Compose is our recommended way to build new Android apps for phone, tablets and foldables. Today we also released Compose for Wear OS 1.0 - making Compose the best way to build a Wear OS app as well.

    We continue to see developers like the Twitter engineering team ship faster using Compose:

    Compose increased our productivity dramatically. It’s much easier and faster to write a Composable function than to create a custom view, and it’s also made it much easier to fulfill our designers’ requirements.

    Compose 1.2 includes a number of updates for Compose on Phones, Tablets and Foldables - it contains new stable APIs graduated from being experimental, and supports newer versions of Kotlin. We've already updated our samples, codelabs, Accompanist library and MDC-Android Compose Theme Adapter to work with Compose 1.2.

    Note: Updating the Compose Compiler library to 1.2 requires using Kotlin 1.7.0. From this point forward the Compiler releases will be decoupled from the releases of other Compose libraries. Read more about the rationale for this in our blog post on independent versioning of Jetpack Compose libraries.

    New stable features and APIs

    Several features and APIs were added as stable. Highlights include:

    New Experimental APIs

    We’re continuing to bring new features to Compose. Here are a few highlights:

    Try out the new APIs using @OptIn and give us feedback!

    Fixed Bugs

    We fixed a lot of issues raised by the community, most notably:

    We’re grateful for all of the bug reports and feature requests submitted to our issue tracker - they help us to improve Compose and build the APIs you need. Do continue providing your feedback and help us make Compose better!

    Wondering what’s next? Check out our updated roadmap to see the features we’re currently thinking about and working on, such as animations for lazy item additions and removals, flow layouts, text editing improvements and more!

    Jetpack Compose continues to evolve with the features you’ve been asking for. We’ve been thrilled to see tens of thousands of apps using Jetpack Compose in production already, and many of you shared how it’s improved your app development. We can’t wait to see what you’ll build next!

    Happy composing!

    July 27th 2022, 2:20 pm

    Compose for Wear OS is now 1.0: time to build wearable apps with Compose!

    Android Developers Blog

    Posted by Kseniia Shumelchyk, Android Developer Relations Engineer

    Today we’re launching version 1.0 of Compose for Wear OS, the first stable release of our modern declarative UI toolkit designed to help developers create beautiful, responsive apps for Google’s smartwatch platform.

    Compose for Wear OS was built from the bottom up in Kotlin with assumptions of modern app architecture. It makes building apps for Wear OS easier, faster, and more intuitive by following the declarative approach and offering powerful Kotlin syntax.

    The toolkit not only simplifies UI development, but also provides a rich set of UI components optimized for the watch experience with built-in support of Material design for Wear OS, and it’s accompanied by many powerful tools in Android Studio to streamline UI iteration.

    What this means

    The Compose for Wear OS 1.0 release means that the API is stable and has what you need to build production-ready apps. Moving forward, Compose for Wear OS is our recommended approach for building user interfaces for Wear OS apps.

    Your feedback has helped shape the development of Compose for Wear OS; our developer community has been with us each step of the way, engaging with us on Slack and providing feedback on the APIs, components, and tooling. As we are working on bringing new features to future versions of Compose for Wear OS, we will continue to welcome developer feedback and suggestions.

    We are also excited to share how developers have already adopted Compose in their Wear OS apps and what they like about it.

    What developers are saying

    Todoist helps people organize, plan and collaborate on projects. They are one of the first companies to completely rebuild their Wear OS app using Compose and redesign all screens and interactions:

    “When the new Wear design language and Compose for Wear OS were announced, we were thrilled. It gave us new motivation and opportunity to invest into the platform.

    Todoist application
    Relying on Compose for Wear OS has improved both developer and user experience for Todoist:

    “Compose for Wear OS helped us tremendously both on the development side and the design side. The guides and documentation made it easy for our product designers to prepare mockups matching the new design language of the platform. And the libraries made it very easy for us to implement these, providing all the necessary widgets and customizations. Swipe to dismiss, TimeText, ScalingLazyList were all components that worked very well out-of-the-box for us, while still allowing us to make a recognizable and distinct app.”


    Outdooractive helps people plan routes for hiking, cycling, running, and other outdoor adventures. As wearables are a key aspect of their product strategy, they have been quick to update their offering with an app for the user's wrist.
    Outdooractive application
    Outdooractive has already embraced Wear OS 3, and by migrating to Compose for Wear OS they aimed for developer-side benefits such as having a modern code base and increased development productivity:

    Huge improvement is how lists are created. Thanks to ScalingLazyColumn it is easier (compared to RecyclerView) to create scrolling screens without wasting resources. Availability of standard components like Chip helps saving time by being able to use pre-fabricated design-/view-components. What would have taken us days now takes us hours.

    The Outdooractive team also highlighted that Compose for Wear OS usage help them to strive for better app quality:

    Improved animations were a nice surprise, allowing smoothly hiding/revealing components by just wrapping components in “AnimatedVisibility” for example, which we used in places where we would normally not have invested any time in implementing animations.


    Another developer we’ve been working with, Period Tracker helps keep track of period cycles, ovulation, and the chance of conception.

         
    Period Tracker application

    They have taken advantage of our UI toolkit to significantly improve user interface and quickly develop new features available exclusively on Wear OS:

    “Compose for Wear OS provided us with many kits to help us bring our designs to life. For example, we used Chips to design the main buttons for period recording, water drinking, and taking medication, and it also helped us create a unique look for the latest version of Kegel workout.

    Similarly to other developers, Period Tracker noted that Compose for Wear OS helped them to achieve better developer experience and improved collaboration with design and development teams:

    “For example, before Chips components were available, we had to use a custom way to load images on buttons which caused a lot of adaptation work. Yes, Compose for Wear OS improved our productivity and made our designers more willing to design a better user experience on wearables.

    Check out the in-depth case studies to learn more about how other developers are using Jetpack Compose.

    1.0 release

    Let’s look into the key features available with 1.0 release:

    Note that using version 1.0 of Compose for Wear OS requires using the version 1.2 of androidx.compose libraries and therefore Kotlin 1.7.0. Read more about Jetpack Compose 1.2 release here.

    Tools and libraries

    Android Studio

    The declarative paradigm shift also alters the development workflow. The Compose tooling available in Android Studio will help you build apps more productively.

    Android Studio Dolphin includes a new project template with Compose for Wear OS to help you get started.

    The Composable Preview annotation allows you to instantly verify how your app’s layout behaves on different watch shapes and sizes. You can configure the device preview to show different Wear OS device types (round, rectangle, etc):

    import androidx.compose.ui.tooling.preview


    @Preview(

        device = Devices.WEAR_OS_LARGE_ROUND,

        showSystemUi = true,

        backgroundColor = 0xff000000,

        showBackground = true

    )

    @Composable

    fun PreviewCustomComposable() {

        CustomComposable(...)

    }


    Starting with Android Studio Electric Eel, Live Edit supports iterative code development for Wear OS, providing quick feedback as you make changes in the editor and immediately reflecting UI in the Preview or running app on the device.

    Horologist

    Horologist is a group of open-source libraries from Google that supplement Wear OS development, which we announced with the beta release of Compose for Wear OS. Horologist has graduated a number of experimental APIs to stable including TimeText fadeAway modifiers, WearNavScaffold, the Date and Time pickers.

          
    Date and Time pickers from Horologist library     

    Learning Compose

    If you are unfamiliar with using Jetpack Compose, we recommend starting with the tutorial. Many of the development principles there also apply to Compose for Wear OS.

    To learn more about Compose for Wear OS check out:

    Now that Compose for Wear OS has reached its first stable release, it’s time to create beautiful apps built for the wrist with Compose!

    Join the community

    Join the discussion in the Kotlin Slack #compose-wear channel to connect with the team and other developers and share what you’re building.

    Provide feedback

    Please keep providing us feedback on the issue tracker and let us know your experience!

    For more information about building apps for Wear OS, check out the developer site.

    July 27th 2022, 2:20 pm

    Celebrating 10 years of Google Play. Together.

    Android Developers Blog

    Posted by Purnima Kochikar, VP of Partnerships, Google Play

    This week we are celebrating ten years of Google Play. Over the past decade, your creativity combined with our investment in a global platform has created a thriving app ecosystem. 2.5 billion people in over 190 countries visit Play every month to connect with your apps and games, and Play has generated over $120 billion in earnings for developers to date. We’re so proud of this amazing milestone, and grateful for your partnership.

    Looking back

    I joined the team in 2012, only a few months after Google Play launched. At that time, active users on Android had just grown from 100 million to 400 million. Android was the new kid on the block, with the audacious goal of making mobile computing accessible to everyone, everywhere. You were understandably skeptical about our chances for success - we were so far behind competing platforms in most aspects, from platform features and tools to design guidelines and commercial capabilities. Our belief in the immense potential of a fair and open ecosystem - and, even more importantly, our belief in your limitless potential - made us push forward. We were and continue to be driven by our commitment to your success.

    Back then, our tiny partnerships team of just six people was figuring out how we could best support you in navigating the opportunities and challenges of the mobile economy. There were so many uncertainties: would we be able to deliver the apps you were envisioning to a global audience on devices they can afford? Would people watch videos on the small smartphone screens, given the high cost of mobile data and low device capabilities? Would they be happy paying for mobile games, and feel safe doing so? Would people subscribe to in-app content in the same way that they did to physical goods like magazines and newspapers?

    We were with you every step of the way, taking the time to understand your needs and find ways to help you build beautiful apps and games. We also invited our global community of users to help us evolve your apps and games together, supported by features like beta testing and staged rollouts, and the ability to reply to user reviews.

    Some of my fondest memories from those early days are of working with companies who inspired us by dreaming up novel ways to harness the magic of mobile phones. They broadened our perspective of what is possible. Smule is one of those early partners who kicked off their success in the first couple of years of Play. They became one of the first of many to inspire my team, and share their story with the community:

    As your apps gained traction and you aspired to convert them into sustainable global businesses, we bolstered our investments in our commerce platform to help you grow and manage your business. We added the most popular and effective forms of payment from around the world to ensure people could pay for your apps and games frictionlessly. We removed complexities associated with finding and integrating local payment, including access to 300+ local payment methods supported in 70 countries. We also evolved our platform to anticipate and support your business needs - going from premium to free-to-play and subscriptions business models - and now Google Play helps consumers transact safely and seamlessly in more than 170 markets.

    We provided industry leading insights through our Play Console on the entire lifecycle of your app, from installs to Vitals and more, to help you manage your business effectively. I remember my entire team tearing up when Vincenzo Colucci, the founder of Smart Launcher, described how Play enabled him to live where he wanted to live - in Manfredonia, in the South of Italy, with his loved ones - and do what he loves to do - build apps that impact people around the world. His company also turned 10 years old this year.

    At every step, you demanded more from us and inspired us to think more expansively. In response, our product and engineering teams built tools and capabilities that could support all the great things that you were doing. Your feedback has helped to shape the launch of new features, resources and programs to support your success on the platform. With your help, we have evolved:


    We’ve also worked in partnership with several of you to create new features that would benefit the entire ecosystem. For example, in 2015, we worked with Supercell to help prevent fraud, leading to the launch of the Voided Purchases API, which drove industry-wide improvements to fraud and refund abuse. Similarly, our Japanese and Korean partners like GungHo Online Entertainment and NCSOFT helped us grow from a platform that supported pay-and-download games, like Rovio’s early Angry Birds, to becoming a LiveOps platform that supports games as a live service. Our media partners helped us evolve our subscriptions platform to include features such as Account Hold and Grace Period. Interestingly, we used these features to help our sports apps partners to hold on to their subscribers when the world went into lockdown.

    While there are countless such examples in our decade-long partnerships, here are 10 of our most memorable launches from the last 10 years:


    10 key launches from the decade

    As your businesses matured, we invested in product capabilities such as Play Points to help you retain and re-engage your most loyal users. We are so proud that this program has over 100 million members in 28 countries, with further expansion scheduled for later this year. We also created a consulting service to provide business and technical insights to help you make more data driven decisions about your product roadmap and global expansion plans. You have told us that these insights have helped to drive millions in incremental revenues for you, and informed not only your product direction, but also your M&A strategies.

    Above all, our partnership has brought meaningful apps and games to global audiences, and built successful businesses that have created new jobs and helped local economies. In the US alone, Play and Android have helped to create more than 2M jobs. We are truly proud of the economic impact we have had together on local communities and small businesses around the world.

    Looking forward

    As we look towards our next decade, it is useful to pause and reflect on the last two unprecedented years we have experienced together, and the overwhelmingly positive impact our partnership has had on the lives of so many people. Android and Play - powered by your businesses - have connected families and loved ones together, helped to keep people safe by supporting daily needs, sped up access to telemedicine, created employment, and enabled kids to learn and grow. Let’s take a moment to let that sink in.

    These years have taught us important lessons about our joint responsibility to foster a safe and trusted ecosystem, and how much more needs to be done to make mobile accessible to everyone. As we think about the future, there are three areas which are top of mind of us:

    The success of the founders who have gone through our Indie Game Festival and Accelerator programs, and the meaningful impact of our Change the Game initiative and of our accessibility efforts, make us optimistic about our ecosystem. We look forward to the next decade where we welcome many more founders like nine year old Alyssa and her mother who created Frobelles, a dress-up game increasing representation of African and Caribbean hair styles, to our #WeArePlay family.

    Thank you for being an integral part of our audacious goal to make mobile accessible to everyone, everywhere. We have come a long way and we have a long way to go. We are inspired by and grateful for each one of you, and remain singularly committed to your success. We can’t wait to see what you will create next, and the new horizons you will drive us to explore and enable.

    With gratitude,

    Purnima Kochikar

    July 25th 2022, 2:35 pm

    Final Android 13 Beta update, official release is next!

    Android Developers Blog

    Posted by Maru Ahues Bouza, Director, Android Developer Relations

    We’re just a few weeks away from the official release of Android 13! As we put the finishing touches on the next version of Android, today we’re bringing you Beta 4, a final update for your testing and development. Now is the time to make sure your apps are ready!

    There’s a lot to explore in Android 13, from privacy features like the new notification permission and photo picker, to productivity features like themed app icons and per-app language support, as well as modern standards like HDR video, Bluetooth LE Audio, and MIDI 2.0 over USB. We’ve also extended the updates we made in 12L, giving you better tools to take advantage of tablet and large screen devices.

    You can try Beta 4 today on your Pixel device by enrolling here for over-the-air updates. If you previously enrolled, you’ll automatically get today’s update. You can also get Android 13 Beta on select devices from several of our partners. Visit the Android 13 developer site for details.

    Watch for more information on the official Android 13 release coming soon!

    What’s in Beta 4?

    Today’s update includes a release candidate build of Android 13 for Pixel devices and the Android Emulator. We reached Platform Stability at Beta 3, so all app-facing surfaces are final, including SDK and NDK APIs, app-facing system behaviors, and restrictions on non-SDK interfaces. With these and the latest fixes and optimizations, Beta 4 gives you everything you need to complete your testing.

    Get your apps ready!

    With the official Android 13 release just ahead, we’re asking all app and game developers to complete your final compatibility testing and publish your compatibility updates ahead of the final release. For SDK, library, tools, and game engine developers, it’s important to release your compatible updates as soon as possible -- your downstream app and game developers may be blocked until they receive your updates.

    To test your app for compatibility, just install it on a device running Android 13 Beta 4 and work through the app flows, looking for any functional or UI issues. Review the Android 13 behavior changes for all apps to focus on areas where your app could be affected. Here are some of the top changes to test:

    Remember to test the libraries and SDKs in your app for compatibility. If you find any SDK issues, try updating to the latest version of the SDK or reaching out to the developer for help.

    Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes that apply when your app targets Android 13 and use the compatibility framework to help detect issues quickly.

    Tablets and large-screens support

    Android 13 builds on the tablet optimizations introduced in 12L, so as part of your testing, make sure your apps look their best on tablets and other large-screen devices. You can test large-screen features by setting up an Android emulator in Android Studio, or you can use a large screen device from our Android 13 Beta partners. Here are some areas to watch for:

    You can read more about the tablet features in Android 13 and what to test here.

    Get started with Android 13

    Today’s Beta 4 release has everything you need to test your app and try the Android 13 features. Just enroll your Pixel device to get the update over-the-air. To get started, set up the Android 13 SDK.

    You can also test your app with Android 13 Beta on devices from several of our partners. Visit android.com/beta to see the full list of partners, with links to their sites for details on their supported devices and Beta builds, starting with Beta 1. Each partner will handle their own enrollments and support, and provide the Beta updates to you directly. For even broader testing, you can try Beta 4 on Android GSI images, and if you don’t have a device, you can test on the Android Emulator. For complete details on Android 13, visit the Android 13 developer site.

    What’s next?

    Watch for information on the official Android 13 launch coming in the weeks ahead! Until then, feel free to continue sharing your feedback through our hotlists for platform issues, app compatibility issues, and third-party SDK issues.

    A huge thank you to our developer community for helping shape the Android 13 release! You’ve given us thousands of bug reports and shared insights that have helped us optimize APIs, improve features, fix significant bugs, and in general make the platform better for users and developers.

    We’re looking forward to seeing your apps on Android 13!

    July 22nd 2022, 7:02 pm

    #WeArePlay | Meet Melissa from BringFido in South Carolina. More stories from Japan, India & France.

    Android Developers Blog

    Posted by Leticia Lago, Developer Marketing

    We’re back with more #WeArePlay stories to celebrate you: the global community of people behind apps and games businesses.

    Following last week’s “virtual roadtrip” of all of the US, today we’re kicking off with Melissa from Greenville, South Carolina. She’s on a mission to make the world a more pet-friendly place. Her app, BringFido, helps people find somewhere to stay, eat or visit with their furry friends. In this film you will meet her, her dogs Ace and Roxy, and hear how she went from idea, to website, to growing app and thriving business.

    This week we are also introducing you to game founders from other parts of the world:

    Check out all the stories now at g.co/play/weareplay and stay tuned for even more coming soon.

    How useful did you find this blog post?

    July 22nd 2022, 7:02 pm

    Independent versioning of Jetpack Compose libraries

    Android Developers Blog

    Posted by Jolanda Verhoef, Android Developer Relations Engineer

    Starting today, the various Jetpack Compose libraries will move to independent versioning schemes. This creates the possibility for sub-groups such as androidx.compose.compiler or androidx.compose.animation to follow their own release cycles.

    Allowing these libraries to be versioned independently will decouple dependencies which were previously implicitly coupled, thereby making it easier to incrementally upgrade your application and therefore stay up-to-date with the latest Compose features.

    The first library to break away from the single Compose version is the Compose Compiler. Today we’re releasing the 1.2.0 stable version that brings support for Kotlin 1.7.0! The release is both backwards and forwards compatible with the Compose UI libraries and the Compose Runtime library. This means you can upgrade your Compose Compiler to 1.2.0 stable and use Kotlin 1.7.0, while leaving your other Compose libraries on their current version, for example 1.1.0 stable.

    To upgrade the version of the Compose Compiler in your app, specify the kotlinCompilerExtensionVersion in your build.gradle file. 



    android {
        composeOptions {
            kotlinCompilerExtensionVersion = "1.2.0"
        }
    }
    

    Compose and Kotlin are highly coupled, and we’ve heard your feedback that Compose compiler updates are needed to allow you to upgrade your Kotlin version. We want to make sure that you can use the latest and greatest features (and bug fixes) from both Compose and Kotlin, which is why we plan to release stable versions of the Compose Compiler on a much more regular basis. This means the Compose Compiler version numbers will progress at a faster pace than most other Compose libraries. Since the Compose Compiler is both forwards and backwards compatible, you will be able to upgrade it as soon as a new version is released.

    The Compose Compiler is built as a Kotlin Compiler Plugin, and so you must use a version of the Compose Compiler which is compatible with the version of Kotlin that you have chosen. To help you choose the version that matches your project, check out the Compose-Kotlin compatibility map.

    Moving the Compiler library to a different versioning scheme is the first step in decoupling versioning for the different Compose library groups. You’ll see new stable releases for the other Compose libraries in the next few weeks, and then they will then start following their own release cycles independent of the Compose Compiler.

    Prepare your build for individual versioning and start using the latest Compose Compiler and Kotlin versions now!

    We look forward to seeing what you build with Compose!

    June 29th 2022, 2:02 pm

    Developer-Powered CTS (CTS-D)

    Android Developers Blog

    Posted by Sachiyo Sugimoto, Android Partner Engineering

    A strength of Android is its diverse ecosystem of devices, brought to market by more than 24K distinct devices, and used by billions of people around the world. Since the early releases of Android, we’ve invested in our Android Compatibility Program as a way to ensure that devices continue to provide a stable, consistent environment for apps.

    The Compatibility Test Suite (CTS) is a key part of the program - it is a collection of more than two million test cases that check Android device implementations to ensure developer applications run on a variety of devices and enable a consistent application experience for users.

    Device makers run CTS on their devices throughout the development process, and use it to identify and fix bugs early. Over the years we have constantly expanded the suite by adding new test cases, and today CTS includes more than 2 million tests. It is still growing - as Android evolves, there are new areas to cover and there are also gaps where we are constantly working to create additional tests.

    While most CTS tests are written by Android engineers, we know that app developers have a unique perspective on actual device compatibility issues. So to enhance CTS with better input from app developers, we are adding a new test suite called CTS-D that is built and run by developers like you.



    What is CTS-D?

    CTS-D is a new CTS module that is powered by app developers with a focus on pain points that they are seeing in the field. Developers can build and contribute test cases to CTS-D to help catch those issues, and they can run the CTS-D suite to verify compatibility. Longer term, our plan is to work closely with the Android developer community to expand the CTS-D suite.

    We know that many of you have already created your own tests to verify compatibility on various devices. We want to work with you to bring those tests into AOSP, and you can see the first tests contributed by the community in the initial CTS-D commit here.

    So with CTS-D, we are helping to make those kinds of tests available widely, to help device manufacturers and app developers identify and share issues more effectively.

    How is CTS-D used?

    CTS-D is open-sourced and available on AOSP, so any app developer can use it as a verification tool. Using CTS-D helps to minimize the communication overhead among app developers, device manufacturers and Google, helping to resolve issues effectively.

    If a certain device does not pass a CTS-D test, please report the problem using this issue tracker template. After we verify the issue on the reported device, we will work with our partners to resolve it. We're also strongly advising device manufacturers to use CTS-D to discover and mitigate issues.

    Get Started with CTS-D!

    If you have an idea for CTS-D, please file a test proposal using this issue tracker template before contributing your test code to AOSP. The Android team will review your proposal and verify your test’s eligibility. We’re currently most interested in adding more test cases in the area of Power Management.

    Just like with CTS, new CTS-D test cases must meet eligibility requirements and can only enforce the following:
    1. All public API behaviors that are described in Android developer documentation.
    2. All MUST requirements that are included in Android Compatibility Definition Document (CDD).
    3. Test cases that have not been covered by existing CTS test cases in AOSP
    If you are interested in learning more about CTS-D, check out tutorials here on how to contribute to and utilize CTS-D. Note that the review process for new CTS-D test cases can take some time, so thanks for your patience. We hope you will give CTS-D a try soon. Let’s collaboratively make the Android experience even better!

    June 23rd 2022, 1:15 pm

    Notes from Google Play: making Play work for everyone

    Android Developers Blog


    Hello,

    As Apps Partnerships lead for Google Play, I have the amazing opportunity of meeting with many companies who share great ideas and feedback on how we can support you creating and growing successful businesses.

    In this latest edition of Notes from Google Play, I want to share some of your work that has inspired us, alongside what is top of mind for me and our team. What sums it up for me is our focus on making Google Play work for everyone. It’s about making Play work better for all of you - the people behind apps and games - making it easier for you to grow apps and games business, and helping you better serve everyone, everywhere.


    I will kick us off by sharing the story of OLIO, one of the many apps that has inspired me this year. OLIO is a community-driven app that is fighting to reduce food waste. The app provides a way for people to easily give away food to neighbors. Founders, Tessa Clarke and Saasha Celestial-One, had a goal to create local food sharing networks across the world and ensure nothing of value goes to waste. Having first launched the app in the UK, Tessa and Saasha’s belief in their core mission helped them expand the app to 62 countries and counting, partnering with global stores to help them reach zero waste along the way.

    The success of the OLIO app is a tale of two women from different backgrounds, with the same dream, made for the benefit of everyone and our planet. For me, this is what it’s all about: ensuring that everyone is empowered to build a successful business that can benefit people around the globe.
     
     
    So let me share more about some of my favorite tools and programs that we recently launched with this goal in mind.

    Apps and games by everyone

    Regardless of the size of your company, we want to make sure you have the insights and tools that enable you to make more informed decisions, and ultimately make it easy for you to build and improve your app or game business. Let’s take a look at privacy and security as an example, as this is a critical topic.

    We have various tools and programs to help you build safe and secure experiences for everyone and protect your business, including the Play Integrity APIData Safety sectionPrivacy Sandbox on Android, and also the newly launched Google Play SDK Index.The index provides data and insights about more than 100 of the most widely used commercial SDKs. This can help you navigate third-party SDKs and align with Google Play policies, so that you make more informed decisions for your business and your users.


    We also have programs designed for companies with various needs, from media companies building experiences across devices, to startups solving local problems in the first cohort of Appscale Academy in India. These 100 promising app innovators have already inspired us with their drive and creativity to build high-quality apps that serve and help people across India, and the world.


    We’re also excited to continue investing in programs designed to help grow businesses both big and small. These include the Google Play Partner Program which launched in March and is designed to help larger games businesses reach their growth and performance goals. We also just opened submissions for the Indie Games Accelerator and Indie Games Festival programs. We were particularly inspired by the alumni of the 2021 edition, and you can hear directly from Jimjum Studios in Israel, who create games that encourage kindness, community building, and generosity, in the first episode of Google Play Coffee breaks:


    Beyond the size of the company, apps and games are built and run by people. So we are continuously investing in programs to drive diversity in the ecosystem and empower the next generations of app and game makers. Programs like Change the Game and our investment in organizations driving positive change in the games industry are just a couple of the programs I’m particularly proud of.


    Apps and games for everyone

    We believe everyone should have easy access to great app and game experiences. This enables people to lead better lives, and it helps you grow your businesses.

    In order to help with this, we’ve made some updates that make it easier for everyone to access apps and games at a price that is right for them, which in turn helps you better monetise your apps or games. For example, you asked for more flexibility and less complexity in how you sell your subscriptions, so we launched new subscription capabilities. You can now create multiple base plans and offers for each subscription, all while significantly reducing the cost and complexity of managing an ever-increasing number of SKUs. Whether your aim is to better connect with people that are new to your business, or to retain your loyal users, you have the ability to create offers for everyone.

    We’ve also invested in new tools that help people pay for your apps and games using the methods that suit them best, helping to improve your monetisation. Google Play Commerce provides buyer support in over 170 countries, and we’ve further increased access by adding to our payment method library, which now includes over 300 local payment methods in 70 countries. We also made changes to help you better adapt to local purchasing power by adding the option to lower prices, starting at the equivalent of 5 US cents in any market.


    Serving people better doesn’t only mean adapting pricing, but also optimizing your apps and games for the devices they are using, so they can get the best experience. Whether it’s phones, wearables, tablets or TVs. We introduced new tools and resources to help you create better experiences on large screens and launched Google Play Games beta, to help you expand your game’s reach to PCs.


    Celebrating you

    I started by highlighting OLIO as a business that was brought into existence by newcomers to the apps space, and yet managed to have a positive impact across the world. This is only one of so many inspiring examples out there. We’ve just launched #WeArePlay, a new campaign that celebrates you, the global community of people behind apps and games, and your unique stories. It represents teams of all sizes — some founded by longtime coders and others by tech newcomers, some based in big cities and others in smaller towns. These are short stories that tell personal journeys of making apps or games that are solving a problem or bringing joy to people everywhere.



    I look forward to watching you all continue to build amazing app and game experiences, grow your businesses, and enthrall your users. Here’s to you and your achievements - let’s continue to celebrate every step forward and each small win. That’s what makes us all grow.



    Take care of yourselves and each other,

    Sarah Karam

    Director, Global Apps Partnerships, Google Play

    June 22nd 2022, 8:31 pm

    #WeArePlay | Discover the people building apps & games businesses

    Android Developers Blog

    Posted by Patricia Correa, Director, Global Developer Marketing

    Over 2.5 billion people come to Google Play every month to find apps and games created by millions of businesses from all over the world.

    #WeArePlay celebrates you: the global community of people behind these businesses.

    Each one of you creating an app or game has a different story to tell. Some of you have been coders since childhood, others are newbies who got into tech later in life. Some of you are based in busy cities, others in smaller towns. No matter who you are or how different your story is, you all have one thing in common - you have the passion to turn an idea into a business impacting people all over the world.

    Now, and over the coming months, #WeArePlay celebrates you by sharing your stories.




    We are kicking off the series with the story of Yvonne and Alyssa, the London-based mother and daughter duo who created Frobelles - a dress up game increasing representation of African and Caribbean hair styles.



    You can now also discover the stories of friends Ronaldo, Carlos and Thadeu from Hand Talk Translator (Brazil - my home country!), art lover Zuzanna from DailyArt (Poland) and travel-loving couple Ina & Jonas from TravelSpend (Germany).

    To all apps and games businesses - thank you for being a part of the Google Play community. Your dedication and ambition is helping millions of people learn, connect, relax, exercise, find jobs, give back, laugh, have fun, escape to fantasy lands, and so much more.

    Read more and stay tuned for many more stories at g.co/play/weareplay


    How useful did you find this blog post?

    June 22nd 2022, 1:01 pm

    Privacy Sandbox Developer Preview 3: Support for conversion measurement, custom audiences, and ad se

    Android Developers Blog

    Posted by Fred Chung, Android Developer Relations

     

    The Privacy Sandbox on Android aims to develop new solutions that preserve user privacy and enable effective, personalized advertising experiences for apps. Since our first developer preview, we've shared progress updates and continue to engage the industry on everything from the Developer Preview timeline, to Topics taxonomy, to SDK version management. We appreciate your feedback!

    Today, we’re releasing Developer Preview 3, which includes APIs and developer resources for conversion measurement and remarketing use cases. In addition to the preview of SDK Runtime and Topics APIs released earlier, you can for the first time begin testing and evaluating impact on all key APIs for Privacy Sandbox on Android.


    Event-Level and Aggregate Attribution Reporting APIs

    These APIs allow developers to measure when an ad click or view event leads to a conversion, such as the download of a new game. They support key use cases for attribution across apps and the web, and improve user privacy by removing reliance on cross-party user identifiers.

    This release includes a developer guide and sample apps to help you understand client- and server-side set up and interactions for key parts of the attribution reporting workflow, including:

    To help facilitate testing, the release also supports ADB commands to override reporting time windows. Refer to the API reference to learn more about the Android client APIs.


    Custom Audience and Ad Selection APIs

    Part of FLEDGE for Android, these APIs provide the building blocks to serve customized ads to users based on previous app engagement, without third-party data sharing. You’ll be able to:

    To learn more, refer to the Custom Audience and Ad Selection API reference pages, as well as the release notes.


    Other key features

    If you’re just starting to explore the Developer Preview, please also review the supported features described in the SDK Runtime and Topics API developer guides.

    If you need a refresher on key technologies for the Privacy Sandbox on Android, we recommend watching this overview video and reviewing the design proposals.

    Get started with the Developer Preview

    Today’s Developer Preview release provides the resources you need to begin early testing of features and share feedback. To get started developing, see instructions to set up the SDK and system images on the emulator or supported Pixel devices.

    For more information on the Privacy Sandbox on Android Developer Preview, visit the developer site and sign up for our newsletter to receive regular updates.

    June 16th 2022, 1:29 pm

    Submissions now open: Indie games programs to help developers grow with Google Play

    Android Developers Blog

    Posted by Leticia Lago, P&E Developer Marketing

     

    At Google Play we’re committed to helping developers of all sizes reach their full potential, and go further, faster. Today we’re opening submissions for our two annual programs supporting the indie game community, as they bring some of the most innovative titles to players worldwide.

    If you are an indie games developer, check out our Accelerator and Festival programs, where you have the chance to boost your game’s visibility, get training, and tap into our community of gaming experts.

    These programs are designed to help you grow no matter what stage you are in:

    After being selected as a Festival finalist and participating in the Accelerator in 2021, Co-founder of Jimjum Studios, Nimrod Kimhi said "being in the Accelerator probably saved us two years worth of mistakes." Read below to learn more about the programs.

    Submissions are open until July 1st.


     

    Supercharge your growth with mentorship & live masterclasses

    If you’re an indie developer who is early in your journey - either close to launching a new game or have recently launched a title - this high-impact program is designed for you.

    With the help of our network of gaming experts, the Indie Games Accelerator provides education and mentorship to help you build, launch and grow successfully.

    Selected game studios will be invited to take part in the 10-week acceleration program starting in September 2022. This is a highly-tailored program for small game developers from across 70+ eligible countries. It includes a series of online masterclasses, talks and gaming workshops, hosted by some of the best in the industry.

    You’ll also get the chance to meet and connect with other passionate developers from around the world who are looking to take their games to the next level.

    Apply to the Accelerator by July 1st.


     

    Win promotions that put your indie game in the spotlight

    If you have recently launched a new, high quality game on Google Play, enter your game to be showcased at the Indie Games Festival and win promotions.

    Once again, we are hosting three international competitions for indie game developers from selected European countries, Japan or South Korea.


    The Festival jury consists of both gaming experts and Googlers, who are charged with selecting creative indie games that are ready for the spotlight.

    Top indie games will be featured during the online Festival finals, where you can get your game discovered by game industry experts and players worldwide. The winners will also get featured on Google Play, prizes and additional promotions such as campaigns worth 100,000 EUR.


    Apply to the Festivals in Europe, Japan or South Korea by July 1st.

     

    All submissions must be completed by 1 July @ 1 pm CET and meet all eligibility requirements.

    For more updates about all of our programs, resources and tools for indie game developers, follow us on Twitter @GooglePlayBiz and Google Play business community on LinkedIn.


    How useful did you find this blog post?

    June 14th 2022, 5:42 pm

    Android 13 Beta 3 and Platform Stability

    Android Developers Blog

    Posted by Dave Burke, VP of Engineering

    Today we’re releasing the third Beta of Android 13, taking us into the final phase of our cycle where we’re focusing on polish and performance. With Android 13, we’ve built on our core themes of privacy and security, developer productivity, and tablet and large screen support.

    There’s a lot to explore in Android 13, from privacy features like the new notification permission and photo picker, to productivity features like themed app icons and per-app language support, as well as modern standards like HDR video, Bluetooth LE Audio, and MIDI 2.0 over USB. We’ve also extended the newer updates we made in 12L, giving you better tools to take advantage of the 270+ million tablet and large screen devices in active use.

    Beta 3 takes Android 13 to Platform Stability, which means that the developer APIs and all app-facing behaviors are now final. We’re thankful for all the feedback you’ve shared to help us get to this point! For developers, the focus is now on compatibility testing and quality as you prepare your apps for the official release later in the year!

    You can get Beta 3 on your Pixel device by enrolling here for over-the-air updates. If you previously enrolled, you’ll automatically get today’s update. You can also try Android 13 Beta on select devices from several of our partners - learn more at android.com/beta. Read on for a quick look at how to get your app ready, and visit the Android 13 developer site for details.


    Platform Stability

    With Beta 3, Android 13 reaches Platform Stability, a milestone that means all app-facing behaviors and APIs, including the official API Level 33 SDK and NDK APIs, are now final. So from Beta 3, you can confidently develop and release your compatibility updates knowing that the platform won’t change.

    We’re asking all app and game developers to start your final compatibility testing now and prepare to publish your compatibility updates as soon as possible ahead of the final release.

    For all SDK, library, tools, and game engine developers, it’s even more important to start testing now and release your compatible updates as soon as possible -- your downstream app and game developers may be blocked until they receive your updates. So when you’ve released a compatible update, be vocal and let your developers know!


    App compatibility

    App compatibility means that your app runs as intended on a new version of the platform. With each release, we make integral changes to the platform that improve privacy and security and the overall user experience across the OS. These can affect your apps, so it’s important to test your app now, make any updates needed, and publish a compatible update to your users ahead of the final release. It’s a basic but critical level of quality that your users will appreciate as they explore what’s new in Android 13.

    To test your app for compatibility, just install your production app from Google Play or other source onto a device running Android 13 Beta 3. Work through all of the app’s flows and watch for functional or UI issues. Review the behavior changes to focus your testing. Here are some changes to watch for:

    Also remember to test the libraries and SDKs in your app for compatibility. If you find any issues, try updating to the latest version of the library or SDK or reaching out to the developer for help.

    Once you’ve published the compatible version of your current app, you can start the process to update your app's targetSdkVersion. Review the behavior changes for apps targeting Android 13 and use the compatibility framework to help you detect issues quickly. Here are some of the changes to test for (these apply only to apps with targetSdkVersion set to API 33 or higher):


    Tablets and large-screens support

    Android 13 builds on the tablet optimizations introduced in 12L, so as part of your testing, make sure your apps look their best on tablets and other large-screen devices. You can test with the large screens features by setting up an Android emulator in Android Studio, or you can use a large screen device from our Android 13 Beta partners. Here are some areas to watch for:

    You can read more about the tablet features in Android 13 and what to test here.


    Get started with Android 13!

    Today’s Beta release has everything you need to test your app and try the Android 13 features. Just enroll your Pixel device to get the update over-the-air. To get started, set up the Android 13 SDK.

    You can also test your app with Android 13 Beta on devices from several of our partners. Visit android.com/beta to see the full list of partners, with links to their sites for details on their supported devices and Beta builds, starting with Beta 1. Each partner will handle their own enrollments and support, and provide the Beta updates to you directly. For even broader testing, you can try Android 13 Beta 3 on Android GSI images, and if you don’t have a device, you can test on the Android Emulator.

    For complete details on Android 13, visit the Android 13 developer site.

    June 14th 2022, 5:42 pm

    3 things to know about Form Factors at Google I/O'22

    Android Developers Blog

     

    With close to half a billion cars, TVs, watches and laptops running on Android, it is more important than ever for apps to work seamlessly across every device. This year at I/O, we renewed our focus on form factors and announced major updates for Wear OS and Large Screens. To help you get to the bottom of what’s new, here are the three things you need to know about Form Factors at Google I/O:


    #1: Building Wear OS and fitness apps is simpler than ever

     

    At I/O we announced the Beta release of Compose for Wear OS, our modern declarative UI toolkit designed to help developers build exceptional user experiences for Wear OS. Compose for Wear OS shares the foundation and principles of Jetpack Compose, helping to simplify and accelerate UI development. Additionally, Compose for Wear OS offers the Material catalog with components that are optimized for the watch experience.

    We’ve been developing Compose for Wear OS with open source community feedback and participation. Since the Developer Preview, we’ve added and improved a number of components such as navigation, scaling lazy lists, input and gesture support and many more. Compose for Wear OS is now feature complete for the 1.0 release coming soon and the API is stable - so you can begin building beautiful, production-ready apps.

    Health Services—the power efficient and easy-to-use library for collecting real-time sensor data on smartwatches—will soon be available in beta and ready for production use. Health Services enables apps to take advantage of modern smartwatch architecture, thus helping conserve battery while still delivering high frequency data. Since the alpha release last year, we have been working hard to increase performance and improve the developer experience. We have also made some improvements to the API in response to your feedback.

    If you have an existing health and fitness app for Wear OS you want to update, or have a completely new app in mind, we suggest you look at Health Service to provide the best experience for Wear 3 users and prepare your app for additional devices and sensors in the future. For example, this library will power all the Google- and Fitbit-branded health and fitness experiences on the recently announced Google Pixel Watch.

    And, last but not least, we just launched Health Connect. With Health Connect, users will be able to securely store health and fitness data on their phone and connect and share that data with some of their favorite health and fitness apps. Samsung Health, Google Fit and Fitbit are integrating with Health Connect, along with many popular health and fitness apps. Health Connect is a common set of APIs for storing & sharing health data on Android phones. Developers can read from & write data to an on-device data store and we’ve standardized the schema and API behavior, making it easy for you to use the data. We know how important the privacy of each user’s health data is, so we centralized permissions and privacy controls - making it clear and simple for your users to manage and control this data.


    #2: Google is all-in on tablets

    Google is going big on large screens with innovations in hardware, optimizations in the operating system and a major investment in our app ecosystem. In the first quarter of this year, we saw active large screen users approaching 270 million, making it a great time to optimize for tablets, foldables and Chrome OS.

    Since last I/O we launched Android 12L, a feature drop that makes Android 12 even better on large screens. With Android 13, we are including all of these improvements and more. Android 12L and 13 have a huge number of optimizations for large screens, including the task bar, multi-tasking, keyboard and mouse support, and a compatibility mode for applications. We also have exciting updates to guidance, testing and tools. To take the guesswork out of optimizing and testing your app for large screens, we created a set of Large Screen Quality guidelines and a number of Material Design Canonical Layouts. Our guidance is implemented in our Jetpack libraries, which bake in many of the most common tasks for Large Screen development, such as drag and drop.


     

    Hardware innovation is a cornerstone of Google’s investment in large screens - this year and beyond. At I/O, we announced the Google Pixel tablet, coming in 2023. Plus, our partners are creating some amazing devices with tablets, Chromebooks, and foldables coming from companies like Samsung, Lenovo, and OPPO.

    With the incredible hardware and operating system innovations, more apps than ever are optimizing for large screens. Apps like Facebook, TikTok, HBO Max and Zoom look great on large screens. Here at Google, we recognize the opportunity with large screens. Apps like YouTube, Google Maps, Google Photos, Chrome, and many of our most popular apps are rolling out large screen optimizations, with more to come.

    These apps - and more - are available on the Play Store, where we have made some of our most impactful updates to date. We are committed to helping users find the best large-screen optimized apps in the Play Store with new large screens focused editorial content and separate reviews and ratings for large-screen applications. Plus, we are updating Google Play to look awesome on a tablet, Chromebook or foldable device.


    #3: We’re here to support you!

    To make your apps even better on large screens and Wear OS, we’ve created in-depth content for making your app work better across different types of inputs, screen sizes and devices.

    In Android Studio Dolphin Beta and Electric Eel Canary we’ve added new features for Wear OS and Large screens to help you be more productive when developing and testing for different form factors. Read more


    Looking to get started? Here’s all the amazing I/O content to help you on your way:

    Progress on initiatives to keeping Google Play safe

    Android Developers Blog

    Posted by Krish Vitaldevara Director, Product Management, Play and Android Trust & Safety

     

    We want to keep you updated on the privacy and security initiatives we shared earlier this year, so you can plan ahead and use new tools to safely build your business. In the past few months, we launched:


    What’s coming up

    Thank you for your partnership in making Google Play a safe and trustworthy platform for everyone.

    June 14th 2022, 5:42 pm

    3 things to know about Android Privacy, Platform & Security from Google I/O'22

    Android Developers Blog

    Posted by Dan Galpin, Developer Relations Engineer

     

    Amidst the whirlwind of content at Google I/O, we shared huge announcements involving privacy, security, and the Android platform. Read on for the details, and don’t forget to watch the topic playlist on YouTube.


    #1: Privacy Sandbox on Android

    We recently released the first Privacy Sandbox on Android Developer Preview, so you can get an early look at the SDK Runtime and Topics API. This provides a path for new advertising solutions that improve user privacy without putting access to free content and services at risk.

    You can conduct preliminary testing of these new technologies, evaluate how you might adopt them for your solutions, and share feedback with us. Learn more in the “Overview of the Privacy Sandbox in Android” session.


    #2: Google Play SDK Index

    The new Google Play SDK index is a public portal that lists over 100 of the most widely used commercial SDKs. It contains information like which app permissions the SDK requests, statistics on the apps that use them, and which version of the SDK is most popular, so you can evaluate if an SDK is right for your business and your users. Android Studio Electric Eel allows you to view dependency insights from Google Play SDK Index; if a specific version of a library has been marked as 'outdated' by its author, a corresponding Lint warning appears when viewing that dependency definition. Learn more on our blog post and watch the “What’s new in Google Play” and “What’s new in Android development tools” sessions.


    #3: Android 13!

    The second Beta of Android 13 is now available. You can enhance your app with Android 13 features like app-specific language support and themed app icons, while the "Basics for System Back" talk covers the new Android 13 opt-in API that lets you tell the system that you’re handling back ahead of time to make the back experience more predictable and fluid.

    The "Developing Privacy User-centric Apps" session will help you get your apps ready for the latest features for privacy and security, like the new notification permission, the privacy-protecting photo picker, and improved permissions for pairing with nearby devices and accessing media files.

    The "What's new in Android Media" talk will help you build with modern standards like HDR video and Bluetooth LE Audio, while the "What's New in Android Camera" talk provides a … snapshot … of what we’re doing in CameraX, such as support for video capture and WYSIWYG camera controls.

    You can get started by enrolling your Pixel device here. The Android 13 Beta is now available to test on a range of devices from Asus, Lenovo, Nokia, OnePlus, Oppo, Realme, Sharp, TECNO, Vivo, Xiaomi, and ZTE - visit developer.android.com/13 to learn more.

    This is just a fraction of what we're doing to improve the Android platform, user privacy, and security. Head on over to the playlist to learn more.

    June 14th 2022, 5:42 pm

    Google Play @ Google I/O - 3 updates you need to know

    Android Developers Blog

    Posted by Tom Grinsted - Group Product Manager, Google Play

    Here at Google Play, we’re always working on new ways to help developers grow their businesses, whether that’s by increasing installs, improving engagement, or boosting monetization. So in case you missed it, here are the top 3 new ways to grow your business that we announced at this year’s Google I/O:

    #1: Improved custom store listings

    Custom store listings have gotten a major update, giving you new ways to make a great first impression by showing the right message to each person.

    You can now generate unique deep links to your custom listings, so you can show different listings to users depending on which channel or site they come from. And because Play Console provides analytics for each of your custom listings, you can see how effective each variation is and optimize them over time.

    All developers can create up to 50 custom store listings, so you can create more tailored narratives for your users than ever before. With up to 5 experiments per listing, the opportunities for optimization are huge!

    Custom store listings have gotten a major update, giving you new ways to improve your conversion rate.


    #2: LiveOps open beta

    LiveOps are self-service merchandising units in the Play Store that promote limited-time events, offers, and major updates for your game or app. Developers in our beta can submit content to help inspire installs, increase engagement, and drive sales.

    Plus, they can now use deep links to drop users directly into the most relevant part of their app or game, then measure success with the new LiveOps reporting dashboard in Play Console. These reports give a granular view of the performance metrics of each event, displaying the results over time and by outcome – whether that’s acquisitions, opens, or updates.

    Learn more about LiveOps and express interest in our beta program here.

    Developers in our LiveOps beta can submit content to be featured on the Google Play Store.

    #3: New flexible tools to grow your subscriptions

    As subscription business models evolve, many developers have asked us for more flexibility and less complexity in how they sell subscriptions. In a major update, we launched new subscription capabilities, allowing you to configure multiple base plans and offers for each subscription. Acquire new subscribers, incentivize upgrades, and retain existing subscribers, by creating multiple offers supporting different stages of the subscription lifecycle, all while significantly reducing the cost and complexity of managing an ever-increasing number of SKUs.

    For each subscription, you can now configure multiple base plans and offers, without needing to manage an ever-increasing number of SKUs.

    Plus, you can now offer prepaid plans that give users access for a fixed amount of time, and make a great option for regions where pay-as-you-go is standard or for users not ready to commit to an auto-renewing plan. Users can easily extend their access period at any time before plan expiration, with a top-up in your app, or right on the Play Store subscription screen.

    That was just three launches from a whole bunch of great updates to help you grow and thrive with Play. Want to see more? Be sure to catch the full playlist on Google Play from Google I/O.

    June 14th 2022, 5:42 pm

    Implementing Dynamic Color: Lessons from the Chrome team

    Android Developers Blog

    Posted by Rebecca Gutteridge, Developer Relations Engineer on Android

     

    Introduction

    With the release of Android 12 and Material You, we provided documentation and guidance on dynamic color foundations, how to implement dynamic color in Jetpack Compose and a getting started codelab. But creating a scalable, personalized, and accessible app with dynamic color can feel like a daunting task. We talked to designers and developers on Google Chrome, and they offered to share some tips on how they approached it at scale for their Android app. Here’s what they suggest if you are considering adopting dynamic color in your app.


    Where to start

    Start by reviewing all your current screens in your app and identify your current colors, themes and surfaces. Chrome kicked off a design review and evaluated their color scheme. Material 3 encourages designers and developers to use color tokens which enable flexibility and consistency across an app by allowing designers to assign an element's color role in a UI, rather than a set value. This is particularly powerful when considering designing for light and dark themes and dynamic color.


    Figure 1 : An example surface for Chrome, the Tab Switcher, identifying the color token for each element


    Your app may already have a color token system, so reviewing how the new Material You dynamic color enabled color scheme matches your previous naming convention is an important exercise. Engineering should align with UX to review the new color token system with your mocks. This is also a good opportunity to review your current colors.xml, themes.xml and styles.xml.In particular check that your app correctly differentiates between Styles and Themes as well as correctly extending from base themes. It is also worth reviewing if there are redundant colors in your existing scheme or an opportunity to make a more consistent color scheme throughout your app. Dynamic color implementation with Compose is also available.


    Accessibility

    Ensuring your app’s color system is accessible is critical for designing for everyone and creating products that are inclusive to the widest possible audience. Dynamic color is committed to guaranteeing that the color selection model has accessibility requirements built in. Material 3 color schemes are defined by tonality rather than hue or hex value, this system of tonal palettes is central to making any color system accessible by default. Using a minimum 60 luminance spread in color pairings provides enough contrast to ensure accessibility standards.


    Figure 2 : Combining color based on tonality, rather than hex value or hue, is one of the key systems that make any color output accessible.


    Phase approach

    When looking at implementation, consider this upgrade as a phased approach if needed, targeting the primary surfaces first and leveraging that dynamic color can be applied at a per activity level. This was how Chrome was able to update their app and used it as an opportunity to migrate some of their older UI app compat components to the modern Material 3 components, such as Top app bar.


    How to support custom colors

    Your app may have custom colors or brand colors that you do not want to change with the user’s preference. These can simply be added additionally as you are building out your color scheme. Alternatively you can import additional colors to extend your color scheme using the Material Theme Builder to create a unified color system. The theme builder includes a color harmonization feature that shifts the tone of a custom color to ensure that visual balance and accessible contrast is achieved when combined with user-generated colors.


    Figure 3: Understand how to harmonize custom colors with the Material guidance.


    For Chrome, here is a deep dive into two examples of where protected colors are important for them and how they approached it.


    Publisher colors

    It is important that Chrome allows for brands to keep their known colors and not impact that functionality when adopting dynamic color.

    Publishers have the ability to set a publisher color using a metadata element in their html. The top toolbar is controlled using a decision tree to programmatically determine the toolbar color and icon color based on a series of cascading rules:


    Incognito

    In Incognito mode, the dark gray color scheme has a semantic importance and reassurance for users. Chrome decided to preserve and leverage their existing color system and not change it dynamically.


    Figure 4: Incognito mode remains the same


    To achieve this, Chrome defined non adaptive colors that map to hex values and adaptive colors that map to different non adaptive colors for day/night mode. For incognito mode, Chrome uses the dark non adaptive colors as they are easily recognized by the users as incognito. With these adaptive colors, Chrome created a baseline theme.

    The table below shows what their background colors look like after applying dynamic colors:

    Themes and Theme Overlays

    One thing to consider for adhering to theme best practices, is to leverage Theme Overlays properly. The Chrome team used this opportunity to refactor their themes and leveraged the power of Theme Overlays for a given activity. At times Chrome saw that full themes were being used where a ThemeOverlay would be more appropriate. Dynamic color and Material3 encourages better code hygiene.

    Take a look at this example, previously the theme for full screen dialogs inherited from a full theme. This overrode all the attributes from the activity theme, undoing the dynamic colors or any overrides that are applied at the activity level. With the dynamic color work, the team became more deliberate in how they define and use their theming.

    Previously:

        <style name="Base.Theme.Chromium.Fullscreen" parent="Theme.BrowserUI.DayNight">
        <item name="windowActionBar">true</item>
              <item name="colorPrimary">...</item>
              <item name="colorAccent">...</item>
        </style>
    

    Now:

        <style name="Base.ThemeOverlay.BrowserUI.Fullscreen" parent="">
        <item name="android:windowContentTransitions">false</item>
        </style>
    

    Recommendations from Google Chrome designers

    This section shares some key lessons that Chrome’s designers applied to successfully create an intentional and unified theme

    Recommendations from Google Chrome developers

    This section shares some key lessons that Chrome’s developers applied to successfully migrate

    Dynamic color is coming to more Android 12 phones globally, including devices by Samsung, OnePlus, Oppo, Vivo, realme, Xiaomi, Tecno, and more! As you work with dynamic color in your app, we’d love to get your feedback via the Material Android issue tracker. Happy coloring!

    May 27th 2022, 1:42 pm

    Modern Android Development at Google I/O ‘22

    Android Developers Blog

    Posted by Nick Butcher, Developer Relations Engineer

     

    Our goal is to make developing beautiful and engaging Android apps as fast and easy as possible. We want to take on the complex parts of building apps so that you can focus on your app’s features and deliver high quality experiences to your users.

    We call this approach Modern Android Development (or MAD for short!) and deliver it through a suite of tools, libraries and guidance. At Google I/O we announced a number of updates and additions to our MAD offerings; here’s a recap of the three largest announcements.


    #1 Compose 1.2 Beta

    Jetpack Compose 1.2 reaches the first Beta, which means the API is stable. We continue to build out our roadmap, bringing the APIs you need to support more advanced use cases like downloadable fonts, LazyGrids, window insets, nested scrolling interop, and more tooling support with features like LiveEdit, Recomposition counts in the Layout Inspector and Animation Preview. Learn more about how developers like Airbnb are improving their productivity with Jetpack Compose, and check out what else is new in Compose.


    #2 Baseline Profiles

    Baseline profiles allow you to embed a profile to guide the Android Runtime about which code paths should be pre-compiled rather than interpreted, which could dramatically impact critical user journeys like app startup. This is especially significant when using unbundled libraries like Jetpack Compose which don’t benefit from optimizations in platform code.

    Many Jetpack libraries (including Jetpack Compose) already ship baseline profiles, but you can learn how to add them to your own apps and libraries to boost their performance. We've seen up to 40% faster app startup times thanks to adding baseline profiles alone, no other code changes required!


    #3 Live Edit

    With Live Edit you can edit composables and view those changes in real time, on the Compose Preview or on physical devices or emulators, enabling rapid iteration. Live Edit is an opt-in experimental feature in Android Studio Electric Eel, with a number of limitations. Please try it out and provide your feedback.

    Those were the top three announcements about Modern Android Development at Google I/O. To learn more, check out the full playlist of talks and workshops.

    May 23rd 2022, 1:49 pm

    Boost the security of your app with the nonce field of the Play Integrity API

    Android Developers Blog

    Posted by Oscar Rodriguez, Developer Relations Engineer

    With the recent launch of the Play Integrity API, more developers are now taking action to protect their games and apps from potentially risky and fraudulent interactions.

    In addition to useful signals on the integrity of the app, the integrity of the device, and licensing information, the Play Integrity API features a simple, yet very useful feature called “nonce” that, when correctly used, can further strengthen the existing protections the Play Integrity API offers, as well as mitigate certain types of attacks, such as person-in-the-middle (PITM) tampering attacks, and replay attacks.

    In this blog post, we will take a deeper look at what the nonce is, how it works, and how it can be used to further protect your app.

    What is a nonce?

    In cryptography and security engineering, a nonce (number once) is a number that is used only once in a secure communication. There are many applications for nonces, such as in authentication, encryption and hashing.

    In the Play Integrity API, the nonce is an opaque base-64 encoded binary blob that you set before invoking the API integrity check, and it will be returned as-is inside the signed response of the API. Depending on how you create and validate the nonce, it is possible to leverage it to further strengthen the existing protections the Play Integrity API offers, as well as mitigate certain types of attacks, such as person-in-the-middle (PITM) tampering attacks, and replay attacks.

    Apart from returning the nonce as-is in the signed response, the Play Integrity API doesn’t perform any processing of the actual nonce data, so as long as it is a valid base-64 value, you can set any arbitrary value. That said, in order to digitally sign the response, the nonce is sent to Google’s servers, so it is very important not to set the nonce to any type of personally identifiable information (PII), such as the user’s name, phone or email address.

    Setting the nonce

    After having set up your app to use the Play Integrity API, you set the nonce with the setNonce() method, or its appropriate variant, available in the Kotlin, Java, Unity, and Native versions of the API.

    Kotlin:

    val nonce: String = ...
    
    // Create an instance of a manager.
    val integrityManager =
        IntegrityManagerFactory.create(applicationContext)
    
    // Request the integrity token by providing a nonce.
    val integrityTokenResponse: Task<IntegrityTokenResponse> =
        integrityManager.requestIntegrityToken(
            IntegrityTokenRequest.builder()
                 .setNonce(nonce) // Set the nonce
                 .build())
    

    Java:

    String nonce = ...
    
    // Create an instance of a manager.
    IntegrityManager integrityManager =
        IntegrityManagerFactory.create(getApplicationContext());
    
    // Request the integrity token by providing a nonce.
    Task<IntegrityTokenResponse> integrityTokenResponse =
        integrityManager
            .requestIntegrityToken(
                IntegrityTokenRequest.builder()
                .setNonce(nonce) // Set the nonce
                .build());
    

    Unity:

    string nonce = ...
    
    // Create an instance of a manager.
    var integrityManager = new IntegrityManager();
    
    // Request the integrity token by providing a nonce.
    var tokenRequest = new IntegrityTokenRequest(nonce);
    var requestIntegrityTokenOperation =
        integrityManager.RequestIntegrityToken(tokenRequest);
    

    Native:

    /// Create an IntegrityTokenRequest object.
    const char* nonce = ...
    IntegrityTokenRequest* request;
    IntegrityTokenRequest_create(&request);
    IntegrityTokenRequest_setNonce(request, nonce); // Set the nonce
    IntegrityTokenResponse* response;
    IntegrityErrorCode error_code =
            IntegrityManager_requestIntegrityToken(request, &response);
    

    Verifying the nonce

    The response of the Play Integrity API is returned in the form of a JSON Web Token (JWT), whose payload is a plain-text JSON text, in the following format:

    {
      requestDetails: { ... }
      appIntegrity: { ... }
      deviceIntegrity: { ... }
      accountDetails: { ... }
    }
    

    The nonce can be found inside the requestDetails structure, which is formatted in the following manner:

    requestDetails: {
      requestPackageName: "...",
      nonce: "...",
      timestampMillis: ...
    }
    

    The value of the nonce field should exactly match the one you previously passed to the API. Furthermore, since the nonce is inside the cryptographically signed response of the Play Integrity API, it is not feasible to alter its value after the response is received. It is by leveraging these properties that it is possible to use the nonce to further protect your app.

    Protecting high-value operations

    Let us consider the scenario in which a malicious user is interacting with an online game that reports the player score to the game server. In this case, the device is not compromised, but the user can view and modify the network data flow between the game and the server with the help of a proxy server or a VPN, so the malicious user can report a higher score, while the real score is much lower.

    Simply calling the Play Integrity API is not sufficient to protect the app in this case: the device is not compromised, and the app is legitimate, so all the checks done by the Play Integrity API will pass.

    However, it is possible to leverage the nonce of the Play Integrity API to protect this particular high-value operation of reporting the game score, by encoding the value of the operation inside the nonce. The implementation is as follows:

    1. The user initiates the high-value action.
    2. Your app prepares a message it wants to protect, for example, in JSON format.
    3. Your app calculates a cryptographic hash of the message it wants to protect. For example, with the SHA-256, or the SHA-3-256 hashing algorithms.
    4. Your app calls the Play Integrity API, and calls setNonce() to set the nonce field to the cryptographic hash calculated in the previous step.
    5. Your app sends both the message it wants to protect, and the signed result of the Play Integrity API to your server.
    6. Your app server verifies that the cryptographic hash of the message that it received matches the value of the nonce field in the signed result, and rejects any results that don't match.

    The following sequence diagram illustrates these steps:

    As long as the original message to protect is sent along with the signed result, and both the server and client use the exact same mechanism for calculating the nonce, this offers a strong guarantee that the message has not been tampered with.

    Notice that in this scenario, the security model works under the assumption that the attack is happening in the network, not the device or the app, so it is particularly important to also verify the device and app integrity signals that the Play Integrity API offers as well.

    Preventing replay attacks

    Let us consider another scenario in which a malicious user is trying to interact with a server-client app protected by the Play Integrity API, but wants to do so with a compromised device, in a way so the server doesn’t detect this.

    To do so, the attacker first uses the app with a legitimate device, and gathers the signed response of the Play Integrity API. The attacker then uses the app with the compromised device, intercepts the Play Integrity API call, and instead of performing the integrity checks, it simply returns the previously recorded signed response.

    Since the signed response has not been altered in any way, the digital signature will look okay, and the app server may be fooled into thinking it is communicating with a legitimate device. This is called a replay attack.

    The first line of defense against such an attack is to verify the timestampMillis field in the signed response. This field contains the timestamp when the response was created, and can be useful in detecting suspiciously old responses, even when the digital signature is verified as authentic.

    That said, it is also possible to leverage the nonce in the Play Integrity API, to assign a unique value to each response, and verifying that the response matches the previously set unique value. The implementation is as follows:

    1. The server creates a globally unique value in a way that malicious users cannot predict. For example, a cryptographically-secure random number 128 bits or larger.
    2. Your app calls the Play Integrity API, and sets the nonce field to the unique value received by your app server.
    3. Your app sends the signed result of the Play Integrity API to your server.
    4. Your server verifies that the nonce field in the signed result matches the unique value it previously generated, and rejects any results that don't match.

    The following sequence diagram illustrates these steps:

    With this implementation, each time the server asks the app to call the Play Integrity API, it does so with a different globally unique value, so as long as this value cannot be predicted by the attacker, it is not possible to reuse a previous response, as the nonce won’t match the expected value.

    Combining both protections

    While the two mechanisms described above work in very different ways, if an app requires both protections at the same time, it is possible to combine them in a single Play Integrity API call, for example, by appending the results of both protections into a larger base-64 nonce. An implementation that combines both approaches is as follows:

    1. The user initiates the high-value action.
    2. Your app asks the server for a unique value to identify the request
    3. Your app server generates a globally unique value in a way that malicious users cannot predict. For example, you may use a cryptographically-secure random number generator to create such a value. We recommend creating values 128 bits or larger.
    4. Your app server sends the globally unique value to the app.
    5. Your app prepares a message it wants to protect, for example, in JSON format.
    6. Your app calculates a cryptographic hash of the message it wants to protect. For example, with the SHA-256, or the SHA-3-256 hashing algorithms.
    7. Your app creates a string by appending the unique value received from your app server, and the hash of the message it wants to protect.
    8. Your app calls the Play Integrity API, and calls setNonce() to set the nonce field to the string created in the previous step.
    9. Your app sends both the message it wants to protect, and the signed result of the Play Integrity API to your server.
    10. Your app server splits the value of the nonce field, and verifies that the cryptographic hash of the message, as well as the unique value it previously generated match to the expected values, and rejects any results that don't match.

    The following sequence diagram illustrates these steps:

    These are some examples of ways you can use the nonce to further protect your app against malicious users. If your app handles sensitive data, or is vulnerable against abuse, we hope you consider taking action to mitigate these threats with the help of the Play Integrity API.

    To learn more about using the Play Integrity API and to get started, visit the documentation at g.co/play/integrityapi.

    May 17th 2022, 1:14 pm

    Airbnb uses Jetpack Compose to empower devs to do their best work

    Android Developers Blog

    How Compose enables Airbnb to create better host and guest experiences

     

    Since 2007, Airbnb has grown to connect more than 4 million hosts with more than 1 billion guests across the globe. One of the reasons behind the app’s success is that its developers aim to achieve engineering excellence by focusing on two main principles: using technology that sparks innovative development and empowering the engineers behind the work.

    Jetpack Compose, Android’s modern UI-building toolkit, directly supports both of Airbnb’s development principles. Compose provided a solid foundation for adaptable, quality engineering and reduced boilerplate code, so developers could focus on delivering a great user experience — and advance their two-fold pursuit of engineering excellence.

    Airbnb started testing Compose in 2020 when it was in developer preview. As an early adopter, the Airbnb team was eager use the various new features and simplify their workflow. Now, having gained confidence using Compose in production, Airbnb engineers continue to be satisfied with how it improved their development process.

    Equipping engineers for success

    Compose’s deterministic testing helped ensure Airbnb’s engineers had tight control over the UI tests they ran and eliminated common flakiness, thereby strengthening their confidence in the quality of every part of their app and the user experiences they were creating. Engineers can now also use Compose to test animations they previously couldn't.

    Similarly, Airbnb developers used Compose to add automated screenshot tests to their codebase. Because they didn’t need to write the code for screenshot testing, engineers could go straight into using it to catch bugs and regressions. This gave them more time to review and guarantee feature functionality and UI appearance across a variety of devices.

    Compose is great to use alongside Views. This interoperability made it easy for Airbnb engineers to onboard and test the new UI toolkit at their own pace, so they were able to experience the benefits of Compose without having to migrate entire features.

    These engineering improvements gave them the solid technical foundations they needed to serve users in fresh and improved ways.

    Engineering efficiencies improve user experiences

    Airbnb keeps hosts and guests at the heart of their decisions. The engineering team was excited to adopt Compose when they learned about how it would enable them to more easily and efficiently produce UI, resulting in better experiences for their end users.

    Because Compose made Airbnb’s features require significantly less code to write and manage, the Airbnb team boosted their efficiency. All of this meant the team could focus its energy on executing the complex tasks involved in developing the innovative features that could best serve users.

    Because their features now require less code, the Airbnb team will be able to slow the growth of their app size in the long run. Providing a smaller app is important to Airbnb as an organization with users across the globe that looks to ensure all hosts and guests can easily download and access their app — especially those with older devices or logging on from countries with high data costs.

    Using Compose’s engineering enhancements, the Airbnb team was able to put user needs first.

    Improve developer productivity with Compose

    Compose simplified UI development to allow Airbnb engineers the freedom to focus on more dynamic and innovative features that benefit the app’s hosts and guests.

    Learn how you can improve your team’s productivity with Jetpack Compose.

    May 12th 2022, 4:37 pm

    Now in Android - a new, open source, real-world sample app

    Android Developers Blog

    Posted by Paris Hsu, Product & Design, Android and Don Turner, Developer Relations Engineer, Android

    The Now in Android app is now on GitHub!

    For two years, 'Now in Android' has been a popular blog and YouTube series, providing you with the latest and greatest developer news from the Android team. Starting today, you can check out the alpha version of the Now in Android app on GitHub! 🎉

    The app has two goals:

    Firstly, it showcases best practices, opinionated designs, and solutions to complex real-world problems which other sample apps don’t handle. It does so with an open source implementation of a real world app.

    Secondly, it helps you (the developer) keep up to date with the areas of Android development which interest you most. It is a working app planned for publication on the Play Store.

    Now in Android app screen designs

    For this first alpha release, the Now in Android app includes:

    As well as these features, we are also documenting the learning journeys we took to certain decisions with the app's design and implementation. Check out our first journey on the app's Architecture here.

    The Now in Android screens adapt based on device screen size

    Since this is an alpha release, we expect that there will be bugs and missing features, and we would greatly appreciate your feedback. We have some exciting features planned, such as user authentication and loading data from a real backend. We can’t wait for you to check out the app and let us know what you think!

    Finally, if you want to learn about the tools we used to build the app and how we target multiple screen sizes, check out these talks from this year's Google I/O:

    What’s new with Google TV & Android TV OS

    Android Developers Blog

    Shobana Radhakrishnan, Senior Director of Engineering - Google TV

    Paul Lammertsma, Developer Relations Engineer

    Today, there is more entertainment content available than ever before. In fact, our research shows a third of U.S. households now watch more than 25 hours of TV every week. As the role of TV continues to evolve, it’s our goal to build a tailored TV experience that gives users easy access to the entertainment they love.

    We’re excited about the future of Android TV OS, now with over 110 million monthly active devices, including millions of Google TVs. Android TV and Google TV are available on over 300 partners worldwide, including 7 of the 10 largest smart TV OEMs and over 170 pay TV operators. And thanks to the hard work of our developer community, there are more than 10,000 apps available on TV, with more being added everyday.

    Since last year’s I/O, we’ve continued our commitment to enable you to build better and more engaging experiences on Android TV OS. In addition to platform updates, new features, like expanded integrations with the Live tab, offer opportunities for users to better engage with your content. And if you haven’t begun using WatchNext API, take a moment to learn how to add it to your app to make your content more discoverable and accessible.

    Today, we are introducing new features and tools on Android 13 that focus on overall performance & quality, improve accessibility, and enable multitasking.

    Android 13 Beta for TV is available now, allowing you to test your apps and provide feedback on the latest release. Thank you for your continued support of Android TV OS. We can’t wait to see what amazing and innovative things you continue to build for the big screen.

    May 12th 2022, 12:22 pm

    What’s new with Android for Cars

    Android Developers Blog

    Posted by Jennifer Chui, Technical Program Manager and Rod Lopez, Product Manager

     

    At Google, our work in cars has always been guided by our vision of creating safe and seamless connected experiences. This work would not be possible without developers like you. We’re excited to share some of our combined accomplishments from this past year, and introduce new updates that will make it easier for you to provide users with an even better experience in the car.

    Android Auto continues to grow and scale, with compatible vehicles now numbering over 150 million worldwide. An increasing number are also wirelessly compatible, and with the newly introduced Motorola MA1 adapter, even more drivers now have access to a wireless experience. In addition, our new design for Android Auto brings split-screen functionality to every screen, keeping navigation and media front and center while also providing room for prominent notification widgets.

     

    Android Automotive OS with Google built-in also has exciting updates. Beyond the continued expansion of carmakers that are bringing more car models to the market, we’ve also been hard at work enabling more parked experiences to take advantage of the large screens that many AAOS cars offer. From more video streaming apps like Epix Now and Tubi to future features like browsing and cast, there’s much to look forward to, and given minimal effort is required to translate your large screen tablet apps into a parked car experience, it’s now easier than ever to reach users in the car.

     

    We know that developing for cars can be complex, which is why we’re focused on making developing across Android for Cars as easy as possible. We’ve seen strong momentum with our Car App Library with over 200 apps published to date, and beyond enriching the navigation feature set with version 1.3, we’re also excited to share that all developers can now publish apps in supported categories directly to production for both Android Auto and Android Automotive OS. We’ve also created new templates and expanded our supported app categories, adding driver apps like Lyft to the navigation category, and replacing the parking and charging categories with a comprehensive point of interest (POI) category to include apps like MochiMochi and Fuelio.

    We’re also introducing several new features to help you build more powerful media apps on Android Auto. Media recommendations working side by side with Google Assistant helps users easily discover and quickly play relevant content based on their preferred music provider at the click of a button. To surface recommendations from your app, integrate with this API.

    For long form content such as podcasts and audiobooks, you can now introduce a progress bar that shows how much of the content the user has previously listened to, and with our new single item styling API, you can now assign content items individually as either list or grid as opposed to categorically, to easily combine them in the same content space.

     

    We’re grateful to have you on the journey with us as we seek to create safer, more seamless connected experiences in cars. Be sure to check out our Google I/O technical session above, and as always, you can get help from the developer community at Stack Overflow using the android-automotive and android-auto tags. We can’t wait to see what you build next, and where the road takes you.

    May 12th 2022, 12:09 pm

    Announcing Compose for Wear OS Beta!

    Android Developers Blog

    Posted by Kseniia Shumelchyk, Developer Relations Engineer, and John Nichol, Tech Lead of Compose for Wear OS

     

    Today we’re launching the Beta release of Compose for Wear OS, our modern declarative UI toolkit designed to help developers create beautiful user experiences for Wear OS.

    Compose for Wear OS adds support for watch optimized components that embrace the latest Material design for Wear OS. The components are built on top of core Compose libraries and the toolkit leverages Modern Android Development, helping accelerate the development process as a whole.

    With this Beta release, Compose for Wear OS is feature complete for the 1.0 release coming later this year, and has what you need to build production-ready apps. It also means the API is stable; moving forward we'll focus on performance and polishing existing components for the 1.0 release.


    In the Beta

    We’ve been hard at work since last I/O to bring the best of Jetpack Compose to Wear OS, engaging with the community via Slack, gathering developer feedback on APIs, components and tooling. As a result, we’ve improved a number of components such as navigation, scaling lazy lists, input and gesture support and much more.

    The first Beta release follows 21 alpha releases. The major changes since the Developer Preview announcement include:


    🆕 Input components

    You asked for user input components, so we’ve added different composables that you can tailor for your watch app:


    🆕 Dialogs

    We’ve added full-screen Alert and Confirmation composables that can be used as either navigation destinations or traditional full-screen Dialogs, which will be layered over any other content. Dialog supports swipe-to-dismiss and will reveal the parent content in the background during the swipe gesture.

    For consistency with Scaffold, a full-screen dialog displays a PositionIndicator and a Vignette.


    🆕 Progress Indicator

    We added CircularProgressIndicator, a progress indicator optimized for watch screens to display progress by animating an indicator along a circular track in a clockwise direction.

    ​​There are several options for how CircularProgressIndicator can be used: either to show infinite progress or to express the proportion of completion of an ongoing task. Progress Indicators allow a gap in the circular track which leaves room for other content, for instance TimeText if used in full-screen.


    🆕 Page Indicator

    To help you implement pagination, the UI toolkit provides a HorizontalPageIndicator component that represents the total number of pages and selected page.

    Depending on the screen shape, the HorizontalPageIndicator will provide a form factor- specific visual indication of which page is active and how far through the pages it is.


    Improvements

    With these recent additions, the Compose Material catalog for Wear OS now has more components than are available with View-based layouts and provides out-of-the-box implementation of the new Wear OS design guidelines.


    Tools

    Android Studio Electric Eel provides the latest features for the best experience developing with Compose for Wear OS:



    Horologist

    Today we’re also announcing the release of Horologist, a Google open source project which provides a set of Wear libraries that supplement the functionality provided by Compose for Wear OS and other Wear OS APIs.

    Read about Horology

    Horologist offers helpful Compose extensions:

    Horologist will grow to provide developers with additional tools for building great Wear OS apps across different experiences. Check out the Horologist on Github to provide feedback and contribute general functionality that could be useful for Wear developers - and stay tuned for upcoming releases!


    Get Started

    Many of the development principles for mobile Compose apply to Compose for Wear OS, so if you’re unfamiliar with the UI toolkit start with Jetpack Compose basics.

    We’ve prepared a set of materials to help you get started with Compose for Wear OS:

    Now that Compose for Wear OS has reached Beta it’s a great time to get started with Compose to quickly bring your app to life or refresh your existing UI. For more information about building apps for Wear OS, check out the developer site.

    We’d love to hear from you about your experiences using Compose for Wear OS and what you are able to build! Join the discussion in the Kotlin Slack #compose-wear channel and please keep providing feedback on the issue tracker.

    Happy Composing!

    May 11th 2022, 7:23 pm

    New Google Play SDK Index helps you choose the right SDKs for your app

    Android Developers Blog

    Posted by Yafit Becher, Product Manager and Ray Brusca, Strategic Partnerships Manager

     

    App developers rely on SDKs to integrate key functionality and services for their apps and games. SDKs are essential building blocks, but developers have shared that it can be hard to figure out which SDKs are reliable and safe to use. So helping developers, like you, make informed decisions about SDKs is part of keeping Google Play a safe, trusted space for billions of people.

    In 2020, we launched Google Play SDK Console to give SDK providers crash reporting, usage statistics, and a way to communicate critical issues to app developers through Google Play Console and Android Studio. Today, we’re taking another step to increase communication and transparency by launching Google Play SDK Index, a new public portal that lists over 100 of the most widely used commercial SDKs, and insights about each one.

    Google Play SDK Index shows reliability and safety signals so you can decide if an SDK is right for your business and your users.

    You can search for an SDK or look through a category, like Advertising and monetization or Analytics. For each SDK listing, Google Play SDK Index combines usage data from Google Play apps with SDK code detection to provide insights designed to help you decide if an SDK is right for your business and your users. You can see:

    SDK providers can also share key information with you for the SDKs that they registered on Google Play SDK Console, like:

    No matter where you’re at in your development lifecycle, we hope you find Google Play SDK Index useful in making informed SDK choices. Stay tuned for more updates as we add additional data points, categories, and volume of SDKs..

    For more:

    Google I/O 2022: What’s new in Jetpack

    Android Developers Blog

    Posted by Amanda Alexander, Product Manager, Android

     

    Android Jetpack is a key pillar of Modern Android Development. It is a suite of over 100 libraries, tools and guidance to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices so that you can focus on building unique features for your app.

    Most apps in Google Play use Jetpack for app architecture. Today, over 90% of the top 1000 apps use Jetpack.

    Here are the highlights of recent updates in Jetpack - an extended version of our What’s New in Jetpack talk for I/O!

    Below we’ll cover updates in three major areas of Jetpack:

    1. Architecture Libraries and Guidance
    2. Performance Optimization of Applications
    3. User Interface Libraries and Guidance

    And then conclude with some additional key updates.


    1. Architecture Libraries and Guidance

    App architecture libraries and components ensure that apps are robust, testable, and maintainable.


    Data Persistence

    Room is the recommended data persistence layer which provides an abstraction layer over SQLite, allowing for increased usability and safety over the platform.


    In Room 2.4, support for Kotlin Symbol Processing (KSP) moved to stable. KSP showed a 2x speed improvement over KAPT in our benchmarks of Kotlin code. Room 2.4 also adds built-in support for enums and RxJava3 and fully supports Kotlin 1.6.

    Room 2.5 includes the beginning of a full Kotlin rewrite. This change sets the foundation for future Kotlin-related improvements while still being binary compatible with the previous version written in the Java programming language. There is also built-in support for Paging 3.0 via the room-paging artifact which allows Room queries to return PagingSource objects. Additionally, developers can now perform JOIN queries without the need to define additional data structures since Room now supports relational query methods using multimap (nested map and array) return types.

    @Query("SELECT * FROM Artist 
        JOIN Song ON Artist.artistName = 
        Song.songArtistName")
    fun getArtistToSongs(): Map<Artist, List<Song>>

    Relational query methods using multimap return types


    Database migrations are now simplified with updates to AutoMigrations, with added support for additional annotations and properties. A new AutoMigration property on the @Database annotation can be used to declare which versions to auto migrate to and from. And when Room needs additional information regarding table and column modifications, the @AutoMigration annotation can be used to specify the inputs.

    Database(
      version = MyDb.LATEST_VERSION,
      autoMigrations = {
        @AutoMigration(from = 1, to = 2,
          spec = MyDb.MyMigration.class),
        @AutoMigration(from = 2, to = 3)
      }
    )
    public abstract class MyDb
        extends RoomDatabase {
      ...

    DataStore

    The DataStore library is a robust data storage solution that addresses issues with SharedPreferences. To better understand how to use this powerful replacement for many SharedPreferences use cases, you can check out a series of videos and articles in Modern Android Development Skills: DataStore which includes guidance on testing your app’s usage of the library, using it with dependency injection, and migrating from SharedPreference to Proto DataStore.


    Incremental Data Fetching

    The Paging library allows you to load and display small chunks of data to improve network and system resource consumption. App data can be loaded gradually and gracefully within RecyclerViews or Compose lazy lists.

    Paging 3.1 provides stable support for Rx and Guava integrations, which provide Java alternatives to Paging’s native use of Kotlin coroutines. This version also has improved handling of invalidation race conditions with a new return type, LoadResult.Invalid, to represent invalid or stale data. There is also improved handling of no-op loads and operations on empty pages with the new onPagesPresented and addOnPagesUpdatedListener APIs.

    To learn more about Paging 3, check out the new, simplified Paging Basics Codelab on the Android Developer site which demonstrates how to integrate the Paging library into an app that shows a list.

     

    Defining In Application Navigation Model

    The Navigation library is a framework for moving between destinations in an app.

    The Navigation component is now integrated into Jetpack Compose via the new navigation-compose artifact which allows for composable functions to be used as destinations in your app.

    The Multiple Back Stacks feature has improved to make it easier to remember state. NavigationUI now automatically saves and restores the state of popped destinations, meaning developers can support multiple back stacks without any code changes.

    Large screen support was enhanced with the navigation-fragment artifact providing a prebuilt implementation of a two-pane layout in AbstractListDetailFragment. This fragment uses a SlidingPaneLayout to manage a list pane – managed by your subclass – and a detail pane, which uses a NavHostFragment.

    All Navigation artifacts have been rewritten in Kotlin and feature improved nullability of classes using generics – such as NavType subclasses.


    Opinionated Architecture Guidance

    To learn more about how our key architecture libraries work together, you can view a collection of videos and articles covering best practices for modern Android development in a series called Modern Android Development Skills: Architecture.


    2. Performance Optimization of Applications

    Using performance libraries allows you to build performant apps and identify optimizations to maintain high performance, resulting in better end-user experiences.


    Improving Start-up Times

    App speed can have a big impact on a user’s experience, particularly when using apps right after installation. To improve that first time experience, we created Baseline Profiles. Baseline Profiles allow apps and libraries to provide the Android run-time with metadata about code path usage, which it uses to prioritize ahead-of-time compilation. This profile data is aggregated across libraries and lands in an app’s APK as a baseline.prof file, which is then used at install time to partially pre-compile the app and its statically-linked library code. This can make your apps load faster and reduce dropped frames the first time a user interacts with an app.

    We’ve already started leveraging Baseline Profiles at Google. The Play Store app saw a decrease in initial page rendering time on its search results page of 40% after adopting Baseline Profiles. Baseline profiles have also been added to popular libraries, such as Fragments and Compose, to help provide a better end-user experience. To create your own baseline profile, you need to use the Macrobenchmark library.


    Instrumenting Your Application

    The Macrobenchmark library helps developers better understand app performance by extending Jetpack’s benchmarking coverage to more complex use-cases, including app startup and integrated UI operations such as scrolling a RecyclerView or running animations. Macrobenchmark can also be used to generate Baseline Profiles.

    Macrobenchmark has been updated to increase testing speed and has several new experimental features. It also now supports Custom trace-based timing measurements using TraceSectionMetric, which allows developers to benchmark specific sections of code. Additionally, the AudioUnderrunMetric now enables detection of audio buffer underruns to help understand audible jank.

    BaselineProfileRule generates profiles to help with runtime optimizations. BaselineProfileRule works similarly to other macro benchmarks, where you represent user actions as code within lambdas. In the example below, the critical user journey that the compiler should optimize ahead of time is a cold start: opening the app’s landing activity from the launcher.

    @ExperimentalBaselineProfilesApi
    @RunWith(AndroidJUnit4::class)
    class BaselineProfileGenerator {
      @get:Rule
      val baselineProfileRule = BaselineProfileRule()
    
      @Test
      fun startup() = baselineProfileRule.collectBaselineProfile(
        packageName = "com.example.app"
      ) {
        pressHome()
    
        // This block defines the app's critical user journey. Here we are
        // interested in optimizing for app startup, but you can also navigate
        // and scroll through your most important UI.
        startActivityAndWait()
      }
    }

    For more details and a full guide on generating and using baseline profiles with Macrobenchmark, check our guidance on the Android Developers site.

    Avoiding UI Stuttering / Jank

    The new JankStats library helps you track and analyze performance problems in your app’s UI, including reports on dropped rendering frames – commonly referred to as “jank.” JankStats builds on top of existing Android platform APIs, such as FrameMetrics, but can be used back to API level 16.

    The library also offers additional capabilities beyond those built into the platform: heuristics that help pinpoint causes of dropped frames, UI state that provides additional context in reports, and reporting callbacks that can be used to upload data for analysis.

    Here’s a closer look at the three major aspects of JankStats:

    1. Identifying Jank: This library uses internal heuristics to determine when jank has occurred, and uses that information to know when to issue jank reports so that developers have information on those problems to help analyze and fix the issues.
    2. Providing UI Context: To make the jank reports more useful and actionable, the library provides a mechanism to help track the current state of the UI and user. This information is provided whenever reports are logged, so that developers can understand not only when problems occurred, but also what the user was doing at the time. This helps to identify problem areas in the application that can then be addressed. Some of this state is provided automatically by various Jetpack libraries, but developers are encouraged to provide their own app-specific state as well.
    3. Reporting Results: On every frame, the JankStats client is notified via a listener with information about that frame, including how long the frame took to complete, whether it was considered jank, and what the UI context was during that frame. Clients are encouraged to aggregate and upload the data as they see fit for analysis that can help debug overall performance problems.

    Adding Logging to your App

    The Tracing library enables profiling of app performance by writing trace events to the system buffer. Tracing 1.1 supports profiling in non-debug builds back to API level 14, similar to the <profileable> manifest tag which was added in API level 29.


    3. User Interface Libraries and Guidance

    Several changes have been made to our UI libraries to provide better support for large-screen compatibility, foldables, and emojis.


    Jetpack Compose

    Jetpack Compose, Android’s modern toolkit for building native UI, has reached 1.2 beta today which has added several features to support more advanced use cases, including support for downloadable fonts, lazy layouts, and nested scrolling interoperability. Check out the What’s New in Jetpack Compose blog post to learn more.


    Understanding Window State

    The new WindowManager library helps developers adapt their apps to support multi-window environments and new device form factors by providing a common API surface with support back to API level 14.

    The initial release targets foldable device use cases, including querying physical properties that affect how content should be displayed.

    Jetpack’s SlidingPaneLayout component has been updated to use WindowManager’s smart layout APIs to avoid placing content in occluded areas, such as across a physical hinge.


    Drag and Drop

    The new DragAndDrop library also helps with new form factors and windowing modes by enabling developers to accept drag-and-drop data – both from inside and outside their app. DrapAndDrop includes a consistent drop target affordance and it supports back to API level 24.

     

    Backporting New APIs to Older API Levels

    The AppCompat library allows access to new APIs on older API versions of the platform, including backports of UI features such as dark mode.

    AppCompat 1.4 integrates the Emoji2 library to bring default support for new emoji to all text-based views supported by AppCompat on API level 14 and above.

    Custom locale selection is now supported back to API level 14. This feature enables manual persistence of locale settings across app starts, and supports automatic persistence via a service metadata flag. This tells the library to load the locales synchronously and recreate any running Activity as needed. On API level 33 and above, persistence is managed by the platform with no additional overhead.


    Other key updates


    Annotation

    The Annotation library exposes metadata that helps tools and other developers understand your app's code. It provides familiar annotations like @NonNull that pair with lint checks to improve the correctness and usability of your code.

    Annotation is migrating to Kotlin, so now developers using Kotlin will see more appropriate annotation targets, including @file.

    Several highly-requested annotations have been added with corresponding lint checks. This includes annotations concerning method or function overrides, and the @DeprecatedSinceApi annotation which provides a corollary to @RequiresApi and discourages use beyond a certain API level.


    Github

    We now have over 100 projects in our GitHub! Several modules are open for developer contributions using the standard GitHub-based workflow:

    Check the landing page for more information on how we handle pull requests, and to get started building with Jetpack libraries.

    This was a brief tour of all the changes in Jetpack over the past few months. For more details on each Jetpack library, check out the AndroidX release notes, quickly find relevant libraries with the API picker and watch the Google I/O talks for additional highlights.

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

    May 11th 2022, 3:24 pm

    Second Beta of Android 13

    Android Developers Blog

    Posted by Dave Burke, VP of Engineering

    At Google I/O, we talked about everything that’s new for developers, including the second Beta of Android 13, which we’re releasing today for your testing and feedback. Our program of Beta releases is driven by a philosophy of openness and collaboration with you, our community, and your input makes Android a better platform for everyone. Thank you for the feedback you’ve given so far!

    In Android 13, we’re continuing to focus on our core themes of privacy and security as well as developer productivity. We’ve added a new permission for sending notifications, a privacy-protecting photo picker, and improved permissions when pairing with nearby devices and accessing media files. We’ve made it easier to support app-specific language settings, match your app’s icons to the user’s selected theme colors, and build with modern standards like HDR video, Bluetooth LE Audio, and MIDI 2.0 over USB. We’re also continuing to make Android an even better OS on tablets and large screens, giving you better tools to take advantage of the 270+ million of these devices in active use. You can read more about Android 13 in our Keyword blog post.

    Beta 2 has everything you need to try the Android 13 features, test your apps, and give us your feedback. Just enroll any supported Pixel device here to get Beta 2 and future updates over-the-air. If you’ve already installed an Android 13 preview or Beta build, you’ll automatically get Beta updates.

    You can also get Android 13 Beta on select phones, tablets, and foldables from our partners who are working to deliver quality from day one, including ASUS, HMD (Nokia phones), Lenovo, OnePlus, Oppo, Realme, Sharp, Tecno, Vivo, Xiaomi, and ZTE.

    Visit android.com/beta to see the full list of partners, with links to their sites for details on their supported devices and Beta builds, starting with Beta 1. Each partner will handle their own enrollments and support, and provide the Beta updates to you directly.

    With Beta 2 we’re just a step away from Platform Stability in June 2022, when we’ll have the final Android 13 SDK and NDK APIs as well as final app-facing system behaviors. Stay tuned, and for more on the timeline and how to get your apps ready for Android 13, visit the Android 13 developer site!

    May 11th 2022, 3:24 pm

    What's new in Google Play

    Android Developers Blog

    Posted by Alex Musil, Product Management at Google Play

     

    At this year’s Google I/O, we focused on three major ways we can help you continue growing your business on Google Play:

    You can check out all the updates in our I/O session, or keep reading for a quick overview of the new features that will help take your business even further.

    Privacy and security initiatives to protect developers and users

    Over the last few years, we've been working on tools to help make SDKs better and safer for everyone, including SDK providers, app developers, and ultimately, our collective end users.

    Google Play SDK Index shows reliability and safety signals so you can decide if an SDK is right for your business and your users.


    More features to help you improve app quality across your app lifecycle

    Your app quality affects everything from your ability to engage and retain users to your discoverability and promotability on the Play Store.

    Beyond Android vitals, there are other new features to help you across the development lifecycle:

    To learn more about all these launches, check out our session on app quality.


    Marketing and monetization features to help you grow your business

    Google Play can help grow your business with new ways to acquire new users, engage your existing ones, and drive revenue growth.

    Developers can now create up to 50 custom store listings, each with analytics and unique deep links.

    For each subscription, you can now configure multiple base plans and offers.

    13 Things to know for Android developers at Google I/O!

    Android Developers Blog

    Posted by Maru Ahues Bouza, Director of Android Developer Relations

     

    There aren’t many platforms where you can build something and instantly reach billions of people around the world, not only on their phones—but their TVs, cars, tablets, watches, and more. Today, at Google I/O, we covered a number of ways Android helps you make the most of this opportunity, and how Modern Android Development brings as much commonality as possible, to make it faster and easier for you to create experiences that tailor to all the different screens we use in our daily lives.

    We’ve rounded up the top 13 things to know for Android developers—from Jetpack Compose to tablets to Wear OS and of course… Android 13! And stick around for Day 2 of Google I/O, when Android’s full track of 26 technical talks and 4 workshops drop. We’re also bringing back the Android fireside Q&A in another episode of #TheAndroidShow; tweet us your questions now using #AskAndroid, and we’ve assembled a team of experts to answer live on-air, May 12 at 12:30PM PT.


    MODERN ANDROID DEVELOPMENT

    #1: Jetpack Compose Beta 1.2, with support for more advanced use cases

    Android’s modern UI toolkit, Jetpack Compose, continues to bring the APIs you need to support more advanced use cases like downloadable fonts, LazyGrids, window insets, nested scrolling interop and more tooling support with features like LiveEdit, Recomposition Debugging and Animation Preview. Check out the blog post for more details.

     

    #2: Android Studio: introducing Live Edit

    Get more done faster with Android Studio Dolphin Beta and Electric Eel Canary! Android Studio Dolphin includes new features and improvements for Jetpack Compose and Wear OS development and an updated Logcat experience. Android Studio Electric Eel comes with integrations with the new Google Play SDK Index and Firebase Crashlytics. It also offers a new resizable emulator to test your app on large screens and the new Live Edit feature to immediately deploy code changes made within composable functions. Watch the What’s new in Android Development Tools session and read the Android Studio I/O blog post here.

    #3: Baseline Profiles - speed up your app load time!

    The speed of your app right after installation can make a big difference on user retention. To improve that experience, we created Baseline Profiles. Baseline Profiles allow apps and libraries to provide the Android runtime with metadata about code path usage, which it uses to prioritize ahead-of-time compilation. We've seen up to 30% faster app startup times thanks to adding baseline profiles alone, no other code changes required! We’re already using baseline profiles within Jetpack: we’ve added baselines to popular libraries like Fragments and Compose – to help provide a better end-user experience. Watch the What’s new in app performance talk, and read the Jetpack blog post here.

     

    BETTER TOGETHER

    #4: Going big on Android tablets

    Google is all in on tablets. Since last I/O we launched Android 12L, a release focused on large screen optimizations, and Android 13 includes all those improvements and more. We also announced the Pixel tablet, coming next year. With amazing new hardware, an updated operating system & Google apps, improved guidelines and libraries, and exciting changes to the Play store, there has never been a better time to review your apps and get them ready for large screens and Android 13. That’s why at this year’s I/O we have four talks and a workshop to take you from design to implementation for large screens.


    #5: Wear OS: Compose + more!

    With the latest updates to Wear OS, you can rethink what is possible when developing for wearables. Jetpack Compose for Wear OS is now in beta, so you can create beautiful Wear OS apps with fewer lines of code. Health Services is also now in beta, bringing a ton of innovation to the health and fitness developer community. And last, but certainly not least, we announced the launch of The Google Pixel Watch - coming this Fall - which brings together the best of Fitbit and Wear OS. You can learn more about all the most exciting updates for wearables by watching the Wear OS technical session and reading our Jetpack Compose for Wear OS announcement.

     

    #6: Introducing Health Connect

    Health Connect is a new platform built in close collaboration between Google and Samsung, that simplifies connectivity between apps making it easier to reach more users with less work, so you can securely access and share user health and fitness data across apps and devices. Today, we’re opening up access to Health Connect through Jetpack Health—read our announcement or watch the I/O session to find out more!

    #7: Android for Cars & Android TV OS

    Android for Cars and Android TV OS continue to grow in the US and abroad. As more users drive connected or tune-in, we’re introducing new features to make it even easier to develop apps for cars and TV this year. Catch the “What’s new with Android for Cars” and “What's new with Google TV and Android TV” sessions on Day 2 (May 12th) at 9:00 AM PT to learn more.

    #8: Add Voice Across Devices

    We’re making it easier for users to access your apps via voice across devices with Google Assistant, by expanding developer access to Shortcuts API for Android for Cars, with support for Wear OS apps coming later this year. We’re also making it easier to build those experiences with Smarter Custom Intents, enabling Assistant to better detect broader instances of user queries through ML, without any NLU training heavy lift. Additionally, we’re introducing improvements that drive discovery to your apps via voice on Mobile, first through Brandless Queries, that drive app usage even when the user hasn’t explicitly said your app’s name, and App Install Suggestions that appear if your isn’t installed yet–these are automatically enabled for existing App Actions today.


    AND THE LATEST FROM ANDROID, PLAY, AND MORE:

    #9: What’s new in Play!

    Get the latest updates from Google Play, including new ways Play can help you grow your business. Highlights include the ability to deep-link and create up to 50 custom listings; our LiveOps beta, which will allow more developers to submit content to be considered for featuring on the Play Store; and even more flexibility in selling subscriptions. Learn about these updates and more in our blog post.

    #10: Google Play SDK Index

    Evaluate if an SDK is right for your app with the new Google Play SDK index. This new public portal lists over 100 of the most widely used commercial SDKs and information like which app permissions the SDK requests, statistics on the apps that use them, and which version of the SDK is most popular. Learn more on our blog post and watch “What’s new in Google Play” and “What’s new in Android development tools” sessions.

    #11: Privacy Sandbox on Android

    Privacy Sandbox on Android provides a path for new advertising solutions to improve user privacy without putting access to free content and services at risk. We recently released the first Privacy Sandbox on Android Developer Preview so you can get an early look at the SDK Runtime and Topics API. You can conduct preliminary testing of these new technologies, evaluate how you might adopt them for your solutions, and share feedback with us.

    #12: The new Google Wallet API

    The new Google Wallet gives users fast and secure access to everyday essentials across Android and Wear OS. We’re enhancing the Google Wallet API, previously called Google Pay Passes API, to support generic passes, grouping and mixing passes together, for example grouping an event ticket with a voucher, and launching a new Android SDK which allows you to save passes directly from your app without a backend integration. To learn more, read the full blog post, watch the session, or read the docs at developers.google.com/wallet.

    #13: And of course, Android 13!

    The second Beta of Android 13 is available today! Get your apps ready for the latest features for privacy and security, like the new notification permission, the privacy-protecting photo picker, and improved permissions for pairing with nearby devices and accessing media files. Enhance your app with features like app-specific language support and themed app icons. Build with modern standards like HDR video and Bluetooth LE Audio. You can get started by enrolling your Pixel device here, or try Android 13 Beta on select phones, tablets, and foldables from our partners - visit developer.android.com/13 to learn more.

    That’s just a snapshot of some of the highlights for Android developers at this year’s Google I/O. Be sure to watch the What’s New in Android talk to get the landscape on the full Android technical track at Google I/O, which includes 26 talks and 4 workshops. Enjoy!

    May 11th 2022, 3:24 pm

    New flexible tools to grow your subscription business

    Android Developers Blog

    Posted by Steve Hartford, Product Manager, Google Play

    Digital subscriptions continue to be one of the fastest growing ways for developers to monetize on Google Play. As the subscriptions business model evolves, many developers have asked us for more flexibility and less complexity in how they sell subscriptions.

    To meet those needs, we've reimagined the developer experience for selling subscriptions on Play. Today, we’re launching new subscription capabilities and a new Console UI to help you grow your business. At its foundation, we’ve separated what the subscription benefits are from how you sell the subscription. For each subscription, you can now configure multiple base plans and offers. This allows you to sell your subscription in multiple ways, reducing operational costs by removing the need to create and manage an ever-increasing number of SKUs.

    You may have already noticed the change in Play Console as we’ve taken existing subscription SKUs and separated them into subscriptions, base plans, and offers. The new subscriptions configuration behaves as before, with no immediate need to update your apps or backend integrations.

    Example of a subscription configuration

    More flexibility to improve reach, conversion, and retention

    Each base plan in a subscription defines a different billing period and renewal type. For example, you can create a subscription with a monthly auto-renewing plan, an annual auto-renewing plan, and a 1-month prepaid plan.

    Prepaid plans are an entirely new option that provides users with access to benefits for a fixed duration. Users can extend this access by purchasing top-ups in your app, or in the Play Store. Prepaid plans allow you to reach users in regions where pay-as-you-go is standard, including India and Southeast Asia. They can also provide an alternative for users not ready to purchase an auto-renewing subscription.

    A base plan can have multiple offers supporting different stages of the subscription lifecycle — whether to acquire new subscribers, incentivize upgrades, or retain existing subscribers. Whenever users could benefit from the value your subscriptions provide, we want to help you reach them with an offer they find worthwhile and convenient.

    Offers provide a wide range of pricing and eligibility options. While the base plan contains the price available to all users, offers provide alternate pricing to eligible users. You can make offers that are available everywhere their base plan is available, or you can create offers for specific regions. For example:

    If you want even more flexibility, you can create custom offers for which you decide the business logic, such as second-chance free trials, or win-back offers for lapsed subscribers.

    Better metrics to understand your business

    We’ve improved reporting by updating how metrics are calculated in Play Console. Metrics such as new subscription counts, conversion and retention rates, and cancellations are more consistent and calculated in line with financial metrics. You can now directly compare data between Play Console and the Real Time Developer Notifications API. Additionally, subscription metrics are now cumulative. This means that data reported for previous days won’t change over time.

    Get started

    Starting today, all these new subscription capabilities are available. To learn more please visit the Help Center. When you’re ready to integrate, check out this guide, documentation, and sample app.

    Please let us know how we’re doing and contact us with any issues you may encounter.

    How useful did you find this blog post?

    May 11th 2022, 3:24 pm

    Google I/O 2022: What’s new in Android Development Tools

    Android Developers Blog

    Posted by Juan Sebastian Oviedo, Senior Product Manager

     

    Today at Google I/O 2022, we announced an exciting set of new features available in Android Studio Dolphin Beta and Electric Eel Canary, both available for download. You told us that you want to be more productive while creating Android apps, so we focused on improvements that make the development experience faster and more informative.

    In the Android Studio Dolphin release you will find the following features and improvements that you can start using in the Beta channel, which is close to stable quality:

    For even more cutting edge features, you can take a sneak peek at the Android Studio Electric Eel release in the Canary channel:

    These features will be promoted to more stable channels once we have your feedback and make improvements, so please try them out.

    To see all the new features in action, watch the What’s new in Android Developer Tools session.

    Below is a list of key new features and improvements in Android Studio Dolphin:


    Jetpack Compose

    Compose Animation Coordination

    Multipreview annotations

    Compose Recomposition Counts


    Wear OS

    Wear OS Emulator Pairing Assistant

    Wear OS Emulator Side Toolbar

    New Wear OS Run/Debug configuration types


    Development tools

    Logcat V2

    Gradle Managed Devices

    Below is a list of key new features and improvements in Android Studio Electric Eel:

    Jetpack Compose

    Live Edit on emulator

    Live Edit on Preview


    Google Play and Firebase

    Google Play SDK Index insights

    App Quality Insights from Firebase Crashlytics


    Large Screens

    Resizable Emulator

    Visual Linting


    Development Tools

    Pairing two Android Emulators using Emulated Bluetooth

    Device Mirroring


    To recap, these new features and improvements are available in the Android Studio Dolphin Beta, near stable quality:

    Jetpack Compose

    Wear OS

    Development tools

    These brand new features and improvements are available in the Android Studio Electric Eel Canary:

    Jetpack Compose

    Google Play and Firebase

    Large Screens

    Development tools

    Getting started

    Android Studio Dolphin Beta and Electric Eel Canary are both available for download. You can install them side by side with the current stable version of Android Studio following these instructions. The Beta release is near stable release quality, but bugs might still exist, so, if you do find an issue, please let us know so we can work to fix it. Likewise, if you find an issue or have feedback for the features in the Canary release, please let us know.

    We really appreciate your feedback on issues and feature requests. You can follow us—the Android Studio development team—on Twitter and on Medium.

    Check out the preview release notes for more details.

    May 11th 2022, 3:24 pm

    Introducing Health Connect, a new API for Android app developers to securely access user health data

    Android Developers Blog

    Posted by Chris Wilk, Product Manager

     

    From helping you log your meals with MyFitnessPal to getting a holistic view of your health with Withings, apps and devices are a source for many kinds of useful health and fitness data. As Android developers, connecting and sharing this data between apps can help you provide more meaningful experiences and insights for your users. However, much of this information is spread across multiple experiences and different devices, making it difficult to bring together. Moreover, there are no centralized privacy controls for Android users.


    Introducing Health Connect

    This is why we’ve created Health Connect, a platform and API for Android app developers. With user permission, developers can use a single set of APIs to securely access and share health and fitness data across Android devices.

    We're building this new unified platform in collaboration with Samsung to simplify connectivity between apps. We appreciate Samsung’s collaboration as we roll out Health Connect to foster richer app experiences while also providing centralized privacy controls for users.

    We've been working with developers including MyFitnessPal, Leap Fitness and Withings as part of an early access program. In addition, Samsung Health, Google Fit and Fitbit are adopting Health Connect. Starting today, all developers can get access to Health Connect's common set of APIs for Android via Android Jetpack.

    Health Connect fits in with Google’s wider efforts to help billions of people be healthier, using our platforms and technology to connect and bring more meaning to health information.


    How does Health Connect work?

    How Health Connect Works

    Health Connect supports many common health and fitness data types and categories, including: activity, sleep, nutrition, body measurements and vitals like heart rate and blood pressure.

    With user permission, developers can securely read from and write data to Health Connect, using standardized schema and API behavior. Users will have full control over their privacy settings, with granular controls to see which apps are requesting access to data at any given time. The data in Health Connect is all on-device and encrypted. Users will have the ability to shut off access or delete data they don’t want on their device, and the option to prioritize one data source over another when using multiple apps.

    Getting started

    It’s easy to get started with Health Connect. Health Connect’s single set of APIs makes it simple to manage permissions and read and write data. Here’s an example of how you can request permissions and then write some data.

    First, build a set of the permissions you plan to request read or write access to. In this example we are reading and writing steps and heart rate.

    private val permissions =
      setOf(
        Permission.createReadPermission(Steps::class),
        Permission.createWritePermission(Steps::class),
        Permission.createReadPermission(HeartRate::class),
        Permission.createWritePermission(HeartRate::class),
      )
    
    // then, create a permissions request for this set of permissions

    Then, launch the permissions request, which will bring the user to the Health Connect permissions UI to grant permissions.

    Once the user grants permission, you are ready to read and write data. Here’s an example of how to write steps data over a period of time. Include the total number of steps, start and end time, and timezone information, and then insert the data into Health Connect.

    private suspend fun writeSomeData(client: HealthConnectClient) {
        val records = mutableListOf<Record>()
    
        records.add(
          Steps(
            count = 888,
            startTime = START_TIME,
            endTime = END_TIME,
            startZoneOffset = null,
            endZoneOffset = null,
          )
        )
        // add additional records as needed
    }

    Learn more

    Health Connect is now available to developers:

    May 11th 2022, 3:24 pm

    What's new in Jetpack Compose

    Android Developers Blog

    Posted by Jolanda Verhoef, Android Developer Relations Engineer, and Anna-Chiara Bellini, Android Toolkit UI Product Manager

     

    It’s been almost a year since Jetpack Compose 1.0 was released, and during this time we've seen the community adopt it with enthusiasm. You’ve told us you’re appreciating the conciseness of the Kotlin syntax and the declarative approach that makes thinking about UI so much faster and easier.

    Compose in the Community

    We've seen many companies adopt Compose at scale for the newest and boldest features of their apps. For instance, we've worked closely with the Play Store team, who started experimenting with Compose in the very early days, and learned that not only is it more enjoyable, it is beneficial to their developer productivity. They told us that "All new Play Store features are built on top of this framework. Compose has been instrumental in unlocking better velocity and smoother landings for the app." The team at Twitter has been using Jetpack Compose across different parts of the app, and they are reaping the benefits, as "Compose makes it much easier to define our own components and to make their API contracts more explicit, flexible, and intuitive." The Airbnb team adopted Compose as well: "Jetpack Compose is a critical part of our technical strategy. The productivity gains are massive."

    We're very glad to see that these teams, who have carefully evaluated Compose in large, complex production environments, are experiencing not just more fun and clarity in their UI development, but broader engineering benefits! And these are just a few examples, because over 100 of the top 1000 apps in the Play Store are now using Compose.

    These close collaborations, and listening carefully to feedback from the broader Android community, are always at the heart of our development process and are key to advancing our roadmap. We're now focusing on supporting your more advanced use cases, with new APIs and feature improvements, all together with new tools to make building with Compose easier. We know that Compose fundamentally changes the way UI is built. To help you with the necessary mindset shift, we're publishing more guidance, talks and codelabs on advanced topics, and more in-depth videos so you can write apps that look great and perform great. Here's what is new:

    Compose 1.2 beta

    Today, we’re releasing the first beta version of Compose 1.2, which includes a lot of features and improvements.

    Text improvements

    Font Padding

    We’ve addressed one of the top-voted bugs in our issue tracker by making includeFontPadding a customizable parameter. We recommend you set this value to false, as this will enable more precise alignment of text within layout. We aim to eventually make this the default value in a future release. Please let us know in the issue above if setting the value to false leads to issues with your app. Additionally, when includeFontPadding is set to false, you can adapt the line height of your Text composable by setting the lineHeightStyle parameter. Combined it can look like this:

    Multi-line Text with includeFontPadding set to true (left, current default) vs false (right) and lineHeightStyle.

    Text(
     text = myText,
     style = TextStyle(
       lineHeight = 2.5.em,
       platformStyle = PlatformTextStyle(
         includeFontPadding = false
       ),
       lineHeightStyle = LineHeightStyle(
         alignment = Alignment.Center,
         trim = Trim.None
       )
     )
    )

    Downloadable Fonts

    Compose 1.2 also introduces downloadable fonts in Compose. You can use the new APIs for Compose to access Google Fonts asynchronously, even defining fallback fonts, without any complex setup. With downloadable fonts, you can keep your APK size small and improve your user’s system health as multiple apps can share the same font through a provider.

    Text Magnifier

    Android text provides a magnifier widget, which makes selecting text easier. Compose now supports the text magnifier.

    The magnifier is shown when dragging a selection handle to help you see what’s under your finger. Compose 1.1.0 brought the magnifier to selection within text fields, and now Compose 1.2.0 supports magnifier in both text fields and SelectionContainer. The magnifier has also been enhanced to match the precise behavior of the Android magnifier in Views.

    Layout features and improvements

    Lazy Layouts

    Lazy layouts continue to evolve, with the grid APIs LazyVerticalGrid and LazyHorizontalGrid graduating out of experimental, and a new experimental API being added, called LazyLayout, that lets you implement your own custom lazy layouts. Learn more about these APIs in the I/O talk Lazy layouts in Compose.

    Interop with CoordinatorLayout

    When you embed a scrolling composable in a CoordinatorLayout from the view system, you can now make sure their scroll behaviors are interoperable. This makes the setup of a collapsible toolbar much easier. You can opt-in to this behavior by passing the result of calling the new experimental rememberNestedScrollInteropConnection method into the nestedScroll modifier. Here’s a sample demonstrating this new functionality.

    Window insets

    The insets library in Accompanist has now graduated to the Compose Foundation library, using the WindowInsets class. Read more about it in our documentation on Integrating Compose with your existing UI.

    Window size classes

    To make it easier to design, develop and test resizable layouts, we’ve released window size classes - a set of opinionated viewport breakpoints. They are now available in alpha in a new library material3-window-size-class, as part of the Material 3 set of libraries. You can read more about size classes in the Supporting different screen sizes documentation and take a look at a sample implementation in Crane.

    Focus on performance

    To help you understand and improve your app’s performance, we focused a lot on new performance tooling and guidance. With this, it becomes much easier to understand why and where your app might be lagging.

    Starting from Android Studio Dolphin, you can inspect how often composables recompose using the Layout Inspector. Unexpectedly high numbers of recomposition can point you to a composable that could be optimized. In addition, Android Studio Electric Eel now includes a recomposition highlighter, a visual aid to see which composables recompose when. Read more about this new tooling in the What’s new in Android Studio blog.

    Layout Inspector showing recomposition count and recomposition highlighter.

    Compose changes the way you write your UI at a fundamental level, so there are some best practices that you can adopt to make sure your app is performant. The newly released documentation page suggests how to write and configure your Compose app for best performance. In the I/O talk Common performance gotchas in Jetpack Compose, the Compose team describe common performance mistakes and how to fix them.

    Performance is an ongoing area of focus and we’re working hard on improving and extending tooling and guidance. In the meantime, we’d really appreciate your feedback on the work we’ve done so far. Please raise your bugs in the issue tracker or ask your questions on the KotlinLang Slack group.

    New tools

    On top of improvements, there are also new tooling updates to help you use Compose more effectively. Android Studio Dolphin, now in Beta, brings exciting features for Compose development. Beyond recomposition counts, new tools include Animation Coordination so you can see and scrub through all your animations at once, and the MultiPreview annotation to help you build for multiple screen sizes. To enable you to iterate faster Android Studio Electric Eel (in Canary) brings LiveEdit.

    Check out What's new in Android Development Tools for all the details, and make sure you share your feedback to help shape the tooling support you need for Compose.

    Compose for Wear OS

    If there is something better than Compose, it is more Compose! So we're very excited to see Compose for Wear OS moving to Beta! Following the same principle as any other Jetpack library, Beta means that it's feature complete and API stable, and you can start building your production-ready apps. Go ahead and watch the talk, and read the blog post!

    New and improved guidance

    We’ve added and revamped a lot of the guidance on Compose:

    Happy Composing!

    We hope that you find these new features as exciting as we do. If you haven't started yet, it's time to learn Jetpack Compose and see how it will fit in your team and development process, so that you can experience all the benefits of improved velocity and developer productivity. Happy Composing!

    May 11th 2022, 1:24 pm

    Android Studio Chipmunk

    Android Developers Blog

    Posted by Paris Hsu, Product & Design, Android; Takeshi Hagikura, Developer Relations Engineer, Android

     

    Today, we are thrilled to announce the stable release of Android Studio Chipmunk 🐿: The official IDE for building Android applications! This release is a smaller feature release, but we included the latest IntelliJ update and devoted more time to quality and stability. In this release alone, we address over 175+ quality issues.

    If you want to be on the latest stable version of Android Studio you can download it today!


    What’s in Android Studio Chipmunk

    Below is a full list of new features in Android Studio Chipmunk:

    Compose Animation Preview

    This previously experimental feature is now available to allow Jetpack Compose developers to inspect and debug their animations built with Compose. If an animation is described in a composable preview, you can inspect the exact value of each animated value at a given time, pause the animation, loop it, fast-forward it, or slow it down. It is especially useful to compare animations with their design specs frame by frame.

    Compose Animation Preview currently supports AnimatedVisibility and updateTransition. It will support more animation types in the future.

    Compose Animation Shrine Cart

    CPU Profiler

    Android Studio Chipmunk now shows updated jank information, including jank types, and expected and actual deadlines that help you spot the actual cause of the jank. This jank information is available when you use the Android Emulator or physical devices with API level 31 (Android 12) or higher. Learn more here.

     

    Showing Jank Information in CPU Profiler

    Build Analyzer: Check Jetifier

    In Chipmunk we have introduced a new Jetifier check in Build Analyzer that will notify you if you can remove the Jetifier flag to improve performance during build.

    The Jetifier flag was designed to automatically migrate third-party libraries to use AndroidX, and the vast majority of Android Studio projects still have it enabled. However, the library ecosystem has mostly moved to support AndroidX natively, and having the flag now usually adds unnecessary build overhead -- turning it off will typically save 5-10% on build times.

    Showing Jetifier Check in Build Analyzer

    IntelliJ Platform Update

    Although the number of Android specific features is light for Android Studio Chipmunk, it however includes the IntelliJ 2021.2 platform major release 😎, which has many new features such as project-wide analysis, a new powerful Package Search UI, and IDE actions enhancements to speed up your workflow. Learn more.


    Getting Started

    In short, Android Studio Chipmunk 🐿 is the update you don’t want to miss! Even though it was a shorter release, with the new version for IntelliJ, our continual efforts to improve quality, performance, and stability of the IDE, and the features listed earlier, we can’t wait for you to download and try it today!

    As always, we appreciate any feedback on things you like, and issues or features you would like to see. If you find a bug or issue, please file an issue. To stay up-to-date with the latest features, follow us -- the Android Studio development team ‐ on Twitter and on Medium.

    May 9th 2022, 1:24 pm

    eBay gets a 4.7 Google Play rating with tablet optimizations

    Android Developers Blog

    Posted by The Android Team

     

    Investing in the user experience

    For eBay, the massive online marketplace used by millions of buyers and sellers around the world, providing an optimal user experience is key to driving sales. So when the Android engineers on eBay’s architecture team recognized they could further improve the eBay app by optimizing it for large screens such as tablets and foldables, they knew they had to act fast to provide a seamless experience across devices. Their efforts paid off—the eBay app quickly earned 4.7 stars out of 5 on Google Play.

    After combing through user stats, the team discovered that there was a surprisingly large subset of tablet users who accessed the eBay app on large screen Android devices. Encouraging new data shows that an eBay user will likely spend more time using the app if they’re using a tablet rather than a phone.

    “The benefits of investing development time into large form factor screens is apparent in our public feedback channels,” said Matthew Mossman, an Android engineer on eBay’s mobile architecture team. By optimizing the app for large screens, eBay’s developers built a better user experience and boosted user satisfaction.

    Creating a better tablet app

    The eBay app is extremely information-dense, so being able to show users a full picture and description of available items was crucial to maintaining its popularity among buyers and sellers. Realizing that the extra screen space afforded by tablets would enhance users’ browsing and search experiences, eBay’s Android engineers improved the UX flow using list-detail patterns.

    Mossman used Android’s powerful resource qualifier mechanisms to configure the best layouts for various devices, and updated the library of user interface components from eBay’s phone app for use on laptops and tablets. Additionally, by adopting industry guidelines for Android standardization, eBay’s architecture and feature teams aligned their processes for customizing apps, enabling them to deliver a better experience to users faster than before.

    Higher engagement, greater satisfaction

    After improving the eBay experience for tablet users, Mossman and the developer team saw a spike in positive reviews on Google Play, raising the eBay Android app’s rating to 4.7 out of 5 stars. The developers also reported a definitive increase in user satisfaction after incorporating Material Design Components, dark theme support, and other eye-catching, intuitive features into the app.

    What’s more, eBay’s Trust and Search feature teams each saw increased user engagement across sales activities. Since enabling App Bundles and Dynamic Features to better serve specific devices, eBay has seen 20% higher engagement with its community support network, signaling new interest from tablet users.

     

    In upcoming releases, the developers expect to fully utilize the rich functionality of Jetpack Compose, a UI building tool kit that was recently enabled for eBay’s Android app. Metrics and reporting from Firebase helped the team pinpoint further opportunities for growth and improvement that will additionally benefit eBay app users.

    With its large screen optimization plan, eBay clearly showed why investing in device-specific experiences benefits users and developers alike.

    Learn more about optimizing across devices

    Learn about the unique experiences being created for bigger screens on Android and Chrome OS devices.

    May 5th 2022, 2:48 pm

    Learn Android with Jetpack Compose (no programming experience needed!)

    Android Developers Blog

    Posted by Murat Yener

     

    There are many fulfilling opportunities found in Android development: from launching a career, expressing yourself in fun ways, working on an app that makes a difference, or starting a business. At Google, we’re committed to increasing opportunities for anyone to learn Android development, so more people can experience this. As the next evolution of our journey to make Android development accessible to all, we released the first two units of Android Basics with Compose. This is the first free course that teaches Android development with Jetpack Compose to everyone. Compose simplifies and accelerates Android UI development, bringing your app to life faster with less code, powerful tools, and intuitive Kotlin APIs. If you are curious about learning Android development with Android's latest offering for building native UI, this is a great place to start!

    Similar to the Android Basics in Kotlin course, Android Basics with Compose teaches the fundamentals of programming in Kotlin; you do not need any prior programming experience other than basic computer literacy to get started with this course. Not only does the course cover the most recent Android app building techniques, it is also designed to make it easier and more fun for you to learn Android. We built this course from scratch, taking into account feedback we received from learners, instructors, and designers from previous Android development courses.

    The course contains learning pathways that teach you the basics of programming along with how to use the Kotlin programming language, with additional development topics introduced during your learning journey! If you are familiar with programming or the Kotlin programming language, you can skip ahead and focus on learning how to develop with Jetpack Compose.

    The Android Basics with Compose and Android Basics in Kotlin courses will co-exist as our latest Android training offerings. Android Basics with Compose shares a similar course structure with Android Basics in Kotlin; in many cases they share the same sample apps, but are written using different UI toolkits. This allows you to see, compare, and learn the differences between Views and Compose, you can even work with both courses simultaneously.

    This course also introduces new content formats such as code-along videos for Codelabs, practice problems to give you more hands-on coding experience, and open-ended projects to unleash your creativity. These two units are just the beginning; more will be coming soon. Check out Android Basics with Compose to get started on your Android development journey!

    May 2nd 2022, 1:03 pm

    The Beta for Android 13 is out now: Android 13 Beta 1

    Android Developers Blog

    Posted by Dave Burke, VP of Engineering

    It’s already April and we’ve been making steady progress refining the features and stability of Android 13, building around our core themes of privacy and security, developer productivity, as well as tablet and large screen support. Today we’re moving into the next phase of our cycle and releasing the first Beta of Android 13.

    For developers, there’s a lot to explore in Android 13, from privacy features like the new notification permission and photo picker, to APIs that help you build great experiences, like themed app icons, quick settings tile placement, and per-app language support, as well as capabilities like Bluetooth LE audio and MIDI 2.0 over USB. In Beta 1, we’ve added new permissions for more granular access to media files, improved audio routing APIs, and more. We’ll have more to share at Google I/O, coming up on May 11-12, so please save the date!

    We’re inviting you to give Beta 1 a try as we welcome more early adopters to give us feedback on this release. You can try Android 13 Beta 1 today on supported Pixel devices by enrolling here to get the update over-the-air. If you’re already running a developer preview of Android 13, your device will automatically get this and future updates over the air. As always, downloads for Pixel and the Android Emulator are also available. Visit the Android 13 developer site for details on how to get started developing and testing your app.


    What’s new in Beta 1?

    We’re continuing to focus on privacy and security, while giving you new APIs to help you build great experiences for your users. Beta 1 includes the latest updates to features we announced earlier, like the new notification permission, photo picker, themed app icons, improved localization and language support, and more. Beta 1 also introduces a small number of new features, so give these a try and let us know what you think!

    More granular permissions for media file access - Previously, when an app wanted to read shared media files in local storage, it needed to request the READ_EXTERNAL_STORAGE permission, which gave access to all types of media files. To bring more transparency and control to users, we’re introducing a new set of permissions with more granular scope for accessing shared media files.

    With the new permissions, apps now request access to a specific type of file in shared storage:

    When the permissions are granted by the user, apps will have read access to the respective media file types. To simplify the experience for users, If an app requests READ_MEDIA_IMAGE and READ_MEDIA_VIDEO at the same time, the system displays a single dialog for granting both permissions. If your app accesses shared media files, you’ll need to migrate to the new permissions when your app targets Android 13. More here.

    Better error reporting in Keystore and KeyMint - For apps that generate keys, Keystore and KeyMint now provide more detailed and accurate error indicators. We’ve added an exception class hierarchy under java.security.ProviderException, with Android-specific exceptions that include Keystore/KeyMint error codes, and whether the error is retryable. You can also modify the methods for key generation, signing, and encryption to throw the new exceptions. The improved error reporting should now give you what you need to retry key generation.

    Anticipatory audio routing - To help media apps identify how their audio is going to be routed, we’ve added new audio route APIs in the AudioManager class. The new getAudioDevicesForAttributes() API allows you to retrieve a list of devices that may be used to play the specified audio, and we added the getDirectProfilesForAttributes() API to help you understand whether your audio stream can be played directly. Use these new APIs to determine the best AudioFormat to use for your audio track.

    App compatibility

    If you haven’t tested your app for compatibility with Android 13 yet, now is the time to do it! With Android 13 now in Beta, we’re opening up access to early-adopter users as well as developers. This means that in the weeks ahead, you can expect more users to be trying your app on Android 13 and raising any issues that they find.

    To test for compatibility, install your published app from Google Play or other source on a device or emulator running Android 13 Beta and work through all of the app’s flows. Review the behavior changes to focus your testing. After you’ve resolved any issues, publish an update as soon as possible.


    With Beta we’re getting closer to Platform Stability in June 2022. Starting then, app-facing system behaviors, SDK/NDK APIs, and non-SDK lists will be finalized. At that time, you should finish up your final compatibility testing and release a fully compatible version of your app, SDK, or library. More on the timeline for developers is here.


    Get started with Android 13!

    Today’s Beta release has everything you need to try the Android 13 features, test your apps, and give us feedback. Just enroll any supported Pixel device here to get this and future Android 13 Beta and feature drop Beta updates over-the-air. If you’ve already installed a developer preview build, you’ll automatically get these updates. To get started developing, set up the SDK.

    For even broader testing on supported devices, try Android 13 Beta on Android GSI images, and if you don’t have a device you can test on the Android Emulator -- just download the latest emulator system images via the SDK Manager in Android Studio.

    For complete details on how to get the Beta, visit the Android 13 developer site.

    April 30th 2022, 8:46 am

    Google Photos: How we used notifications to boost widget installs 10x!

    Android Developers Blog

    Posted by Haoran Man, Niv Govindaraju, Rohit Sampathi, and Antriksh Saxena

    A new Photos widget featuring Memories

    As the home for your memories, Google Photos is loved by hundreds of millions of people around the world. One key focus area for us is how we continue to create truly helpful and compelling experiences for our users to cherish memories with their friends and family. We recently brought our Memories feature to Android widgets, enabling users to easily enjoy an ambient stream of photos right on their phone’s home screen. To increase the widget’s awareness, we experimented with a notification campaign that ended up increasing widget DAUs by 10x. Read on for more on how we accomplished this...


     

    Photos’ widget usage was initially low

    Despite our belief that the Memories widget was a helpful and requested feature from our users, initial adoption was relatively low, with tapering organic growth in the weeks following launch. There was clearly plenty of headroom to grow awareness of this feature so we started brainstorming ways to make it easier for users to learn about and try out the widget.

    Leveraging notifications to increase feature discovery

    We decided to experiment with notifications given Photos’ past success in using them as a helpful nudge for feature discovery. We quickly put together a notification campaign that targeted eligible Photos Android users with Memories content. They each received a notification informing them of the widget, and on tap-through would be dropped directly into the Memories widget install flow. In just a couple seconds, they could have the widget set up and start seeing their special moments featured on screen.

    Users took advantage of the streamlined flow, which drove installs 10x

    The notification campaign proved highly successful: we achieved a 15% conversion rate, ultimately resulting in 10x widget DAUs compared to before the campaign.

    Here are a few reasons why we believe this campaign was so effective:

    1. A clear value proposition

    We believe notifications, like our features, should be helpful, not a nuisance. That means always having a clear and concise value proposition. Keeping the copy length short, highlighting contextual information, and being clear on the value-add has often resonated better with users and resulted in higher click-through & conversion rates.

    With this in mind, we ran a quick experiment to test 3 candidate copies for the widget in order to determine which had the highest conversion. The best-performing copy ended up yielding a +12% improvement on widget installs compared to the worst-performing copy.

    2. A streamlined post-click flow

    We configured the notification to open directly into the widget install picker, making it really easy for users to install and start playing with the widget right away. A similar campaign from earlier this year to promote our iOS widget lacked this streamlining and we unsurprisingly saw lower conversion, likely from the extra friction.

    We hope these tips prove helpful to you as you design your next notification campaign.

    April 30th 2022, 8:46 am

    Things to know from the 2022 Android App Excellence Summit

    Android Developers Blog

    Posted by The Google Play Team

     

    Creating a consistent and intuitive user experience is more important than ever to grow your audience and scale your business. To help you, Google Play, Android, and Firebase shared the latest insights and best practices on building high quality Android apps, improving developer productivity, and creating the best possible experience across all Android devices at the 2022 Android App Excellence Summit.

    If you missed any sessions, we have you covered! You can watch all the content from the summit on our #AppExcellenceSummit playlist here.

    Some highlights include;

    Curious for more? Get additional resources of everything we shared at the 2022 Android App Excellence Summit by visiting g.co/android/appexcellence.

    We are committed to empowering the developer ecosystem to build high quality experiences across all Android devices. We greatly appreciate all that joined us during our App Excellence Summit and we’re looking forward to hearing your feedback. Keep in touch with us on Twitter with #AppExcellenceSummit.

    April 30th 2022, 8:46 am

    Android GDE Maryam Alhuthayfi shares her passion for mobile development with fledgling developers

    Android Developers Blog

    Posted by Janelle Kuhlman, Developer Relations Program Manager

    For Women’s History Month, we’re celebrating a few of our Google Developer Experts. Meet Maryam Alhutayfi, Android GDE. The GDE program team encourages qualified candidates that identify as women or non-binary to express interest in joining the community by completing this form.

    Android GDE Maryam Alhuthayfi has loved programming since high school, when she learned programming in Visual Studio and basic website development.

    “We didn't get much beyond that because there weren’t many Arabic resources,” she says. “That experience got me excited to dig deeper into technology. I wanted to know how the web functions, how software is made, and more about programming languages.”

    Maryam studied computer science at university and majored in information systems. For her senior year graduation project, she and her team decided to build an Android application, her first experience with Android. She graduated with honors and landed a job as a web developer, but she kept thinking about getting back to being an Android developer.

    She joined Women Techmakers in Saudi Arabia in 2019, when the group launched, to connect with other women in tech to help and support. She got a job as an Android robotics developer and became a co-organizer of GDG Cloud Saudi, her local Google Developer Group. Now Maryam is a senior Android development specialist at Zain KSA, one of Saudi Arabia’s largest telecommunications companies, which she describes as “a dream come true,” and in January 2022, she became an Android GDE.

    Maryam is the first Android GDE in the Middle East and the second in MENA. She contributes to the Android community by speaking about Android and Kotlin development in detail, and software development more generally. She maintains a blog and GitHub repository and gives numerous talks about Android development. She encourages Android developers to use Kotlin and Jetpack Compose, and she describes both as causing a major shift in her Android development path. She started the Kotlin Saudi User Group in 2020.

    Maryam regularly mentors new Android developers and gives talks on Android for Women Techmakers and Women Who Code. She encourages Android developers at big companies like Accenture and Careem to join and contribute to the Android community.

    Remembering how few Arabic resources she had as a high school student, Maryam creates both Arabic and English content to enrich Android learning resources. “I made sure those resources would be available to anyone who wants to learn Android development,” she says. “Locally, in collaboration with GDGs in Saudi Arabia, we host sessions throughout each month that cover Android, Flutter, and software development in general, and other exciting topics, like data analytics, cyber security, and machine learning.”

    She regularly attends the Android developer hangouts led by Android GDE Madona Wambua and Android developer Matt McKenna to learn more and get inspired by other Android developers in the community.

    In her full-time job, Maryam is immersed in her work on the official Zain KSA app.

    “It’s my job and my team’s job to give our millions of customers the best experience they can have, and I’m pushing myself to the limit to achieve that” she says. “I hope they like it.”

    Maryam encourages other new developers, especially women, to share their knowledge.

    “Communicate your knowledge–that makes you an expert because people will ask you follow-up questions that might give you different perspectives on certain things and shift your focus on learning new things constantly ” she says. “You serve others by sharing your knowledge.”

    Follow Maryam on Twitter at @Mal7othify | Learn more about Maryam on LinkedIn.

    The Google Developers Experts program is a global network of highly experienced technology experts, influencers, and thought leaders who actively support developers, companies, and tech communities by speaking at events and publishing content.

    The GDE program team encourages qualified candidates that identify as women or non-binary to express interest in joining the community by completing this form.

    April 30th 2022, 8:46 am

    How a single Android developer improved Lyft’s Drivers app startup time by 21% in one month

    Android Developers Blog

    Posted by Mauricio Vergara, Product Marketing Manager, with contibutions by Thousand Ant.

     

    Lyft is singularly committed to app excellence. As a rideshare company — providing a vital, time-sensitive service to tens of millions of riders and hundreds of thousands of drivers — they have to be. At that scale, every slowdown, frozen frame, or crash of their app can waste thousands of users’ time. Even a minor hiccup can mean a flood of people riding with (or driving for) the competition. Luckily, Lyft’s development team keeps a close eye on their app’s performance. That’s how they first noticed a slowdown in the startup time of their drivers’ Android app.

    They needed to get to the bottom of the problem quickly — figure out what it would take to resolve and then justify such an investment to their leadership. That meant answering a number of tough questions. Where was the bottleneck? How was it affecting user experience? How great a priority should it be for their team at that moment? Luckily, they had a powerful tool at their disposal that could help them find answers. With the help of Android vitals, a Google Play tool for improving app stability and performance on Android devices, they located the problem, made a case for prioritizing it to their leadership, and dedicated the right amount of resources to solving it. Here’s how they did it.


    New priorities

    The first thing Lyft’s development team needed to do was figure out whether this was a pressing enough problem to convince their leadership to dedicate resources to it. Like any proposal to improve app quality, speeding up Lyft Driver’s start-up time had to be weighed out against other competing demands on developer bandwidth: introducing new product features, making architectural improvements, and improving data science. Generally, one of the challenges to convincing leadership to invest in app quality is that it can be difficult to correlate performance improvements with business metrics.

    They turned to Android vitals to get an exact picture of what was at stake. Vitals gives developers access to data about the performance of their app, including app-not-responding errors, battery drainage, rendering, and app startup time. The current and historical performance of each metric is tracked on real devices and can be compared to the performance of other apps in the category. With the help of this powerful tool, the development team discovered that the Lyft Driver app startup time was 15–20% slower than 10 other apps in their category — a pressing issue.

    Next, the team needed to establish the right scope for the project, one that would be commensurate with the slowdown’s impact on business goals and user experience. The data from Android vitals made the case clear, especially because it provided a direct comparison to competitors in the rideshare space. The development team estimated that a single developer working on the problem for one month would be enough to make a measurable improvement to app startup time.

    Drawing on this wealth of data, and appealing to Lyft’s commitment to app excellence, the team made the case to their leadership. Demonstrating a clear opportunity to improve customer experience, a reasonably scoped and achievable goal, and clear-cut competitive intelligence, they got the go-ahead.


    How They Did It

    Lyft uses “Time to interact” as a primary startup metric (also known as Time to full display). To understand the factors that impact it, the Lyft team profiled each of their app’s launch stages, looking for the impasse. The Lyft Driver app starts up in four stages: 1) First, start the application process 2) “Activity” kicks off the UI rendering. 3) “Bootstrap” sends network requests for the data necessary to render the home screen. 4) Finally, “Display” opens the driver’s interface. Rigorous profiling revealed that the slowdown occurred in the third, bootstrapping, phase. With the bottleneck identified, the team took several steps to resolve it.


     

    First, they reduced unneeded network calls on the critical launch path. After decomposing their backend services, they could safely remove some network calls in the launch path entirely. When possible, they also chose to execute network calls asynchronously. If some data was still required for the application to function, but was not needed during app launch, these calls were made non-blocking to allow the launch to proceed without them. Blocking network calls were able to be safely moved to the background. Finally, they chose to cache data between sessions.


     

    These may sound like relatively small changes, but they resulted in a dramatic 21% reduction in app startup time. This led to a 5% increase in driver sessions in Lyft Driver. With the results in hand, the team had enough buy-in from leadership to create a dedicated mobile performance workstream and add an engineer to the effort as they continued to make improvements. The success of the initiative caught on across the organization, with several managers reaching out to explore how they could make further investments in app quality.


    Learnings

    The success of these efforts contains several broader lessons, applicable to any organization.

    As an app grows and the team grows with it, app excellence becomes more important than ever. Developers are often the first to recognize performance issues as they work closely on an app, but can find it difficult to raise awareness across an entire organization. Android vitals offers a powerful tool to do this. It provides a straightforward way to back up developer observations with data, making it easier to square performance metrics with business cases.

    When starting your own app excellence initiative, it pays to first aim for small wins and build from there. Carefully pick actionable projects, which deliver significant results through an appropriate resource investment.

    It’s also important to communicate early and often to involve the rest of the organization in the development team’s quality efforts. These constant updates about goals, plans, and results will help you keep your whole team on board.


    Further Resources

    Android vitals is just one of the many tools in the Android ecosystem designed to help understand and improve app startup time and overall performance. Another complementary tool, Jetpack Macrobenchmark, can help provide intelligence during development and testing on a variety of metrics. In contrast to Android vitals, which provides data from real users’ devices, Macrobenchmark allows you to benchmark and test specific areas of your code locally, including app startup time.

    The Jetpack App startup library provides a straightforward, performant way to initialize components at application startup. Developers can use this library to streamline startup sequences and explicitly set the order of initialization. Meanwhile, Reach and devices can help you understand your user and issue distribution to make better decisions about which specs to build for, where to launch, and what to test. The data from the tool allows your team to prioritize quality efforts and determine where improvements will have the greatest impact for the most users. Perfetto is another invaluable asset: an open-source system tracing tool which you can use to instrument your code and diagnose startup problems. In concert, these tools can help you keep your app running smoothly, your users happy, and your whole organization supportive of your quality efforts.

    If you’re interested in getting your own team on board for the pursuit of App Excellence (or join Lyft), check out our condensed case study for product owners and executives linked here.

    April 30th 2022, 8:46 am

    Expanding Play’s Target Level API Requirements to Strengthen User Security

    Android Developers Blog

    Posted by Krish Vitaldevara, Director, Product Management

     

    Google Play helps our developer community distribute the world's most innovative and trusted apps to billions of people. This is an ongoing process and we're always working on ways to improve app safety across the ecosystem.

    In addition to the Google Play features and policies that are central to providing a safe experience for users, each Android OS update brings privacy, security, and user experience improvements. To ensure users realize the full benefits of these advances—and to maintain the trusted experience people expect on Google Play—we collaborate with developers to ensure their apps work seamlessly on newer Android versions.

    We currently require new apps and app updates to target an Android API level within one year of the latest major Android OS version release. New apps and app updates that don’t meet this requirement cannot be published on Google Play. For exact timelines, please refer to this Help Center article.

    Current target API Level requirements for new apps and app updates


    Today, as part of Google Play’s latest policy updates, we are taking additional steps to protect users from installing apps that may not have the latest privacy and security features by expanding our target level API requirements.

    Starting on November 1, 2022, existing apps that don’t target an API level within two years of the latest major Android release version will not be available for discovery or installation for new users with devices running Android OS versions higher than apps’ target API level. As new Android OS versions launch in the future, the requirement window will adjust accordingly.

    Target API Level requirements for existing apps, starting November 1


    The rationale behind this is simple. Users with the latest devices or those who are fully caught up on Android updates expect to realize the full potential of all the privacy and security protections Android has to offer. Expanding our target level API requirements will protect users from installing older apps that may not have these protections in place.

    The good news is that the vast majority of apps on Google Play already abide by these standards. For other apps, we know this will require additional attention, which is why we are notifying developers well in advance and providing resources for those who need them.

    We encourage you to:

    Current users of older apps who have previously installed the app from Google Play will continue to be able to discover, re-install, and use the app on any device running any Android OS version that the app supports.

    This strengthened Target Level API policy is just one of the policy updates we announced today to expand user protections and improve user experiences on Google Play. We’ll continue to share updates about this important work that will help raise the bar for app privacy and security across the board, making Google Play and Android a safer place for everyone.

    For more resources:

    The first developer preview of Privacy Sandbox on Android

    Android Developers Blog

    Posted by Fred Chung, Android Developer Relations

     

    We recently announced the Privacy Sandbox on Android to enable new advertising solutions that improve user privacy, and provide developers and businesses with the tools to succeed on mobile. Since the announcement, we've heard from developers across the ecosystem on our initial design proposals. Your feedback is critical to ensure we build solutions that work for everyone, so please continue to share it through the Android developer site.

    Today, we're releasing the first developer preview for the Privacy Sandbox on Android, which provides an early look at the SDK Runtime and Topics API. You'll be able to do preliminary testing of these new technologies and evaluate how you might adopt them for your solutions. This is a preview, so some features may not be implemented just yet, and functionality is subject to change. See the release notes for more details on what's included in the release.


    What’s in the Developer Preview?

    The Privacy Sandbox Developer Preview provides additional platform APIs and services on top of the Android 13 Developer Beta release, including an SDK, system images, emulator, and developer documentation. Specifically, you'll have access to the following:


    Things you can try

    When your development environment is set up, consider taking the following actions:

    Over the coming months, we'll be releasing updates to the Developer Preview including early looks at the Attribution Reporting and FLEDGE APIs. For more information, please visit the Privacy Sandbox developer site. You can also share your feedback or questions, review progress updates so far, and sign up to receive email updates.

    Happy testing!

    April 30th 2022, 8:46 am

    Architecture MAD Skills series wrap up

    Android Developers Blog

    Posted by Manuel Vicente Vivo, Developer Relations Engineer

     

    Now that our MAD Skills series on Architecture is complete, let’s do a quick wrap up of all the things we’ve covered in each episode!

    Episode 1 — The data layer

    Learn about the data layer and its two basic components: repositories and data sources. We'll also cover data immutability, error handling, threading, testing and more tricks and recommendations with Jose Alcérreca.


    Episode 2 — The UI layer

    Learn about the UI layer and its state. Tunji Dahunsi covers UI state representation, production and consumption all within the context of a unidirectional data flow app!


    Episode 3 — Handling UI events

    Learn all about UI events. I—Manuel Vivo—cover the different types of UI events, the best practices for handling them, and more!


    Episode 4 — The domain layer

    The Domain layer is an optional layer which sits between the UI and Data layers. Don Turner explains how the domain layer can simplify your app architecture, making it easier to understand and test.


    Episode 5 — Organizing modules

    Emily Kager shares a tip around organizing modules in Android apps.


    Episode 6 — Entities

    Garima Jain shares a tip about creating separate data models based on various Architecture layers in your project.


    Q&A

    Tunji Dahunsi, Miłosz Moczkowski, Yigit Boyar, and I hung out together in a live Q&A session to answer all the questions you had!

    April 30th 2022, 8:46 am

    Twitter going all in on Jetpack Compose for feature development: greater productivity, less bugs

    Android Developers Blog

    Posted by The Android Team

     

    As one of the most widely used social media platforms, Twitter is always hunting for ways to better connect its users. At the same time, in order to efficiently build new features while maintaining existing ones, developers need supportive infrastructure. The Twitter engineering team turned to Jetpack Compose to kick-start a much needed overhaul of the app’s UI foundation. With Compose, developers can easily find and use the right APIs, fluidly style and modularize components, and ultimately build more with less code.

    Twitter launches UI overhaul

    A handful of teams such as the Android Client UI team, Customer Acquisition, Twitter Blue, and Communities teams revamped their development processes, inspiring excitement among Twitter’s engineers. “Several teams at Twitter have adopted Compose in their daily workflows,” said Sneha Patil, senior software engineer and technical lead on the Communities team for Twitter for Android. By removing the work of creating and setting up custom theming and attributes, Compose made writing functions and implementing design requirements significantly faster and more simple than what they experienced with Views. Jetpack Compose enabled these teams to work faster and more effectively, ensure reusability in their code, and easily onboard new engineers.


    Revitalizing the development process

    Creating dynamic content is straightforward with Compose. The Twitter team used the LazyColumn composable to build UI without the need for an Adapter or ViewHolder, simplifying the process of writing code that seamlessly brings layouts, themes, and styles to life. With fewer lines to write, development teams at Twitter decreased their boilerplate, experienced less bugs during development and releases, enabled UI experimentation, and sped up the testing processes. These improvements heightened productivity so developers could spend more time building what makes Twitter unique.

    They also used Compose to build stateless components that are reusable across the app. The flexibility of Compose made it easier and faster to meet design requirements, making the setup of theming and styling easier for both new and experienced engineers to work with.


    Building new features using Compose

    Given the improvements experienced, they decided to build an entire new feature using Compose. They built the Communities feature, Twitter's dedicated space where users can engage in discussions they care about most, from the ground up using Compose. Based on the teams’ previous experience using Views for other features, building with Compose was much faster and they had less bugs. “It was like magic,” said Sneha, “It’s a game changer for how we can develop on Android with Compose.

     

    Compose boosts development output

    Compose boosted the velocity and efficiency of Twitter engineers’ UI development. Developers easily incorporated and built with Compose, which made it easier for them to modularize code, reuse components, and break down dependencies. The team regularly utilizes UI experimentation, and Compose helped increase their confidence in knowing what the components that react to user interactions, data updates, and different screen sizes will look like in production.

    These teams’ initial success with Compose inspired other development teams at Twitter to follow suit. Now, even engineers working on complex legacy components are looking into adopting it.

    Overall, Compose has not only removed many of the obstacles the team experienced in Views — it also added enjoyment into the workflow, with some developers ready to abandon old methods for good. “I’m excited to write more Compose and never touch an XML layout again,” said Yoali Sotomayor Baqueiro, software engineer for Android Client UI at Twitter. “It makes developing UI not just easier but also much more fun and intuitive.


    Get started

    Optimize your UI development with Compose.

    April 30th 2022, 8:46 am

    Kicking off Google Play Coffee breaks, with Jimjum Studios

    Android Developers Blog

    Posted by Leo Olebe, Managing Director, Games Partnerships, Google Play

     

    Today we are launching Google Play Coffee breaks, a new series where members of our partnerships team get together with apps and games companies to exchange tips and personal lessons gained from the industry, as well as insights gained from participating in some of our Play programs. All in enough time to fit into your coffee break!

    To kick it all off, I enjoyed a virtual coffee with Nimrod Kimhi, Co-founder & CEO, at Jimjum Studios, a small games company from Israel. They participated in the 2021 edition of the Indie Games Festival, making it into the top 10 finalists, and later took part in the Indie Games Accelerator. We felt it was time for us to check back in on the growth they’ve been achieving.

    Watch the full Coffee breaks episode and read my reflections below:

    Launching their first game, Froglike: The Frog Roguelike, just one year ago in 2021, the team of five friends have already made an impact on the mobile game ecosystem early on in their business journey.

    Nim described how their studio is composed of two brothers, two childhood friends, and a musician who they convinced to get onboard their team. Each has a mix of talents and expertise which compliment each other and fit together. And I think this is one of the most important parts of succeeding in this industry. A great team is able to challenge each other and put new ideas on the table, but also come together and agree on those big decisions that are going to move your business forward.

    I really enjoyed catching up with Nim during our first Google Play Coffee breaks. What I found most rewarding was to hear directly from Nim about his experience of the Indie Games Accelerator and Festival. It was actually Jimjum’s chief game designer who initially convinced Nim to sign up for the contest. Despite his initial hesitations of how the competition might interrupt their progress with building the game, Nim says now that the learnings they got from the program saved their team three years worth of mistakes.


     

    Lessons learned in the game industry

    The first? Test early. Nim couldn’t have said it better - make the MVP of your product and get feedback from the gaming community as soon as possible. This is even more important with games because you do have that abstract and subjective layer of what it means to be ‘fun’. You must go through that constant loop of feedback from players and iterations of your game, even though it can be tempting to just push forward with your artistic vision.

    I think this is a really important insight to highlight. From my own experiences here at Google Play and in the mobile gaming industry, one of the most exciting parts about growing a games business is handing your game to the players and discovering ideas that you hadn’t considered yourself. It’s about being flexible, rolling with the punches, and being open to the learning journey rather than rigidly sticking to your original blueprint. Learning from others is what is going to take your game from good to great.

    The second? Don’t lose the core heart of your game. Nim described how every team should know and agree on their Northstar when designing the game, and stick to it. It is easy to get distracted by all the analytics and feedback - and also just through the noise that is the mobile industry and the commercial pressures of making a game. But I agree with Nim, it is so important to never lose the heart of what you are building, and your passion behind it, in order to create a truly unique experience for your users.


     

    Success for small Indie studios

    After participating in our Indie Games Accelerator, I was interested to hear from Jimjum about the learnings they had gained, and how they were able to use them to build such a solid foundation on Google Play and beyond.

    One of the main areas that Nim raised was the need for every game to have a solid marketing strategy. Nim’s key focus is to work on a distribution plan, using channels like online communities to drive awareness of their title. A big part of the strategy is to find key influencers in the field and get them involved with their game. It is also about having a launch phase that allows them to take it step-by-step, rather than one big launch. This meant waiting until they were confident their game was ready, prioritizing certain geographical locations before others, and - of course - testing every step of the way.

    As well as a marketing strategy, I’d add that it’s also about being open to the learning journey. Absorb as much knowledge as you can. There are so many others out there who have been down this road before, so learn from their successes and (perhaps more importantly) their mistakes. As you grow, use your unique perspectives and ideas to then share what you know with others and help build that circle of reciprocity.

    Finally, in a world of millions of gamers, you can find your audience. It may take longer than you imagine, it may be harder, but they are there.

    It was a genuine pleasure to chat to Nim about his experiences. I can’t wait to see Jimjum’s continued growth and new gaming adventures. It is studios like Jimjum that inspire me and my team to keep supporting indies in all ways that we can - whether that’s through programs like the Indie Games Accelerator and the Indie Games Festival (you can sign up now to hear when submissions open for the 2022 editions) or through more resources and tools to help them grow even further.

    We are looking forward to continuing to learn from more businesses, and see what you all do next. Stay tuned for the next episode of Coffee Breaks.

    Do you have any questions for Jimjum? What are your own tips for other indie studios? Let us know on Twitter.

    April 30th 2022, 8:46 am

    Keeping Google Play safe with our key 2022 initiatives

    Android Developers Blog

    Posted by Krish Vitaldevara Director, Product Management, Play and Android Trust & Safety

     

    Keeping Google Play safe for users and developers remains our top priority. Over the past year, we’ve partnered with developers to ensure their apps are safe. We helped developers to protect their apps, prepare to share their data safety practices with users, and collaborate on building more private advertising technology. We also continued investing in machine-learning detection and enhanced app review processes to stop apps with abusive or malicious content before anyone can install them.

    We also realize that it can be challenging for developers to keep up with the pace of change in this evolving privacy and security landscape. We’ve been mindful to give developers clearer updates, more time for substantial changes, and more helpful information through Inbox Console Messages, global webinars, and additional education resources. Today, we’re excited to share more about what’s ahead in 2022 to give you plenty of time to prepare.

    What we look forward to this year

    Giving everyone a clear way to understand an app’s data safety practices

    Developers want to explain data safety to users in a clear and simple way. In the upcoming Data safety section in your app’s Play store listing, you can share how your app collects, shares, and protects user data. Users told us that they value having this information to help them decide if an app is right for them. They’ll start to see the Data safety section in Google Play store in late April, so make sure to submit your Data safety form soon. Completed Data Safety forms will be required for all app updates starting July 20.

    Building a more privacy-friendly approach to advertising

    We recently announced that we’re expanding the Privacy Sandbox initiative to Android. We’re working on innovative solutions to improve user privacy, while continuing to support key mechanisms that developers rely on to build their businesses and provide access to free apps for everyone. We’re building this technology in close collaboration with developers. Join our email newsletter to stay updated.

    Protecting developers' apps from privacy and fraudulent activity

    Last fall, we started rolling out the new Play Integrity API to help you protect their games and apps and ensure that users have the intended experience that you designed. Now, everyone has access to this new API, making it easier to detect suspicious traffic and respond faster to issues like fraud and cheating. We've built this in a future-forward way so that you can easily get new features with little build time required to upgrade. Learn how to set it up for your apps here.

    Helping developers navigate SDKs

    Developers shared that they want faster communication from SDK providers about critical updates, so last year we gave SDK providers a way to notify you about urgent issues in your Google Play Console. You’ve also shared that you want to learn more about an SDK’s safety and reliability to avoid wasting build time or exposing users to unsafe practices. In a few months, we’ll start sharing information like an SDK’s adoption levels, its retention rate, and the runtime permission it uses to help you choose the right SDK for your business and users.

    Enhancing protections for kids and families

    Last year, we continued to refine our advertising restrictions and parental control requirements to further enhance privacy and safety for kids. Eligible developers can now add a badge to their upcoming Data safety section, highlighting that they’re committed to following our Families policy. You’ll also see continued policy updates this year designed to help protect kids' safety and privacy. Join our policy webinars or watch our PolicyBytes to stay updated.

    Responsible Data Collection and Use

    Developers should only collect and use the data required for app functionality and improvement. For practical tips on this front, you can view our best practices guide. This year, we’re continuing to align permissions more closely with the appropriate use cases. We’re also in active conversations with developers about ways to mitigate risks from apps that leverage APIs in older Android OS versions. Stay tuned to our policy update emails, as we’ll share more soon.

    Thank you for your partnership in making Google Play a safe and trustworthy platform for everyone.

    March 3rd 2022, 5:49 pm

    Google for Games Developer Summit returns March 15

    Android Developers Blog

    Posted by Greg Hartrell, Product Director, Games on Play/Android

    With over three billion players showing strong engagement worldwide, the games market continues to remain resilient and grow beyond expectations. As we look ahead this year, the influx of new and returning players creates a great opportunity for developers to scale their games businesses.

    The Google for Games Developer Summit returns virtually on March 15, 2022 at 9AM Pacific. From mobile to cloud, learn about our new solutions for game developers that make it easier to build high-quality games and reach audiences around the world.

    Join us for the keynote at 9AM Pacific followed by over 20 developer sessions on-demand. We’ll share deep-dives and updates on the Android Game Development Kit, Google Play Games beta on PC, Play Asset Delivery, Play Console, and more. The summit is open for all. Check out the full agenda today at g.co/gamedevsummit.

    February 22nd 2022, 12:43 pm

    Discontinuing Kotlin synthetics for views

    Android Developers Blog

    Posted by Márton Braun, Developer Relations Engineer


     

    Synthetic properties to access views were created as a way to eliminate the common boilerplate of findViewById calls. These synthetics are provided by JetBrains in the Kotlin Android Extensions Gradle plugin (not to be confused with Android KTX).

    In November 2020, we announced that this plugin has been deprecated in favor of better solutions, and we recommended removing the plugin from your projects. We know many developers still depend on this plugin’s features, and we’ve extended the support timeframe so you have more time to complete your migrations.

    We are now setting a deadline for these migrations: the plugin will be removed in Kotlin 1.8, which is expected to be released by the end of 2022. At that time, you won’t be able to update your project to newer Kotlin versions if it still depends on the Kotlin Android Extensions plugin. This means that now is the time to perform the necessary migrations in your projects.

    Instead of synthetics, we recommend using View Binding, which generates type-safe binding classes from XML layout files. These bindings provide convenient access to view references and they work safely for layouts with multiple configurations. See the migration guide for detailed instructions on how to adopt View Binding. If you encounter any issues, you can report a bug on the Issue Tracker.

    When building new features, consider using Jetpack Compose, Android's modern UI toolkit. Layouts built with Compose are declarative Kotlin code, eliminating the need to work with view references.

    Another feature included in the plugin is Parcelize, which helps you create parcelable classes. Parcelize is now available in the standalone kotlin-parcelize plugin with unchanged functionality. To get up and running with the new plugin, check out the Parcelize documentation page.

    If you’re still using the Kotlin Android Extensions Gradle plugin, kick off your migration in time so that you can keep upgrading to new Kotlin releases in the future. This will enable you to use the latest language features and take advantage of tooling and compiler improvements.

    February 18th 2022, 1:57 pm

    Write better tests with the new testing guidance

    Android Developers Blog

    Posted by Jose Alcérreca, Android Developer Relations Engineer

     

    As apps increase in functionality and complexity, manually testing them to verify behavior becomes tedious, expensive, or impossible. Modern apps, even simple ones, require you to verify an ever-growing list of test points such as UI flows, localization, or database migrations. Having a QA team whose job is to manually verify that the app works is an option, but fixing bugs at that stage is expensive. The sooner you fix a problem in the development process the better.

    Automating tests is the best approach to catching bugs early. Automated testing (from now on, testing) is a broad domain and Android offers many tools and libraries that can overlap. For this reason, beginners often find testing challenging.

    In response to this feedback, and to accommodate for Compose and new architecture guidelines, we revamped two testing sections on d.android.com:

    Training

    Firstly, there is the new Testing training, which includes the fundamentals of testing in Android with two new articles: What to test, an opinionated guide for beginners, and a detailed guide on Test doubles.

    Faking dependencies in unit tests


    After providing an overview of the theory, the guide focuses on practical examples of the two main types of tests.

    The first developer preview of Android 13

    Android Developers Blog

    Posted by Dave Burke, VP of Engineering

    Every day, billions of people around the world pull out their Android device to help them get things done. That Android works well for each and every one of them is ensured in part through a collaborative process with you, our developer community, sharing feedback to help us make Android stronger.

    Today, we’re sharing a first look at the next release of Android, with the Android 13 Developer Preview 1. With Android 13 we’re continuing some important themes: privacy and security, as well as developer productivity. We’ll also build on some of the newer updates we made in 12L to help you take advantage of the 250+ million large screen Android devices currently running.

    This is just the start for Android 13, and we’ll have lots more to share as we move through the release. Read on for a taste of what’s new, and visit the Android 13 developer site for details on downloads for Pixel and the release timeline. As always, it’s crucial to get your feedback early, to help us include it in the final release. We’re looking forward to hearing what you think, and thanks in advance for your continued help in making Android a platform that works for everyone!


    Privacy & security at the core

    People want an OS and apps that they can trust with their most personal and sensitive information. Privacy is core to Android’s product principles, and Android 13 focuses on building a responsible and high quality platform for all by providing a safer environment on the device and more controls to the user. In today’s release, we’re introducing a photo picker that allows users to share photos and videos securely with apps, and a new Wi-Fi permission to further minimize the need for apps to have the location permission. We recommend trying out the new APIs and testing how the changes may affect your app.

    Photo picker and APIs - To help protect photo and video privacy of users, Android 13 adds a system photo picker — a standard and optimized way for users to share both local and cloud-based photos securely. Android’s long standing document picker allows a user to share specific documents of any type with an app, without that app needing permission to view all media files on the device. The photo picker extends this capability with a dedicated experience for picking photos and videos. Apps can use the photo picker APIs to access the shared photos and videos without needing permission to view all media files on the device. We plan to bring the photo picker experience to more Android users through Google Play system updates, as part of a MediaProvider module update for devices (excepting Go devices) running Android 11 and higher. Give photo picker APIs a try and let us know your feedback!


    Photo picker provides a consistent, secure way for users
    to give apps access to specific photos and videos.


    Nearby device permission for Wi-Fi - Android 13 introduces the NEARBY_WIFI_DEVICES runtime permission (part of the NEARBY_DEVICES permission group) for apps that manage a device's connections to nearby access points over Wi-Fi. The new permission will be required for apps that call many commonly-used Wi-Fi APIs, and enables apps to discover and connect to nearby devices over Wi-Fi without needing location permission. Previously, the location permission requirements were a challenge for apps that needed to connect to nearby Wi-Fi devices but didn’t actually need the device location. Apps targeting Android 13 will be now able to request the NEARBY_WIFI_DEVICES permission with the “neverForLocation” flag instead, which should help promote a privacy-friendly app design while reducing friction for developers. Learn more.


    Developer productivity and tools

    Android 13 also brings new features and tools for developer productivity. Helping you create beautiful apps that run on billions of devices is one of our core missions – whether it’s in Android 13 or through our tools for modern Android development, like a language you love in Kotlin or opinionated APIs with Jetpack. By helping you work more productively, we aim to lower your cost of development so you can focus on continuing to build amazing experiences. Here’s some of what’s new in today’s release.

    Quick Settings Placement API - Quick Settings in the notification shade is a convenient way for users to change settings or take quick actions without leaving the context of an app. For apps that provide custom tiles, we’re making it easier for users to discover and add your tiles to Quick Settings. Using a new tile placement API, your app can now prompt the user to directly add your custom tile to the set of active Quick Settings tiles. A new system dialog lets the user add the tile in one step, without leaving your app, rather than having to go to Quick Settings to add the tile.


     

    Themed app icons - In Android 13 we’re extending Material You dynamic color beyond Google apps to all app icons, letting users opt into icons that inherit the tint of their wallpaper and other theme preferences. All your app needs to supply is a monochromatic app icon and a tweak to the adaptive icon XML. We’re encouraging all developers to provide compatible icons to help provide a consistent experience for users who have opted in. Themed app icons are initially supported on Pixel devices and we’re working with our device manufacturer partners to bring them to more devices. Learn more.


     

    Per-app language preferences - Some apps let users choose a language that differs from the system language, to meet the needs of multilingual users. Such apps can now call a new platform API to set or get the user’s preferred language, helping to reduce boilerplate code and improve compatibility when setting the app’s runtime language. For broader compatibility, we'll be adding a similar API in an upcoming Jetpack library. Learn more.

    Faster hyphenation - Hyphenation makes wrapped text easier to read and helps make your UI more adaptive. In Android 13 we’ve optimized hyphenation performance by as much as 200% so you can now enable it in your TextViews with almost no impact on rendering performance. To enable faster hyphenation, use the new fullFast or normalFast frequencies in setHyphenationFrequency(). Give faster hyphenation a try and let us know what you think!

    Programmable shaders - Android 13 adds support for programmable RuntimeShader objects, with behavior defined using the Android Graphics Shading Language (AGSL). AGSL shares much of its syntax with GLSL, but works within the Android rendering engine to customize painting within Android's canvas as well as filtering of View content. Android internally uses these shaders to implement ripple effects, blur, and stretch overscroll, and Android 13 enables you to create similar advanced effects for your app.


    AGSL animated shader, adapted
    from this GLSL Shader

    OpenJDK 11 updates - In Android 13 we’ve started the work of refreshing Android's Core Libraries to align with the OpenJDK 11 LTS release, with both library updates and Java 11 programming language support for app and platform developers. We also plan to bring these Core Library changes to more devices through Google Play system updates, as part of an ART module update for devices running Android 12 and higher. Learn more.


    App compatibility

    With each platform release we’re working to make updates faster and smoother by prioritizing app compatibility as we roll out new platform versions. In Android 13 we’ve made most app-facing changes opt-in to give you more time, and we’ve updated our tools and processes to help you get ready sooner.

    More of Android updated through Google Play - In Android 13 we’re continuing to expand our investment in Google Play system updates (Project Mainline) to give apps a more consistent, secure environment across devices, and to deliver new features and capabilities to users. We can now push new features like photo picker and OpenJDK 11 directly to users on older versions of Android through updates to existing modules. We’ve also added new modules, such as the Bluetooth and Ultra wideband modules, to further expand the scope of Android’s updatable core functionality.

    Optimizing for tablets, foldables, and Chromebooks - With all the momentum in large screen devices like tablets, foldables, and Chromebooks, now is the time to get your apps ready for these devices and design fully adaptive apps that fit any screen. You can get started using our guidance on optimizing for tablets, then learn how to build for large screens and develop for foldables.

    Easier testing and debugging of changes - To make it easier for you to test the opt-in changes that can affect your app, we’ll make many of them toggleable again this year. WIth the toggles you can force-enable or disable the changes individually from Developer options or adb. Check out the details here.


    App compatibility toggles in Developer Options.


    Platform stability milestone - Like last year, we’re letting you know our Platform Stability milestone well in advance, to give you more time to plan for app compatibility work. At this milestone we’ll deliver not only final SDK/NDK APIs, but also final internal APIs and app-facing system behaviors. This year we’re expecting to reach Platform Stability in June 2022, and from that time you’ll have several weeks before the official release to do your final testing. The release timeline details are here.


     

    Get started with Android 13

    The Developer Preview has everything you need to try the Android 13 features, test your apps, and give us feedback. For testing your app with tablets and foldables, the easiest way to get started is using the Android Emulator in a tablet or foldable configuration - complete setup instructions are here. For phones, you can get started on a device today by flashing a system image to a Pixel 6 Pro, Pixel 6, Pixel 5a 5G, Pixel 5, Pixel 4a (5G), Pixel 4a, Pixel 4 XL, or Pixel 4 device. If you don’t have a Pixel device, you can use the 64-bit system images with the Android Emulator in Android Studio. For even broader testing, GSI images are available.

    When you’re set up, here are some of the things you should do:

    We’ll update the preview system images and SDK regularly throughout the Android 13 release cycle. This initial preview release is for developers only and not intended for daily or consumer use, so we're making it available by manual download only. Once you’ve manually installed a preview build, you’ll automatically get future updates over-the-air for all later previews and Betas. More here.

    As we reach our Beta releases, we'll be inviting consumers to try Android 13 as well, and we'll open up enrollments for the Android Beta program at that time. For now, please note that Android Beta is not yet available for Android 13.

    For complete information, visit the Android 13 developer site.

    Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

    February 10th 2022, 2:00 pm

    Material You: Coming to more Android devices near you

    Android Developers Blog

    Posted by Rohan Shah, Product Manager on Android

    We’re excited to announce that Material You, specifically dynamic color, will soon be available on more Android 12 phones globally, including devices by Samsung, OnePlus, Oppo, Vivo, realme, Xiaomi, Tecno, and more!

    With the release of Android 12 and the introduction of Material You, we made the Android experience more fluid and personal than ever for our users. The gorgeous new design brought to life experiences such as a more dynamic touch ripple, a silky-smooth scroll, and a spacious layout. But the star of the show was, and continues to be, dynamic color – pick your favorite wallpaper and the entire phone experience transforms to better express you, from your home screen to some of your favorite apps.

    With Material You, personalization is now a defining trait of Android that our ecosystem will continue building on for years to come. We want to make sure that you, our developers, have the confidence to join us on the journey and bring a more personal look and feel to users through your apps.


     

    A Gmail rainbow with different wallpaper-based themes, shown on some of the Android device experiences that will support Material You


    As more Android 12 devices land in the next couple months, our OEM partners are working with us to ensure that key design APIs, especially around dynamic color, work consistently across the Android ecosystem so developers can have peace of mind and users can benefit from a cohesive experience.

    To better help you understand how to implement dynamic color and fit it into your overall brand story, the Material team has published the comprehensive Customizing Material article with codelabs and guides to get started with Views or Jetpack Compose. Watch for ongoing updates to Material Theme Builder and Material Color Utilities in the coming months to provide you with the tools you need for design and implementation.


    Visualize dynamic color in your app with the Material Theme Builder


    Google apps (Gmail, Photos, Chrome, and many more) have used the very same tools and guidance to bring the color story to life on their branded experiences, and we’re excited for you to hop on board as well. As you learn more about how color can harmonize with user choice and work with dynamic color in your app, we’d love to get your feedback via the Material Android issue tracker. Happy coloring!

    February 10th 2022, 10:15 am

    Jetpack Compose 1.1 is now stable!

    Android Developers Blog

    Posted by Florina Muntenescu, Android Developer Relations Engineer

    Today, we’re releasing version 1.1 of Jetpack Compose, Android's modern, native UI toolkit, continuing to build out our roadmap. This release contains new features like improved focus handling, touch target sizing, ImageVector caching, and support for Android 12 stretch overscroll. Compose 1.1 also graduates a number of previously experimental APIs to stable and supports newer versions of Kotlin. We've already updated our samples, codelabs, and Accompanist library to work with Compose 1.1.

    New stable features and APIs

    Image vector caching

    Compose 1.1 introduces image vector caching bringing big performance improvements. We’ve added a caching mechanism to painterResource API to cache all instances of ImageVectors that are parsed with a given resource id and theme. The cache will be invalidated on configuration changes.

    Touch target sizing

    With respect to Compose 1.0, Material components will expand their layout space to meet Material accessibility guidelines touch target size. For instance, a RadioButton's touch target will expand to a minimum size of 48x48dp, even if you set the RadioButton's size to be smaller. This aligns Compose Material to the same behavior of Material Design Components, providing consistent behavior if you mix Views and Compose. This change also ensures that when you create your UI using Compose Material components, minimum requirements for touch target accessibility will be met.

    If you find this change breaks existing layout logic, set LocalMinimumTouchTargetEnforcement to false to disable this behavior, but please be mindful this might reduce the usability of your app, and should be used with caution.

     

    RadioButton touch target update
    Left: Compose 1.0, right: Compose 1.1

    Experimental to stable APIs

    Several APIs graduated from experimental to stable. Highlights include:

    New experimental APIs

    We’re continuing to bring new features to Compose. Here are a few highlights:

    Try out the new APIs using @OptIn and give us feedback!

    Note: Using Compose 1.1 requires using Kotlin 1.6.10. Check out the Compose to Kotlin Compatibility Map for more information.

    Wondering what’s next? Check out our updated roadmap to see the features we’re currently thinking about and working on, such as lazy item animations, downloadable fonts, moveable content, and more!

    Jetpack Compose is stable, ready for production, and continues to add the features you’ve been asking us for. We’ve been thrilled to see tens of thousands of apps start using Jetpack Compose in production already and we can’t wait to see what you’ll build!

    We’re grateful for all of the bug reports and feature requests submitted to our issue tracker over the Alphas and Betas - they help us to improve Compose and build the APIs you need. Do continue providing your feedback and help us make Compose better!

    Happy composing!

    February 9th 2022, 1:20 pm

    Chrome’s multitasking usage increases 18x on large screens

    Android Developers Blog

    Posted by The Android Team

    Google Chrome is the most widely used browser globally, and the Chrome team wants to ensure their users have a great experience across all devices. Many Chrome users have been requesting more productivity features on their mobile, tablet, and foldable devices to better match the capabilities of Chrome on desktop. To meet these needs, the team decided to invest in building features that encourage multitasking capabilities. While the team built this for phones as well, they wanted to especially focus on implementing these features where people would use them the most: large screen devices such as tablets and foldables.



    What they did

    The team first decided to focus on building a way for people to open multiple Chrome windows (instances) side by side. They took advantage of 12L features such as the taskbar and also took advantage of the Samsung edge panel.

    They utilized the singleInstancePerTask launch mode to build the side-by-side functionality. They wanted to balance allowing people to use many windows at once with making sure the feature was still usable. The team researched usability best practices, observed other multi-window experiences on large screen devices, and thought through limitations to ensure optimal device memory usage. They determined people could comfortably use up to five windows side by side on large screen devices, and the team updated their app to support this functionality.

    The team wanted to make it easier for their users to take advantage of this feature, so they added a “New Window” shortcut in the menu. They used the new capability of intent flag combo LAUNCH_ADJACENT|NEW_TASK to create this shortcut. Having this feature be more prominently displayed in the product greatly improved the usage. They saw multi-window usage improve by 18x.


    Results

    This is a new feature, and the Chrome team has already seen that multi-instance for the Chrome app is used 42% more on tablets and foldables than on phones that support the feature. This usage demonstrates the functionality resonated well with Chrome users on large screen devices, and that it was worth investing in building these features to enhance the experience for Chrome users on large screens.

    They also had very positive feedback from their large screen users in the form of app reviews. “This app is fabulous 👌! You can split screen, change tabs, and much more. You can also play a lot of games in it. I prefer to five star this app.”

    The team has future plans to further improve the Chrome experience on large screens to help their users be more productive.



    Get started

    Learn more about how you can get started with optimizing your app for large screens.

    February 8th 2022, 6:18 pm

    Smule Adopts Google’s Oboe to Improve Recording Quality & Completion Rates

    Android Developers Blog

    Posted by the Smule Engineering team: David Gayle, Chris Manchester, Mark Gills, Trayko Traykov, Randal Leistikow, Mariya Ivanova.


    Executive Summary

    As the most downloaded singing app of all time, Smule Inc. has been investing on Android to improve the overall audio quality audio and more specifically to improve the lower latency, i.e. allowing singers to hear their voices in the headset as they perform. The teams specialized in Audio and Video allocated a significant part of 2021 into making the necessary changes to convert the Smule application used by over ten million Android users from using the OpenSL audio API to the Oboe audio library, enabling roughly a 10%+ increase in recording completion rate.

    Introduction

    Smule Inc. is a leader in karaoke, with an app that helps millions of people sing their favorite songs and share performances daily. The Smule application goes beyond traditional karaoke by focusing on co-creation, offering users the unique opportunity to share music and collaborate with friends, other singers on the platform, and their favorite music artists. Audio quality is paramount, and, in 2020, the Smule team saw potential to enhance the experience on Android.


    Smule’s legacy OpenSL implementation wasn’t well-suited to leverage the blazing-fast hardware of new devices while supporting the diverse devices across its world-wide market. Smule’s development team determined that upgrading the audio system was a necessary and a logical improvement.

    Oboe Rollout Strategy

    Smule was faced with two possible routes for improvement: directly targeting AAudio, a high-performance Android C audio API introduced in Android O designed for applications that require low latency, or Oboe, which wraps both AAudio and OpenSL internally. After careful evaluation, Smule’s development team opted for Oboe’s easy-to-use code base, and broad device compatibility, and robust community support, which achieved the lowest latency and made the best use of the available native audio.

    The conversion to Oboe represented a significant architectural and technologicaltechnology evolution. As a result, Smule approached the rollout process conservatively, with a planned, gradual release that started with a small selection of device models to d validate quality. Week after week, the team enabled more devices (reverting a limited number of devices exhibiting problems in Oboe back to OpenSL). This incremental, methodical approach helped to minimize risk and allowed the engineering team to handle device-specific issues as they occurred.

    Improving the Audio Quality Experience

    Smule switched to Oboe to help improve the app experience. They hoped to reduce dramatically audio playback crashes, eliminate issues such as echo and crackling during recording, and reduce audio latency. A recent article in the Android Developers blog shows that the average latency of the twenty most popular devices decreased from 109 ms in 2017 to 39ms today using Oboe. Whereas a monitoring delay of 109ms is heard as a distinct echo which interferes with live singing, 39ms is beneath the acceptable threshold for real-time applications. The latencies of top devices today are all within 22ms of one another, and this consistency is a big plus.

    The lift in recording completion rate Smule has seen using Oboe is likely due to this lower latency, allowing singers to hear their voices in the headset as they perform with Smule’s world-class audio effects applied, but without an echo.

    Using an effective collaborative GitHub portal dedicated to Oboe, the Google team played a significant role in Smule’s Oboe integration, providing them with key insights and support. Working together, the two teams were able to launch the largest Oboe deployment to date, reaching millions of active users. The Smule team contributed to addressing some Oboe code issues, and the Google team coordinated with certain mobile device makers to further improve Oboe's compatibility.


    Audio quality is of the utmost importance to our community of singers, and we're thankful for our shared commitment to delivering the best possible experience as well as empowering musical creation on Smule. - Eric Dumas, Smule CTO.


    Given the massive scale of the operation, it was only natural to face device-specific issues. One notable example was an OS built-in functionality that injected echo sound effects in the raw audio stream, which prevented Smule from correctly applying its own patented DSP algorithms and audio filters. Google’s team came to the rescue, providing lightning fast updates and patches to the library. The process of reporting Oboe issues was straightforward, well defined, and handled in a timely manner by the Google team.

    Smule overcame other device-specific roadblocks together, including errors with specific chipsets. As an example, when Oboe was asking for mono microphone input, a few devices provided stereo inputs mixed into one fake mono microphone input. Smule created a ticket in Oboe’s GitHub, providing examples and reproducing the issue using the Oboe tester app.

    The Google-developed Oboe tester app was a helpful tool in solving and identifying issues throughout the implementation. It proved especially useful in testing many of the features of Oboe, AAudio, and OpenSL ES, as well as testing Android devices, measuring latency and glitches, and much more. The application offers a myriad of features that can help to simulate almost any audio setup. The Oboe tester can also be used in automated testing, by launching it from a shell script using an Android Intent. Smule relied heavily on the automation testing, given the large number of devices covered in the integration.

    Once Smule was confident the device-specific issues were resolved and the Oboe audio was stable enough, Smule switched to a wider split testing rollout approach. In just a few weeks, Smule increased the population using Oboe from 10% to 100% percent of the successful devices, which was only possible due to the positive feedback and green KPI metrics Oboe received continuously throughout the release journey.

    The results speak for themselves. Smule users on Oboe are singing more - it’s as simple as that. Unique karaoke recordings and performance joins, or duets, increased by a whopping 8.07%, Unique uploads by 3.84%, and song performances were completed by 4.10% more. Smule has observed in Q3 and Q4 2021 an increase of the recording completion rate by 10%+.

    Using the Firebase Crashlytics tool by Google, Smule has seen a decline in audio-related crashes since the full Oboe release, making the app more stable - even on lower-end devices. Smule’s dedicated customer support team was thrilled to report a 33% reduction in audio-related complaints, including issues like (unintended) robot voice and echo.

    The decision to switch to Oboe has paid off in spades. The application is functioning better than ever and Smule is well-equipped to face further advancements in audio and hardware with the updated technology. Most importantly, Smule users are happy and making music, which is what it’s all about.

    February 2nd 2022, 1:33 pm

    Grow your game’s revenue with Google Play Console’s new strategic guidance

    Android Developers Blog

    Posted by Phalene Gowling, Product Manager, Google Play

    Last year, mobile game consumer spending grew 7.3% to $93.2 billion with no signs of slowing down. In this competitive, growing market, effectively monetizing your audience has never been more important. But without access to a strategy consultant, how can you know if your monetization strategy is as strong as it can be?

    That’s why we’re expanding the suite of tools available in Play Console to help it be exactly that. Last year, we released new engagement and monetization metrics on the Statistics page to help you grow your business, and now we’re pleased to announce new strategic guidance tools to help you drive successful monetization.

    In this new section, you’ll see our metric-driven guidance to help you better monetize your game by:

    1. Contextualizing your topline revenue: Understand how your game’s revenue metrics contribute to your overall business goals, and learn when to prioritize optimizing for one metric over another.
    2. Identifying opportunities: Find out where there is an opportunity to improve a metric by benchmarking against peer groups, and explore insights by country.
    3. Recommending next steps: Learn how to take advantage of monetization opportunities with specific actions you can take right away.

    The strategic guidance metric hierarchy. (Learn more or visit our Play Academy for specific courses like monitoring KPIs.)

    We’ve spent the last couple of years perfecting our guidance, and testing the dashboard with selected partners. Feedback on our strategic guidance has been positive — and we hope you’ll find it useful, too.

    “This is extremely useful! These type of insights are actually what we expect from Google, because this is something that really can help us to scale our business.”

    - Product Manager at Gameloft


    Understand key monetization drivers and their relationships with the metric hierarchy

    Strategic guidance can be found in Financial reports within Play Console. In partnership with experts in mobile games growth, we’ve included primary monetization metrics (including new metrics) and their relationships to help you easily assess your performance and measure against your peers. You can see all the metrics in this Help Center article.

    The metric hierarchy is a tool to help you understand how you and your teams can directly influence the lower-level metrics of your games performance, like buyer conversions, which contribute to your overall top-line business performance. Using peerset comparisons and per-country breakdowns, you can quickly identify your biggest growth opportunities: what markets are underperforming and where you are a market leader.


    Explore metric analysis to turn insights into action

    Select a metric and explore it in detail to track your performance over time. Strategic guidance shows you a breakdown of your chosen metric by location to help you spot opportunities to expand your game globally. The detailed metric analysis also helps you identify where a small investment has an outsized return.

    Strategic guidance metric recommendation example for returning daily buyer ratio.

    Whether you’ve created a casual game or an RPG, the metric-specific recommendations are designed to be insightful and relevant to a variety of game developers. They can be used to help you diversify your promotional content, refine your game mechanics, or test new price points that enable purchasing power parity.


    Get IAP monetization guidance today, with more insights to come

    With an increasing number of developers shifting focus from an ads-only monetization business model to include in-app purchases (IAP), we’ve developed strategic guidance to be most relevant for developers that include IAP-monetization as part of their overall strategy. With this launch, we’re excited to bring growth consulting opportunities to these game developers at scale. Stay tuned for more launches this year to help you successfully drive your revenue growth.

    February 1st 2022, 2:10 pm

    Improving App Performance with Baseline Profiles

    Android Developers Blog

    Or how to improve startup time by up to 40%

    Posted by Kateryna Semenova, DevRel Engineer; Rahul Ravikumar, Software Engineer; Chris Craik, Software Engineer


    Why is startup time important?

    A lot of apps find correlation between app performance and user engagement. People expect apps to be responsive and fast to load. Startup time is one of the major metrics for app performance and quality.

    Some of our partners have already invested a lot of time and resources for app startup optimizations. For example, check out the Facebook story.

    In this blog post we’ll discuss Baseline Profiles and how they improve app and library performance, including startup time by up to 40%. While this blogpost focuses on startup, baseline profiles also significantly improve jank as well.


    History

    Android 9 (API level 28) introduced ART optimizing profiles in Play Cloud to improve app startup time. On average, we’ve seen that apps' cold starts are at least 15% faster across a variety of devices when Cloud Profiles are available.


    How do Profiles work?

    When the app is first launched after install or update, its code runs in an interpreted mode until it is JITted. In an APK, Java and Kotlin code is compiled as dex bytecode, but not fully compiled to machine code (since Android 6), due to the cost of storing and loading fully compiled apps. Classes and methods that are frequently used in the app, as well as those used for app startup, are recorded into a profile file. Once the device enters idle mode, ART compiles the apps based on these profiles. This speeds up subsequent app launches.

    Starting with Android 9 (API level 28), Google Play also provides Cloud Profiles. When an app runs on a device, the profiles generated by ART are uploaded by the Play Store app and aggregated in the cloud. Once there are enough profiles uploaded for an application, the Play app uses the aggregated profile for subsequent installs.


    Problem

    While Cloud Profiles are great when they are available, they aren't always ready to be used when an app is installed. Collecting and aggregating the profiles usually takes several days, which is a problem when many apps update on a weekly basis. Many users will install an update before the Cloud Profile is available. The Google Android team started looking for other ways to improve the latency of profiles.


    Solution

    Baseline Profiles are a new mechanism to provide profiles which can be used on Android 7 (API level 24) and higher. A baseline profile is an ART profile generated by the Android Gradle plugin using a human readable profile format that can be provided by apps and libraries. An example might look like this:

    HSPLandroidx/compose/runtime/ComposerImpl;->updateValue(Ljava/lang/Object;)V
    HSPLandroidx/compose/runtime/ComposerImpl;->updatedNodeCount(I)I
    HLandroidx/compose/runtime/ComposerImpl;->validateNodeExpected()V
    PLandroidx/compose/runtime/CompositionImpl;->applyChanges()V
    HLandroidx/compose/runtime/ComposerKt;->findLocation(Ljava/util/List;I)I
    

    Example for Compose library.


    The binary profile is stored in a specific location in the APK assets directory (assets/dexopt/baseline.prof).

    Baseline Profiles are created during build time, shipped as part of the APK to Play, and then sent from Play to users when an app is downloaded. They fill the gap in the ART Cloud Profile pipeline, when Cloud Profiles are not yet available, and automatically merge with Cloud Profiles when they are.


    This diagram displays the baseline profile workflow from creation through end-user delivery.


    One of the biggest benefits of Baseline Profiles is that they can be developed and evaluated locally so developers can see realistic end-user performance improvements. They are also supported on a lower version of Android(7 and higher) than Cloud Profiles, which are only available starting in Android 9.


    Impact


    App devs

    In early 2021, Google Maps switched from a two-week to a one-week release cycle. More frequent updates meant more frequently discarding local pre-compilation, and more users experiencing slow launches without Play Cloud Profiles. By using Baseline Profiles, Google Maps improved their average startup time by 30% and saw a corresponding increase in searches by 2.4%, an immense gain for such an established app.


    Library devs

    Code in a library is just like that of an app - it's not fully compiled by default, which can be a problem if it does significant work on the critical path of startup.

    Jetpack Compose is a UI library that is not a part of the Android system image and thus not fully compiled when installed, unlike much of the Android View toolkit code. This was causing performance problems, especially for the first few cold launches of the app.

    To solve this problem, Compose uses profile installer. It ships baseline profile rules which reduce startup time and jank in Compose apps.

    Google PlayStore’s search results page has been re-written with Compose. After incorporating the Baseline Profile rules from Compose, time to render the initial search results page with images improved by ~40%.

    The Android team has also added Baseline Profiles to relevant AndroidX libraries. This benefits all Android apps using these libraries. Constraint Layout has found shipping profile rules reduces animation frame times by more than one millisecond.


    How to use Baseline Profiles


    Create a custom Baseline Profile

    All apps and library developers can benefit from including Baseline Profiles. Ideally, developers create profiles for their most critical user journeys to ensure that those journeys have consistently fast performance regardless of whether cloud profiles are available. Check out the detailed guide on how to set up Baseline Profiles for both app and library developers.


    Update dependencies

    If you are not ready to generate Baseline Profiles for your app right now, you can still benefit from them by updating your dependencies. If you build with Android Gradle Plugin 7.1.0-alpha05 or newer, you'll get Baseline Profiles included in your APK that are already provided by libraries (such as Jetpack). Google Play compiles your app with these profiles at install time. You can supplement these profiles as part of building your application.


    Measure Improvements

    Don’t forget to measure improvements. Follow the steps on how to measure startup with the generated profile locally.


    Provide feedback

    Please share your feedback and let us know your experience!

    January 28th 2022, 1:52 pm

    Building apps for Android Automotive OS

    Android Developers Blog

    Posted by Madan Ankapura, Product Manager

    Today we’re announcing the availability of version 1.2 beta of the Car App Library, enabling app developers to start building their navigation, parking, and charging apps for Android Automotive OS.

    Now, developers can begin building and testing apps for these categories using the Automotive OS emulator across both Android Automotive OS and Android Auto. For the entire list of changes in v1.2 beta, please see the release notes. To start building your app for the car, check out our updated developer documentation, car quality guidelines, and design guidelines.

    As announced earlier, drivers of Polestar 2 and Volvo cars can now download charging (ChargePoint, PlugShare), parking (Spothero, Parkwhiz), and navigation (Flitsmeister, Sygic) apps developed with the Car App Library by joining the Google Group and opting-in to each app's beta on the Google Play store, with your Gmail account.

    Car App Library apps on Android Automotive OS are automatically rendered to be consistent with the rest of the experience within each car, without additional work needed from developers.. For example,

    Polestar 2
    Volvo

    Polestar 2 setting with labeled On / Off switches for PlugShare

    Volvo settings with sliding switches for PlugShare

    Polestar 2 sign-in screen for SpotHero

    Volvo sign-in screen for SpotHero

    Example of app customization on Android Automotive OS

    Experience for yourself how your app will look within the different systems, by accessing the OEM emulator system images downloadable in Android Studio. You can begin developing your charging, parking and navigation apps for Android Automotive OS today, and we are working to enable you to publish your apps to the Google Play store in the coming months (stay tuned!).

    Beyond navigation, rideshare drivers spend a lot of time in their vehicles and will benefit from safer interactions if those apps can be brought to the car’s screen. We are working with Lyft and Kakao Mobility to bring their driver app experiences into the car in the coming months.

    We are also pleased to announce that we are expanding support to all Points of Interest apps. Beyond charging and parking, this allows any app that will help users discover and search for interesting locations on a map, and optionally enable them to navigate to such points. We are partnering with MochiMochi, Fuelio, Pezzi Bezzina, and NAVITIME JAPAN as our early access partners.

    If you’re interested in joining our Early Access Program in the future, please fill out this interest form. You can get started with the Android for Cars App Library today, by visiting g.co/androidforcars.

    January 27th 2022, 5:06 pm

    Announcing Glance: Tiles for Wear OS made simple

    Android Developers Blog

    Posted by Anna Bernbaum, Associate Product Manager


    Last year we announced the Wear Tiles API. To complement that Java API, we are excited to announce that support for Wear OS Tiles has been added to Glance, a new framework built on top of Jetpack Compose designed to make it easier to build for surfaces outside your app on Android. We'd love to get your feedback on this alpha version.

    Tiles provide Wear OS users easy access to the information and actions they need in order to get things done quickly. They also are one of the most used surfaces on Wear OS. Just one swipe away from the Watch Face, users can quickly access the most important information or actions from an app, like start a timer or get the latest weather forecast.




    Let's see how we can create a Tile with Glance:


    class HelloTileService : GlanceTileService() {
       @Composable
       override fun Content() {
           Text(text = "Hello Glance")
       }
    }

    The simple code above generates the Tile below.


    “Hello Glance” Tile sample with Glance


    Note: Using Glance-wear-tiles requires`minSdkVersion`>= 26.



    How it works

    Glance creates “glanceable” experiences across Android surfaces using a base-set of Composables. For Tiles on Wear OS, Glance translates Composables into Tiles.


     

    Diagram: Glance structure


    Glance requires Compose to be enabled and depends on Runtime, Graphics, and Unit UI Compose layers, but it’s not directly interoperable with other existing Jetpack Compose UI elements, like Compose for Wear OS.

    What’s in the Alpha

    This initial release introduces the main APIs to build wear Tiles:

    We are working on bringing even more functionality with default theming, further Android Studio support, and more. Stay tuned for new releases.

    Get started with Glance

    For a quick start, take a look at the samples in the AndroidX repository. Glance works with the latest stable Android Studio, although since Glance relies on Compose Runtime, follow the steps on the Jetpack Compose docs to set it up first.

    The Alpha version is your opportunity to influence the APIs, so please share your feedback and let us know your experience!

    Happy Composing with Glance!

    January 26th 2022, 1:52 pm

    Android Studio Bumblebee (2021.1.1) Stable

    Android Developers Blog

    Posted by Adarsh Fernando, Product Manager, Android

    The Android Studio team has been abuzz with the stable release of Android Studio Bumblebee (2021.1.1) 🐝 and Android Gradle plugin (AGP) 7.1.0; the latest versions of Android official IDE and build system. We’ve improved functionality across a broad area of the typical developer workflow: Build and Deploy, Profiling and Inspection, and Design.

    Some notable additions include a unified test execution between Android Studio and your continuous integration (CI) server ✅, convenient pairing flows to support ADB over Wi-Fi 📲, Improved Profiler tools to help you identify and analyze jank in your app 🕵️, and new ways to preview animations 🎥 and UI interactions without deploying your app to a device.

    As always, this release wouldn’t be possible without the early feedback from our Preview users. So read on or watch below for further highlights and new features you can find in this stable version. If you’re ready to jump in and see for yourself, head over to the official website to download Android Studio Bumblebee (2021.1.1).


    What’s in Android Studio Bumblebee (2021.1.1)

    Below is a full list of new features in Android Studio Bumblebee (2021.1.1), organized by the three major themes.

    Build and Deploy



    Profile and Inspect



    Design

    Interact with the Compose Preview to validate behavior



    To recap, Android Studio Bumblebee (2021.1.1) includes these new enhancements & features:

    Build and Deploy
    Profile and Inspect
    Design

    Google Play Games beta launches on PC in Korea, Taiwan, and Hong Kong

    Android Developers Blog

    Posted by Arjun Dayal, Group Product Manager, Google Play Games

    In December, we announced that Google Play Games will be coming to PCs. As part of our broader goal to make our products and services work better together, this product strives to meet players where they are and give them access to their games on as many devices as possible. We're excited to announce that we’ve opened sign-ups for Google Play Games as a beta in Korea, Taiwan, and Hong Kong.

    Users participating in the beta can play a catalog of Google Play games on their Windows PC via a standalone application built by Google. We’re excited to announce that some of the most popular mobile games in the world will be available at launch, including Mobile Legends: Bang Bang, Summoners War, State of Survival: The Joker Collaboration, and Three Kingdoms Tactics, which delight hundreds of millions of players globally each month.

    This product brings the best of Google Play to more laptops and desktops, enabling immersive and seamless gameplay sessions between a phone, tablet, Chromebook, and Windows PC. Players can easily browse, download, and play their favorite mobile games on their PCs, while taking advantage of larger screens with mouse and keyboard inputs. No more losing your progress or achievements when switching between devices, it just works with your Google Play Games profile! Play Points can also be earned for Google Play Games activity on PCs.

    We’re thrilled to expand our platform for players to enjoy their favorite Android games even more. To sign up for future announcements, or to access the beta in Korea, Taiwan, and Hong Kong, please go to g.co/googleplaygames. If you’re an Android developer looking to learn more about Google Play Games, please express interest on our developer site. We’ll have more to share on future beta releases and regional availability soon.

    Windows is a trademark of the Microsoft group of companies.
    Game titles may vary by region.

    January 20th 2022, 7:09 pm

    Android Basics and Training Update

    Android Developers Blog

    Posted by Dan Galpin, Developer Relations Engineer

    In October of 2021 we released the final unit of Android Basics in Kotlin, our free, self-paced programming course that makes Android development accessible to everyone. It teaches people with no programming experience how to build Android apps. Along the way, students learn the fundamentals of programming and the basics of the Kotlin programming language.

    In response to feedback from educators and learners, we've continued to iterate on our course material, adding projects that allow you to apply learnings along with new topics that can prepare students for more advanced material.

    A focus on basics

    With these updates, Android Basics in Kotlin now covers the key material covered in Android Kotlin Fundamentals, so we will be sunsetting the latter course. More advanced learners are encouraged to work through the Basics material, skipping sections that they are familiar with and moving straight to quizzes. Focusing on basics means that intermediate and advanced learners that might be missing a key concept will have what they need to succeed with this material. This also allows our team to focus on making sure our courseware continues to represent our most recent guidance. In addition to courseware, we're continuing to provide codelabs, code samples, documentation, and video content to serve learners at all levels.

    What's next?

    Our team is hard at work on the next course that will teach people how to program Android applications using Jetpack Compose. We're looking forward to teaching Android’s modern toolkit for building native UI because of all the ways that it simplifies and accelerates Android UI development.

    What to do now

    Taking the current course will teach you the fundamentals of app development, serving as a great starting point should you want to explore the existing Jetpack Compose Learning Pathway, or jump into the upcoming Android Basics with Compose course. You'll have a foundation that you can build on as you continue to explore the world of Android development. Both versions of Android Basics are planned to coexist, giving the option of learning Android with either UI toolkit.

    Whether you’ve never built an app before but want to learn how, or just want to brush up on some of our latest best practices, check out the Android Basics in Kotlin course.

    January 20th 2022, 1:50 pm

    Creating an app to help your community during the pandemic with Gaston Saillen #IamaGDE

    Android Developers Blog

    Posted by Alicja Heisig, Developer Relations Program Manager

    Welcome to #IamaGDE - a series of spotlights presenting Google Developer Experts (GDEs) from across the globe. Discover their stories, passions, and highlights of their community work.

    Gaston Saillen started coding for fun, making apps for his friends. About seven years ago, he began working full-time as an Android developer for startups. He built a bunch of apps—and then someone gave him an idea for an app that has had a broad social impact in his local community. Now, he is a senior Android developer at Distillery.

    Meet Gaston Saillen, Google Developer Expert in Android and Firebase.

    Building the Uh-LaLa! app

    After seven years of building apps for startups, Gaston visited a local food delivery truck to pick up dinner, and the server asked him, “Why don’t you do a food delivery app for the town, since you are an Android developer? We don’t have any food delivery apps here, but in the big city, there are tons of them.”

    The food truck proprietor added that he was new in town and needed a tool to boost his sales. Gaston was up for the challenge and created a straightforward delivery app for local Cordoba restaurants he named Uh-Lala! Restaurants configure the app themselves, and there’s no app fee. “My plan was to deliver this service to this community and start making some progress on the technology that they use for delivery,” says Gaston. “And after that, a lot of other food delivery services started using the app.”

    The base app is built similarly to food delivery apps for bigger companies. Gaston built it for Cordoba restaurants first, after several months of development, and it’s still the only food delivery app in town. When he released the app, it immediately got traction, with people placing orders. His friends joined, and the app expanded. “I’ve made a lot of apps as an Android engineer, but this is the first time I’ve made one that had such an impact on my community.”

    He had to figure out how to deliver real-time notifications that food was ready for delivery. “That was a little tough at first, but then I got to know more about all the backend functions and everything, and that opened up a lot of new features.”

    He also had to educate two groups of users: Restaurant owners need to know how to input their data into the app, and customers had to change their habit of using their phones for calls instead of apps.

    Gaston says seeing people using the app is rewarding because he feels like he’s helping his community. “All of a sudden, nearby towns started using Uh-LaLa!, and I didn't expect it to grow that big, and it helped those communities.”

    During the COVID-19 pandemic, many restaurants struggled to maintain their sales numbers. A local pub owner ran a promotion through Instagram to use the Uh-Lala! App for ten percent off, and their sales returned to pre-COVID levels. “That is a success story. They were really happy about the app.”


    Becoming a GDE

    Gaston has been a GDE for seven years. When he was working on his last startup, he found himself regularly answering questions about Android development and Firebase on StackOverflow and creating developer content in the form of blog posts and YouTube videos. When he learned about the GDE program, it seemed like a perfect way to continue to contribute his Android development knowledge to an even broader developer community. Once he was selected, he continued writing blog posts and making videos—and now, they reach a broader audience.

    “I created a course on Udemy that I keep updated, and I’m still writing the blog posts,” he says. “We also started the GDG here in Cordoba, and we try to have a new talk every month.”

    Gaston enjoys the GDE community and sharing his ideas about Firebase and Android with other developers. He and several fellow Firebase developers started a WhatsApp group to chat about Firebase. “I enjoy being a Google Developer Expert because I can meet members of the community that do the same things that I do. It’s a really nice way to keep improving my skills and meet other people who also contribute and make videos and blogs about what I love: Android.”

    The Android platform provides developers with state-of-the art tools to build apps for user. Firebase allows developers to accelerate and scale app development without managing infrastructure; release apps and monitor their performance and stability; and boost engagement with analytics, A/B testing, and messaging campaigns.


    Future plans

    Gaston looks forward to developing Uh-La-La further and building more apps, like a coworking space reservation app that would show users the hours and locations of nearby coworking spaces and allow them to reserve a space at a certain time. He is also busy as an Android developer with Distillery.


    Gaston’s advice to future developers

    “Keep moving forward. Any adversity that you will be having in your career will be part of your learning, so the more that you find problems and solve them, the more that you will learn and progress in your career.”

    Learn more about the Experts Program → developers.google.com/community/experts

    Watch more on YouTube → https://goo.gle/GDE

    Follow us on Twitter and LinkedIn

    December 20th 2021, 1:09 pm

    MAD Skills Gradle and AGP build APIs Wrap Up!

    Android Developers Blog

    Posted by Murat Yener, Android Developer Advocate


    That’s a wrap! We’ve just finished a new MAD skills series on Gradle and Android Gradle plugin build APIs. In this series we shifted gears and took a look at how you can extend your build by using Gradle and brand new Android Gradle plugin APIs.

    We covered how Gradle works, how you can configure the Android Gradle plugin, and learned which APIs to use to help customize your builds and keep your builds fast and efficient. If you missed this series or some of the episodes, here is a quick recap of what to expect.

    Episode 1: Configure your build - Intro to Gradle and AGP

    Gradle is a general purpose build tool which can build specific project types by using plugins. Plugins introduce a way to configure the build and decide which tasks are needed to build that project. Gradle configures and executes these tasks in different phases. Understanding how the build phases work and how to configure the Android Gradle plugin can help you customize your build according to your project’s needs and keep build times efficient.

    You can check out the following video or if you prefer, read the article.


    Episode 2: How to write a plugin

    Extending your build by writing your own plugin gives you a way to customize your build even further! Starting with version 7.0, Android Gradle Plugin now offers stable extension points for manipulating variant configuration and the produced build artifacts. In this episode we started with writing a custom task and used the new Variant API to initialize and modify properties of Variants.

    You can find the same content in article form.


    Episode 3: Taking your plugin to the next step

    As we saw in previous episodes, keeping your config phase fast and resolving values lazily can help keep your builds efficient. Providers and Properties let you pass inputs and receive outputs from Gradle tasks lazily. In this episode we also take a look at the new Artifacts API to access and modify the app manifest.

    Check out the article or the following video.


    Episode 4: Gradle and AGP Build APIs Community Tip

    In the last episode in the series, we feature Alex Saveau, who maintains the Gradle Play Publisher and Version Orchestrator plugins. Alex shares a tip on using modern AGP and Gradle APIs to manipulate Android build artifacts.

    To learn more, check out the following video.


    Episode 6: Live Q&A

    Finally, we wrapped up this series with a live Q&A session where we answered your questions. If you missed the Q&A, make sure to check out the following recording.


    If you are interested to learn more, make sure to check out the resources and the Gradle recipes repo linked below! See you in the next MAD Skills series.

    Recipes repo: https://github.com/android/gradle-recipes

    Extend the Android Gradle plugin: https://developer.android.com/studio/build/extend-agp

    AGP Roadmap: https://goo.gle/3EuNYXz

    December 16th 2021, 2:48 pm

    Announcing Jetpack Glance Alpha for app widgets

    Android Developers Blog

    Posted by Marcel Pintó Biescas, Developer Relations Engineer, @marxallski

    Android 12 revamps a key feature for many Android users, App Widgets, making them more useful, beautiful, and discoverable (84% use at least 1 widget). Today, we’re making it even easier to build them by releasing the first alpha of Jetpack Glance, a new framework built on top of the Jetpack Compose runtime designed to make it faster and easier to build app widgets for the home screen and other surfaces.

    We’d love you to give it a try and share your feedback!

    Glance offers similar modern, declarative Kotlin APIs that you are used to with Jetpack Compose, helping you build beautiful, responsive app widgets with way less code.

    Glance “Hello World” widget sample


    class GreetingsWidget(private val name: String): GlanceAppWidget() {
        @Composable
        override fun Content() {
            Text(text = "Hello $name")
        }
    }
    
    class GreetingsWidgetReceiver : GlanceAppWidgetReceiver() {
    
        override val glanceAppWidget = GreetingsWidget("Glance")
    }
    

    How it works

    Glance provides a base-set of Composables to help build “glanceable” experiences. Starting today with app widget components but with more coming. Using the Jetpack Compose runtime, Glance can translate Composables into actual RemoteViews, and display them in an app widget.


    Diagram: Glance structure


    This means that Glance requires Compose to be enabled and depends on Runtime, Graphics, and Unit UI Compose layers, but it’s not directly interoperable with other existing Jetpack Compose UI elements. However, state or any other logic within your app can be shared to create a glanceable UI.


    What's in Alpha

    This initial release introduces the main APIs to enable you to build app widgets in addition to providing interoperability with existing RemoteViews.

    Here’s an overview of what the library offers, at a glance:

    We are working on bringing even more functionality with default theming, further Android Studio support, and more. Stay tuned for new releases.



    Get started with Glance

    Check out the sample on GitHub for a quick start. Glance works with the latest stable Android Studio, although since Glance relies on Compose Runtime, follow the steps on the Jetpack Compose docs to set it up first.

    In addition, for a more advanced showcase, checkout the demos in the AndroidX repository.


    ResponsiveAppWidget.kt demo

    The Alpha version is your opportunity to influence the APIs, so please share your feedback and let us know your experience!

    Happy Composing with Glance!

    December 15th 2021, 1:02 pm

    Launching Notes from Google Play | A year of evolution

    Android Developers Blog

    Posted by Purnima Kochikar, Vice President, Google Play Partnerships


    Hello there,

    Today we are kicking off Notes from Google Play, a new series where several times a year we celebrate your creativity and impact, and share key insights and best practices, to inspire you to be bolder, go further, and build even more innovative apps and games.

    Purnima Kochikar addresses our goals behind the 'Notes from Google Play' series.

    2021 continued to be a year of challenges and uncertainty, and you inspired us by your ability to turn obstacles into useful and joyful apps and services. Your apps helped over 2.5 billion people using Android devices learn, connect, relax, exercise, laugh, have fun, and so much more. As a result, developers making over 1M USD per month with Google Play’s billing or having 10 million monthly active users grew by 30% this year.

    In this inaugural edition of Notes from Google Play we celebrate your creativity and resilience. A developer who exemplified these traits and deeply moved and inspired me and my team is Mohammed Kamara. Thank you, Mo for channeling deep personal loss to create a better world for women of color, providing affordable and customized healthcare through the app. We are humbled to play a small part in making your vision for InovCares a reality.


    Mohamed Kamara, CEO and Founder of InovCares, tells the story behind his groundbreaking healthcare app.


    A special shout out also goes to the winners of the Best of Google Play Awards and the Indie Games Festival. All of you inspire us to continue to work hard to evolve Play and Android to enable you to build great apps and successful businesses.

    This focus on you and your success resulted in many impactful developments in 2021, including the evolution of our business model and new product features and tools. At Google Play we are focused on two key goals - helping you build and grow sustainable global businesses and investing in Android and Play platform features, tools, and ecosystems to enable you to build innovative apps and games.


    illustration of people standing on a bar graph

    Supporting your business growth

    As the mobile industry has matured, you have created app businesses that have varying needs, so we’ve designed multiple programs to support you. For example, we created the Play Media Experience Program to encourage Video, Audio, and Books developers to build great cross-device experiences, while enabling apps that support authors & musicians by discounting the service fee as low as 10%. A few months ago we announced a new fee structure to support the evolution of the subscriptions business model, allowing all subscription app developers to benefit from lower fees. Due to the innovative changes we announced this year, I’m thrilled to share that 99% of developers globally now qualify for a service fee of 15% or less. Thank you for your thoughtful feedback while we were designing these programs and your vocal support since the launch of the new fee structure.

    We have also continued to invest in programs to help you reach, retain, and re-engage your users.



    Helping you build high quality apps

    We are committed to empowering you to turn your creative ideas into excellent apps and have created tools and guidelines to help ensure your apps are of high quality. I invite you to pay attention to three key features/guidelines:



    Helping you build user trust and loyalty

    Trust and safety are the cornerstones of sustainable business success and key to user loyalty. This year, we continued to invest in platform features and policies that help you build safer apps and strengthen user trust. We also heard your feedback and have invested in educational tools and resources to help you anticipate and understand the new features and policies. The key highlights this year -





    illustration of people on devices

    Fostering the next generation of developers

    Nothing excites me more than finding and nurturing the next generation of talented developers and building local ecosystems around the world that address local needs. Earlier this year we announced a reduced service fee tier of 15% on the first $1M in annual earnings for all developers, helping us continue to foster innovation on Android/Play.

    It has been truly humbling to see key influencers, stakeholders, and industry and government leaders co-invest with us in this effort. Our most successful developers invested personal time and energy to mentor, coach, and grow Indies through the Indie Games Accelerator. Government leaders partnered with us to support startup ecosystems in countries like Korea and India - the ChangGoo program in Korea has been created in partnership with Ministry of SMEs and Startups (MSS) and the Korea Institute of Startup & Entrepreneurship Development (KISED), whereas the Appscale Academy in India was established in partnership with the MeitY Startup Hub, an initiative of the Ministry of Electronics and Information Technology (MeitY). Thank you all for your commitment to innovation and the app ecosystem.


    Get a snapshot view of Appscale Academy: our growth and development program for startups across India.

    Staying connected

    I have missed seeing you in person over the last two years. The challenges imposed by COVID-19 helped us find new ways to stay connected. Many of you participated in virtual sessions to learn about new market opportunities and engaged in thoughtful online discussions on topics as diverse as Future of Work, Diversity, Equity, and Inclusion, and Growth and Global expansion strategies. Some of you also told us that you are feeling some online event fatigue, so this year we also invested in content that you can consume at your own pace including thought leadership and best practices, and e-learning courses on Play Academy. We even launched our first certificate to help you get the most out of our store listing tools and features.

    Until the next edition, from my team to yours, best wishes for the upcoming year. We hope you will always see Google Play as a partner to help you delight your users, expand your audience, and grow your business.

    Happy Holidays.

    Purnima Kochikar,

    Vice President, Google Play Partnerships

    Make sure you don’t miss future editions by following me / us on Twitter or signing up to our monthly newsletter.

    December 14th 2021, 7:02 pm

    Rebuilding our guide to app architecture

    Android Developers Blog

    Posted by Manuel Vicente Vivo, Developer Relations Engineer, @manuelvicnt


    As Android apps grow in size, it's important to design the code with an architecture in place to allow the app to scale, improve quality and robustness, and make it easier to test.

    An app architecture defines the boundaries between parts of the app and the responsibilities each part should have. This favors the separation of concerns principle that enables the aforementioned benefits.

    In response to community demand for up-to-date guidance on app architecture, we're launching a revamped guide to app architecture. This includes best practices and recommended architecture for building robust, high-quality apps. It also provides a page for each layer of the recommended architecture: UI, domain, and data layers. Within them, you'll find deep dives into more complex topics, such as how to handle UI events.

    Each Android app should have at least two layers:

    You can add an additional layer called the domain layer to simplify and reuse the interactions between the UI and data layers.

    General diagram of a typical app architecture. The UI layer gets the application data from the optional domain layer, or the data layer, that exposes application data.


    We have created a learning pathway to help you consume this content in order and in a trackable way. Don't miss the chance to learn all of this and get a badge as recognition!


    Is this for you?

    If you’re a beginner, you should begin by understanding the benefits of having an app architecture and then follow these recommendations as a first approach to the topic. Intermediate and advanced developers can follow these recommendations and customize them to their needs. In fact, our research suggests that most professional developers are already using these best practices.

    You might be wondering if you should update your existing architecture to follow this recommendation, and the answer is no… or wait… it's up to you. If your current architecture works for your team, you might want to stick with it. But you might also find patterns in our guides you can benefit from and incorporate into your app.

    We’re not done yet

    This is the first batch of documents we're releasing, with more to come in 2022. Help us make the guidance better! If you have any feedback on the current recommendations or if you want to see other architecture-related topics in them, let us know in our docs issue tracker.

    December 14th 2021, 7:02 pm

    Android Developer Relations is hiring

    Android Developers Blog

    Posted by Maru Ahues Bouza, Director, Android Developer Relations

    Apps are essential to making Android a platform people love - whether it’s on their phones, cars, TVs, or watches. As a popular mobile platform, Android is thriving with 1 in 4 developers - worldwide - building for Android according to Stack Overflow’s 2020 developer survey.

    In Android Developer Relations (or Android DevRel for short), our mission is to help developers be successful on Android by helping them build great apps with the latest Android and Play features, empower anyone to get a great career as an Android developer, and advocate for developers as Android and Play evolve. It’s truly rewarding because we get to see the future of apps - every day - and help our fellow developers achieve great things. With such a big mission, we’re hiring engineers, technical writers, and program managers - and if this gets you inspired, we’d love to talk! Check out the links at the end of this blog and apply to join our team.

    But first, what does Android DevRel actually do? Our team works with external developers, writes code, creates content, launches careers, grows communities, runs conferences - and more. Read on to learn more!


    Building better products with developers

    We work with product and engineering teams in Android and Play to define go-to-market strategies for new developer products and run Early Access Programs (EAPs) with the goal of building better products for all developers. Through these EAPs, we do deep technical engineering work with the most influential developers to help them integrate and deliver feedback to validate that the products we’re building are ready to work at scale.

    We work with these developers to build high quality apps across multiple screens, to ensure better user experiences on Android and we share their success stories to show how integrating with these products will help developers be more successful in the Android ecosystem, and to help inspire other developers to adopt.


    Code

    A big part of how we help developers is through code — be it tutorials, videos, blogs, or entire multi-unit educational courses. We produce everything from simple code snippets that explain how to perform a specific function, to sample apps like Jet* or the Google I/O app that demonstrates how everything comes together. In the process of creating sample code, you may be the first developer to ever build something with a new API! We call this being the “zeroth customer” and it’s an important role where you can directly influence the direction of a product through feedback (and yes, some trial and error!)


    Content

    In helping developers, we end up learning best practices and producing a ton of content - documentation, tutorials, screencasts, talks, blog posts, podcasts, and more. There is an art to breaking down complex subjects into a learning path - to help both beginner and advanced developers alike - and it is something we do every day. From introducing new concepts, to distilling best practices, to thoroughly documenting the functionality of a new API - our role is to help developers understand and thrive on Android. While our output is the content itself, it’s important to note that engineering is at the heart of this. In order to teach developers how to use these technologies, we first have to understand them deeply ourselves.

    Teach millions of developers through learning materials


    Community

    Many of us were Android developers before we joined DevRel, and one of the most gratifying aspects of our role is meeting and connecting with developers around the world. We engage with Google Developer Experts for Android (GDEs), Google Developer Groups, and of course individual community members on a regular basis through events, social media, and Slack. We love to hear what people are working on, lend a hand where we can, and create connections across the community so people can learn from each other.


    Conferences

    One of the places the community comes together is at conferences - and Android has a lot of them! While you can pick up a skill or learn about the latest software design pattern, people always say the most valuable thing they get from conferences is connecting with fellow developers. Meeting people in person (side note: can’t wait until we can do that again!) is such an important part of building a network of people you can count on for help - whether you get stuck in your next project, or are looking for career advice. While many of these conferences are run by the community themselves, we participate in these events around the world and look forward to engaging with this community wherever they are. We also organize the Android Developer Summit and the Android track at Google I/O.


    Careers

    Apps connect you to the people in your life, help you do things more easily, or even help you learn new skills. In the past year many of us have had to find new ways of doing things, and this has seen us reach for apps more often than ever before, while growing the demand for app developers. In fact, developer jobs are growing 5.5x faster than other professions (U.S. Bureau of Labor Statistics). In Android DevRel, it is our privilege to build curriculum and work with universities and student groups around the world to skill-up the next generation of developers.

    Training the next generation of Android developers


    Come join us

    Want to join Android DevRel? Take a look at some of the roles below. Google often uses a single listing to make it easier for people to apply - so if it doesn’t say Android DevRel in the title of the role just tell them you’re interested in joining our team in your cover letter.

    Android DevRel works with developers everywhere in the world, we want our team to represent all the developers we work with and we believe that diverse teams build better products that work for everyone. If you’re from an underrepresented group in tech, please apply even if you don’t think you match all the requirements and read what we’re doing to build a more diverse and inclusive Google.


    Read on to see the roles that are available today:

    Beta 1 Update for 12L feature drop!

    Android Developers Blog

    Posted by Maru Ahues Bouza, Director, Android Developer Relations

    At Android Dev Summit in October we highlighted the growth we’re seeing in large screen devices like tablets, foldables, and Chromebooks. We talked about how we’re making it easier to build great app experiences for these devices through new Jetpack APIs, tools, and guidance. We also introduced a developer preview of 12L, a feature drop for Android 12 that’s purpose-built for large screens.

    With 12L, we’ve optimized and polished the system UI for large screens, made multitasking more powerful and intuitive, and improved compatibility support so apps look better right out of the box. 12L also includes a handful of new APIs for developers, such as for spatial audio and improved drag-and-drop for accessibility.

    Today we’re releasing the first Beta of 12L for your testing and feedback as you get your apps ready for the feature drop coming early next year. You can try the new large screens features by setting up an Android emulator in Android Studio. 12L is for phones, too, and you can now enroll here to get 12L Beta 1 on supported Pixel devices. If you are still enrolled in the Android 12 Beta program, you’ll get the 12L update automatically. Through a partnership with Lenovo, you can also try 12L on the Lenovo Tab P12 Pro tablet, see the Lenovo site for details on available builds and support.

    What’s in 12L Beta 1?

    Today’s Beta 1 build includes improvements to functionality and user experience as well as the latest bug fixes, optimizations, and the December 2021 security patches. For developers, we’ve finalized the APIs early, so Beta 1 also includes the official 12L APIs (API level 32), updated build tools, and system images for testing. These give you everything you need to test your apps with the 12L features.

    With 12L, we’ve focused on refining the UI on large screen devices, across notifications, quick settings, lockscreen, overview, home screen, and more. For example, on screens above 600dp, the notification shade, lockscreen, and other system surfaces use a new two-column layout to take advantage of the screen area.


    Two-column layouts show more and are easier to use


    Multitasking is also more powerful and intuitive - 12L includes a new taskbar on large screens that lets users instantly switch to favorite apps on the fly or drag-and-drop apps into split-screen mode. Remember, on Android 12 and later, users can launch any app into split screen mode, regardless whether the app is resizable. Make sure to test your apps in split screen mode!


    Drag and drop apps into split-screen mode


    Last, we’ve improved compatibility mode with visual and stability improvements to offer a better letterboxing experience for users and help apps look better by default. If your app is not yet optimized for large screens, make sure to test your app with the new letterboxing.

    More APIs and tools to help you build for large screens

    As you optimize your apps for large screens, here are some of our latest APIs and tools that can make it easier to build a great experience for users.

    Make sure to check out all of our large screens developer resources for details on these and other APIs and tools.

    Get started with 12L on a device!

    With the 12L feature drop coming to devices early next year, now is a great time to optimize your apps for large screens. For developers, we highly recommend checking out how your apps work in split screen mode with windows of various sizes. If you haven’t optimized your app yet, see how it looks in different orientations and try the new compatibility mode changes if they apply.

    The easiest way to get started with the large screen features is using the Android Emulator in a foldable or tablet configuration - see the complete setup instructions here.

    Now you can also flash 12L onto a large screen device. Through a partnership with Lenovo, you can try 12L preview builds on the Lenovo Tab P12 Pro. Currently Lenovo is offering a Developer Preview 1 build, with updates coming in the weeks ahead. Visit Lenovo's 12L preview site for complete information on available builds and support.

    12L is coming to phones, too, and although you won’t see the large screen features on smaller screens, we welcome you to try out the latest improvements in this feature drop. Just enroll your supported Pixel device here to get the latest 12L Beta update over-the-air. If you are still enrolled in the Android 12 Beta program, you’ll automatically receive the update 12L.

    For details on 12L and the release timeline, visit the 12L developer site. You can report issues and requests here, and as always, we appreciate your feedback!

    December 8th 2021, 1:42 pm

    Develop watch faces with the stable Jetpack Watch Face library

    Android Developers Blog

    Posted by Alex Vanyo, Developer Relations Engineer

    Watch faces are one of the most visible ways that people express themselves on their smartwatches, and they’re one of the best ways to display your brand to your users.

    Watch Face Studio from Samsung is a great tool for creating watch faces without writing any code. For developers who want more fine-tuned control, we've recently launched the Jetpack Watch Face library written from the ground up in Kotlin.

    The stable release of the Jetpack Watch Face library includes all functionality from the Wearable Support Library and many new features that make it easier to support customization on the smartwatch and on the system companion app on mobile, including:


    If you are still using the Wearable Support Library, we strongly encourage migrating to the new Jetpack libraries to take advantage of the new APIs and upcoming features and bug fixes.


    Below is an example of configuring a watch face from the phone with no code written on or for the phone.

    Editing a watch face using the Galaxy Wearable mobile companion app


    If you use the Jetpack Watch Face library to save your watch face configuration options, the values are synced with the mobile companion app. That is, all the cross-device communication is handled for you.

    The mobile app will automatically present those options to the user in a simple, intuitive user interface where they change them to whatever works best for their style. It also includes previews that update in real time.

    Let’s dive into the API with an overview of the most important components for creating a custom watch face!


    WatchFaceService

    A subclass of WatchFaceService forms the entry point of any Jetpack watch face. Implementing a WatchFaceService requires creating 3 objects: A UserStyleSchema, a ComplicationSlotsManager, and a WatchFace:

    Diagram showing the 3 main parts of a WatchFaceService

    These 3 objects are specified by overriding 3 abstract methods from WatchFaceService:

    class CustomWatchFaceService : WatchFaceService() {
    
        /**
         * The specification of settings the watch face supports.
         * This is similar to a database schema.
         */
        override fun createUserStyleSchema(): UserStyleSchema = // ...
    
        /**
         * The complication slot configuration for the watchface.
         */
        override fun createComplicationSlotsManager(
            currentUserStyleRepository: CurrentUserStyleRepository
        ): ComplicationSlotsManager = // ...
    
        /**
         * The watch face itself, which includes the renderer for drawing.
         */ 
        override suspend fun createWatchFace(
            surfaceHolder: SurfaceHolder,
            watchState: WatchState,
            complicationSlotsManager: ComplicationSlotsManager,
            currentUserStyleRepository: CurrentUserStyleRepository
        ): WatchFace = // ...
    
    }

    Let’s take a more detailed look at each one of these in turn, and some of the other classes that the library creates on your behalf.


    UserStyleSchema

    The UserStyleSchema defines the primary information source for a Jetpack watch face. The UserStyleSchema should contain a list of all customization settings available to the user, as well as information about what those options do and what the default option is. These settings can be boolean flags, lists, ranges, and more.

    By providing this schema, the library will automatically keep track of changes to settings by the user, either through the mobile companion app on a connected phone or via changes made on the smartwatch in a custom editor activity.

        override fun createUserStyleSchema(): UserStyleSchema =
            UserStyleSchema(
                listOf(
                    // Allows user to change the color styles of the watch face
                    UserStyleSetting.ListUserStyleSetting(
                        UserStyleSetting.Id(COLOR_STYLE_SETTING),
                        // ...
                    ),
                    // Allows user to toggle on/off the hour pips (dashes around the outer edge of the watch
                    UserStyleSetting.BooleanUserStyleSetting(
                        UserStyleSetting.Id(DRAW_HOUR_PIPS_STYLE_SETTING),
                        // ...
                    ),
                    // Allows user to change the length of the minute hand
                    UserStyleSetting.DoubleRangeUserStyleSetting(
                        UserStyleSetting.Id(WATCH_HAND_LENGTH_STYLE_SETTING),
                        // ...
                    )
                )
            )

    CurrentUserStyleRepository

    The current user style can be observed via the ​​CurrentUserStyleRepository, which is created by the library based on the UserStyleSchema.

    It gives you a UserStyle which is just a Map with keys based on the settings defined in the schema:

    Map<UserStyleSetting, UserStyleSetting.Option>

    As the user’s preferences change, a MutableStateFlow of UserStyle will emit the latest selected options for all of the settings defined in the UserStyleSchema.

    currentUserStyleRepository.userStyle.collect { newUserStyle ->
        // Update configuration based on user style
    }

    CurrentUserStyleRepository

    Complications allow a watch face to display additional information from other apps on the watch, such as events, health data, or the day.

    The ComplicationSlotsManager defines how many complications a watch face supports, and where they are positioned on the screen. To support changing the location or number of complications, the ComplicationSlotsManager also uses the ​​CurrentUserStyleRepository.

        override fun createComplicationSlotsManager(
            currentUserStyleRepository: CurrentUserStyleRepository
        ): ComplicationSlotsManager {
            val defaultCanvasComplicationFactory =
                CanvasComplicationFactory { watchState, listener ->
                    // ...
                }
        
            val leftComplicationSlot = ComplicationSlot.createRoundRectComplicationSlotBuilder(
                id = 100,
                canvasComplicationFactory = defaultCanvasComplicationFactory,
                // ...
            )
                .setDefaultDataSourceType(ComplicationType.SHORT_TEXT)
                .build()
        
            val rightComplicationSlot = ComplicationSlot.createRoundRectComplicationSlotBuilder(
                id = 101,
                canvasComplicationFactory = defaultCanvasComplicationFactory,
                // ...
            )
                .setDefaultDataSourceType(ComplicationType.SHORT_TEXT)
                .build()
    
            return ComplicationSlotsManager(
                listOf(leftComplicationSlot, rightComplicationSlot),
                currentUserStyleRepository
            )
        }

    WatchFace

    The WatchFace describes the type of watch face and how to draw it.

    A WatchFace can be specified as digital or analog and can optionally have a tap listener for when the user taps on the watch face.

    Most importantly, a WatchFace specifies a Renderer, which actually renders the watch face:

        override suspend fun createWatchFace(
            surfaceHolder: SurfaceHolder,
            watchState: WatchState,
            complicationSlotsManager: ComplicationSlotsManager,
            currentUserStyleRepository: CurrentUserStyleRepository
        ): WatchFace = WatchFace(
            watchFaceType = WatchFaceType.ANALOG,
            renderer = // ...
        )

    Renderer

    The prettiest part of a watch face! Every watch face will create a custom subclass of a renderer that implements everything needed to actually draw the watch face to a canvas.

    The renderer is in charge of combining the UserStyle (the map from ​​CurrentUserStyleRepository), the complication information from ComplicationSlotsManager, the current time, and other state information to render the watch face.

    class CustomCanvasRenderer(
        private val context: Context,
        surfaceHolder: SurfaceHolder,
        watchState: WatchState,
        private val complicationSlotsManager: ComplicationSlotsManager,
        currentUserStyleRepository: CurrentUserStyleRepository,
        canvasType: Int
    ) : Renderer.CanvasRenderer(
        surfaceHolder = surfaceHolder,
        currentUserStyleRepository = currentUserStyleRepository,
        watchState = watchState,
        canvasType = canvasType,
        interactiveDrawModeUpdateDelayMillis = 16L
    ) {
        override fun render(canvas: Canvas, bounds: Rect, zonedDateTime: ZonedDateTime) {
            // Draw into the canvas!
        }
    
        override fun renderHighlightLayer(canvas: Canvas, bounds: Rect, zonedDateTime: ZonedDateTime) {
            // Draw into the canvas!
        }
    }

    EditorSession

    In addition to the system WYSIWYG editor on the phone, we strongly encourage supporting configuration on the smartwatch to allow the user to customize their watch face without requiring a companion device.

    To support this, a watch face can provide a configuration Activity and allow the user to change settings using an EditorSession returned from EditorSession.createOnWatchEditorSession. As the user makes changes, calling EditorSession.renderWatchFaceToBitmap provides a live preview of the watch face in the editor Activity.

    To see how the whole puzzle fits together to tell the time, check out the watchface sample on GitHub. To learn more about developing for Wear OS, check out the developer website.

    December 1st 2021, 4:20 pm

    #AndroidDevSummit ‘21: 3 things to know for Modern Android Development

    Android Developers Blog

    Posted by Florina Muntenescu, Developer Relations Engineer

    From updates to Jetpack libraries, more guidance on using Kotlin coroutines and Flow in your android app and new versions of Android Studio, here are the top 3 things you should know:

    #1 Jetpack feature updates

    We’ve been working to add the features you’ve been asking us for in a lot of Jetpack libraries, here are a few highlights:

    But if you want to deep dive, you should really check out: WorkManager - back to the foreground - where you’ll learn all about the latest APIs and features.

    #2 Kotlin and Flow usage

    Coroutines are the recommended solution for asynchronous work and Kotlin Flow is the obvious choice for managing streams of data in Android apps. To learn how to use Flows in practice, check out this Android Dev Summit session:

    The talk also covers important things like how to stop collecting from the UI when it’s not needed, using the newly stable lifecycle-aware coroutines APIs: repeatOnLifecycle and flowWithLifecycle.

    #3 Android Studio and LiveEdit for Jetpack Compose

    In the Android Studio world, Arctic Fox is stable, Bumblebee is in Beta and Chipmunk is in Canary, all of them bringing a bunch of new features for Jetpack Compose and Material You, developer productivity and 12L and large screens.

    The What’s new in Android Studio talk is a must see, especially the sneak peek demo of LiveEdit. LiveEdit is a generalization of live editing of literals, where you get to edit more general scenarios than just constants and strings: you can comment out parts of the UI, reorder composable calls and see the result on the phone in milliseconds. But, we want to make sure that this feature is really right before we include it in Android Studio, so stay tuned for it in the next releases.

    You want more? Then sit back, relax and watch the full Modern Android Development playlist.

    November 19th 2021, 10:29 am

    #Android Developer Summit: 3 things to know for Large Screens on Android!

    Android Developers Blog

    Posted by Clara Bayarri, Engineering Manager

    This year’s Android Dev Summit brought a lot of updates related to Large Screen development for Android, the 12L feature drop on foldables and tablets - a set of features optimising Android 12 for large screens, better developer tools and updates to Google Play purpose-built for large screens. Here are the top 3 things you should know:


    #1: The 12L feature drop for large screens

    12L makes Android 12 even better on Large Screen devices, with a bunch of new refined UI across surfaces such as notifications and the lock screen. The most important announcements for developers included

    To find out more about what’s new, check out the What’s new for large screens and foldables video and developer.android.com/12L .


    #2: Making it easier to build for Large Screens

    Android has supported Large Screens for a long time, but we announced several new tools to help you scale up your app’s UI to larger form factors.

    Learn more about all these items in the Building Android UIs for Any Screen Size and Design beautiful apps on foldables and large screens talks, and check out the latest Large Screen guide and Build adaptive layouts in Compose guide for more. You can also check out Best practices for video apps on foldable devices and Spotify Across Screens for examples on how apps are making this journey.


    #3: Google Play updates for Large Screens

    To help users find the best apps on tablets, foldables and ChromeOS devices, we’ve got new changes in Play to recommend apps optimized for the large screen. This includes new checks to assess app quality, so we can feature large screen optimized apps and update search rankings to show the best possible apps for these devices. We will also be introducing large screen specific app ratings, so users will be able to rate how your app works on their large screen devices.

    You can find all of this year’s Android Dev Summit talks related to Large Screens in this playlist, and the full list of announcements for Large Screens in our blog post.

    November 17th 2021, 12:26 pm

    Improving App Startup: Lessons from the Facebook App

    Android Developers Blog

    Posted by the Google and Facebook teams. Authored by Kateryna Semenova from the Google Android team and Tim Trueman, Steven Harris, Subramanian Ramaswamy from the Facebook team.

    Introduction

    Improving app startup time is not a trivial task and requires a deep understanding of things that affect it. This year, the Google Android team and the Facebook app team have been working together on metrics and sharing approaches to improve app startup. Google Android’s public documentation has a lot of information on app startup optimization. In addition to that we want to share how it applies to the Facebook app and what helped them to improve app startup.

    There are now more than 2.9 billion people using Facebook every month. Facebook helps give people the power to build community and bring the world closer together. It is a place for people to share life’s moments, discover and discuss what’s happening, connect and nurture relationships, and help work together to build economic opportunity.

    Facebook app developers are committed to ensure that people have the best possible experience and that the app works seamlessly on every device, in any country, and within different network conditions. Working together, the Google Android team and Facebook team aligned on metrics definition for app startup and best practices and shared them in this article.


    Where to start

    Start by measuring your startup times. This will let you know how good your user’s startup experience is, track any regressions, as well as how much to invest on improving it. At the end of the day, your startup times need to be tied to user satisfaction or engagement or user-base growth in order to prioritize your investments.

    Android defines two metrics to measure app startup times: Time-To-Full-Display (TTFD) and Time-To-Initial-Display (TTID). While you can further split it into cold/warm startup times, this post will not disambiguate between them - Facebook's approach is to measure and optimize the startup time that’s experienced across all users interacting with the app (some of them will be cold, some warm).


    Time-To-Full-Display

    TTFD captures the time when your app has completed rendering and is ready for user interaction and consumption, perhaps including content from disk or the network. This can take a while on slow networks and can depend on what surface your users land on. Thus, it may also be helpful to show something right away and let users see progress is still happening, which brings us to TTID…


    Time-To-Initial-Display

    TTID captures the time for your app to draw its background, navigation, any fast-loading local content, placeholders for slower local content or content coming from the network. TTID should be when users can navigate around and get to where they want to go.

    Don’t change too much: One thing to watch out for is visually shifting your app’s content between TTID and TTFD, like showing cached content then snapping it away once network content comes in. This can be jarring and frustrating for users, so make sure your TTID draws enough meaningful content to show users as much as possible of what to expect for TTFD.


    Focus on user success

    Your users are coming to your app for content that might take a while to load, and you want to deliver that content to them as quickly as you can.

    Facebook app developers focus on a metric based on Time To Full Display (TTFD), including all content and images, because that represents the full experience of what users came to the app for. If a network call for content or an image takes a long time or fails, developers want to know so that they can improve the entire start to finish startup experience.


    What’s a good target for TTID and TTFD?

    Facebook’s startup metric is the percentage of app starts that they consider “bad,” which is any start that either has a TTFD longer than 2.5 seconds OR any part of startup that is unsuccessful (e.g. an image fails to load or the app crashes). Facebook focuses on driving this percentage of bad starts down either by improving successful starts that take longer than 2.5 seconds, or by fixing issues causing unsuccessful starts. 2.5 seconds was chosen based on research that showed this was meaningful to Facebook users (this also matches the Largest Contentful Paint (LCP) metric in the Web Vitals recommendations for web sites).

    Including the full experience, especially of any network calls to fetch recent content, can make your TTFD startup metrics seem really slow compared to TTID. This is actually a good thing! It represents the real experience people have with your app. Improvements you make to this may drive increased usage and perception of your app’s performance for your users like it has at Facebook.

    Measuring TTFD can be tricky depending on your app. If it’s too hard, it’s fine to start with Time To Initial Display (TTID). That may miss the performance of loading some of your content if you have placeholders or images, but it’s good to start somewhere even if it’s just a subset of what your users see interacting with your app every day.


    Instrumenting TTID

    In Android 4.4 (API level 19) and higher, logcat provides a “Displayed” value capturing the time elapsed between launching the process and the completion of drawing the first frame of the corresponding activity on the screen.

    The reported log line looks similar to the following example:

    ActivityManager: Displayed com.android.myexample/.StartupTiming: +3s534ms
    

    Instrumenting TTFD

    To instrument TTFD, call reportFullyDrawn() in your Activity after all your content is on screen. Be sure to include any content that replaces placeholders, as well as any images you render (be sure to count when the image itself is displayed, not just its placeholder). Once you instrument calling reportFullyDrawn(), you can see it in logcat:

    ActivityManager: Fully drawn {package}/.MainActivity: +1s54ms
    

    Recommendations From Facebook App Developers

    Facebook app developers have been optimizing the app for billions of users across a multitude of devices, platforms and countries for many years. This section shares some of the key lessons that Facebook app developers applied to optimize their app startup.


    Recommendations From Google Android Team

    Google Android team’s recommendations to measure and optimize app startup are available in the public docs: App startup time. This section summarizes some of the key points that ties into Facebook’s recommendations above that all Android app developers should consider.


    Recap

    This article captures some key measures of startup and best practices to improve startup experience that helps drive user engagement and adoption for the Facebook Android app. It also shares metrics, libraries and tools recommended by the Google Android team. Any Android app stands to benefit from applying some of the strategies described in the document. Measure and make your app startup delightful and fast for your users!

    November 16th 2021, 1:42 pm

    #AndroidDevSummit: Jetpack Compose now with Material You

    Android Developers Blog

    Posted by Nick Butcher Developer Relations Engineer


    The Android Dev Summit last month brought a number of exciting updates to Jetpack Compose, including that Material You, Google's new design language, is now available in Compose. In case you missed it, here's a recap of all the announcements.


    New Releases: Jetpack Compose 1.1 beta and compose-material3

    We released Jetpack Compose 1.1 beta. This means that new APIs in 1.1 are now stable, offering new functionality and performance improvements. 1.1 includes new features like improved focus handling & touch target sizing or `ImageVector` caching and support for Android 12 stretch overscroll. Compose 1.1 also graduates a number of previously experimental APIs to stable and supports newer versions of Kotlin. We've already updated our samples, codelabs and Accompanist library to work with Compose 1.1.

    We released compose-material3. This is a brand new artifact for building Material You UIs with Jetpack Compose. It offers updated components and color system, including support for dynamic color, creating a personalized color palette from a user's wallpaper. This is our first alpha so we welcome your feedback as we continue to add features and iterate on the APIs. Check out the new m3.material.io website to learn more about Material Design 3 and find tools to help you design & build with dynamic color, like the Material Theme Builder.



    More Guidance & Documentation for Jetpack Compose

    We released a ton of talks about Jetpack Compose, providing deep dives into layout, animation and state, showed how to use Compose across Wear OS, homescreen widgets and Large Screens and held 3 code-alongs; live coding your first Compose app, migrating an existing app or using compose on Wear OS. Finally we held a panel discussion, answering your burning questions about Jetpack Compose and Material.

    We also expanded the Compose documentation, including new guides on the Phases of Jetpack Compose, Building Adaptive Layouts and expanded theming guidance including guidance for Material 3.


    Tooling updates in Android Studio Bumblebee

    At ADS, Android Studio Bumblebee entered Beta, bringing richer support for Jetpack Compose including:

    Android Studio Chipmunk canaries also introduced a new template for Compose (and View based) Material 3 applications.


    Handoff

    Lastly, we gave a sneak peak of some new tooling for design handoff, enabling you to export components designed in Figma to generate idiomatic Jetpack Compose code. You can iterate on the designs and pull in new changes, and safely edit the generated code. We're looking for a small group of teams to work directly with, so go sign up.

    Jetpack Compose is stable and ready for production. We’ve been thrilled to see tens of thousands of apps start using Jetpack Compose in production and we continue to build our roadmap of features to enable you to use Compose to create excellent apps, across devices.

    November 10th 2021, 2:09 pm
    Get it on Google Play تحميل تطبيق نبأ للآندرويد مجانا