Android Developers Blog Note

Android Developers Blog

The Android Developers blog is a platform maintained by Google to provide updates, insights, and guides for Android app developers. It publishes regular posts on various topics, including new features in Android, updates to the Android developer tools, developer success stories, and tips on developer best practices. The blog is targeted towards developers working on Android apps and aims to help them optimize their apps for the Android platform. It also encourages developers to share their experiences, ideas, and achievements in app development.

Thread Of Notes

Google is introducing a Linux terminal on Googlebooks, designed to empower users with access to AI workflows, regardless of their technical expertise. This new feature comes pre-installed with essential tooling to facilitate immediate use. The terminal serves as an entry point for agentic development, allowing AI agents to perform tasks like installing software, writing files, and automating processes based on natural language prompts.Security is a core principle, with the terminal operating within an isolated Linux virtual machine (VM) sandbox, protecting the host operating system and user files. Users can grant administrator privileges to AI tools safely, as all operations are contained within the VM. Explicit user permission is required to mount directories, and a one-click VM reset allows for stress-free experimentation while preserving user files. Linux files are accessible through the Googlebook Files app, integrating seamlessly with synced Android phone content.The Debian Linux environment offers a mature ecosystem with access to standard developer tools such as apt, git, and ssh. The terminal is optimized for rapid prototyping, web development, scripting, and agentic workflows, featuring automatic localhost port forwarding and support for popular runtimes like Node.js and Python. Users can also adjust VM memory for optimal performance.Future plans include Linux GUI app support integrated into the app launcher, enabling users to run graphical Linux applications directly on Googlebooks. The roadmap also features USB passthrough for local device debugging, dynamic memory and storage scaling for more complex tasks, and GPU/NPU hardware acceleration for demanding workloads. VM persistence and separation from the terminal window are also planned to better support long-running agentic processes. Google encourages user feedback and collaboration in shaping this evolving ecosystem.
The Instagram Direct team undertook a significant modernization of their Android UI by adopting Jetpack Compose. This migration went beyond a simple UI rewrite; they aimed to build an AI-native codebase from the ground up. The primary motivation was to address technical debt and engineering overhead associated with a highly optimized legacy View system. Jetpack Compose's declarative nature was chosen to make the UI code more predictable and easier for AI models to understand.A gradual migration strategy was crucial due to the massive scale of Instagram Direct, handling billions of messages daily. Embedding Compose within the existing View hierarchy was considered an interim step, but a full transition was preferred to avoid subtle bugs and performance issues caused by mixing UI paradigms. The team focused on creating clear architectural boundaries to enhance AI's ability to produce high-quality code.By adhering to AI-friendly principles, such as minimizing custom context dependencies and enforcing architectural boundaries, the team ensured better AI results. They developed a structured migration process that involved writing all Compose code with AI assistance, followed by polishing and testing. This approach allowed for rapid development without disrupting ongoing feature releases.The results demonstrated substantial improvements: the UI code was reduced by 50%, engineer-agent exchanges decreased by 32%, and AI execution time dropped by 35%. Token costs for AI tasks also saw a 33% reduction when using Compose compared to Views. The new Compose-based UI showed greater resilience to code risk compared to the legacy View system. This collaborative effort between Meta and Google not only modernized Instagram Direct but also contributed to the broader Android developer ecosystem by optimizing Compose itself. The team successfully met and even exceeded the high-performance bar of the legacy UI, ensuring a seamless user experience.
This article details building intelligent Android apps by creating autonomous, agentic workflows in the cloud. For complex tasks exceeding a single device session, a self-hosted backend executes agents in the background, preserving progress and simplifying credential management. Cloud-hosted agents offer advantages like uninterrupted background execution, sophisticated multi-agent orchestration, and adaptable client UIs. The Jetpacker app's Booking Assistant exemplifies this, coordinating various reservations using the Agent Development Kit (ADK).ADK enables defining agents with Python function tools for database interaction and bookings, streamlining orchestration. The Android app sends itinerary data, the coordinator agent triggers subagents, and results stream back via a session queue. Communication between agents and the Android app is standardized by the AG-UI protocol, handling lifecycle events and message types. A2UI further enhances this by allowing agents to dynamically describe UI components.This dynamic UI rendering avoids app updates for layout changes. The backend sends JSON payloads describing components, which the client interprets. The ADK A2UI integration compiles component schemas into system prompts, guiding the LLM to generate valid A2UI payloads. On Android, the Jetpack Compose A2UI Renderer library natively renders these components based on registered catalog definitions. The booking assistant's specific components are implemented, and the A2uiMessageProcessor handles A2UI messages.
The games category for Android Auto and Android Automotive OS has moved from beta to general availability. Developers can now publish games to these platforms, reaching users during natural downtime in their vehicles. To adapt an existing Android game, developers need to configure their app manifest and ensure the game respects the vehicle's parked state. The manifest must declare the app as a game using the android:appCategory="game" attribute.Support for Android Auto is declared by including the android.intent.category.CAR_LAUNCHER category element in an activity's intent filter. For Android Automotive OS, the android.hardware.automotive element must be included in the manifest. Games are considered parked apps and cannot run while the vehicle is in motion to prevent driver distraction. Developers should ensure their game audio stops when the user starts driving and does not unpause while the vehicle is in motion.Additionally, games must restore their state when relaunched after UX restrictions are active and be responsive without freezing or stuttering. Declaring controller support via the android.hardware.gamepad feature can boost app visibility for users seeking controller-compatible games. Games should also be adaptive to various car screen sizes and aspect ratios, running full screen without letterboxing or pillarboxing.Before submitting to production, developers must opt in to Android Auto and Android Automotive OS form factors in the Google Play Console and test their games against car app quality guidelines. The Desktop Head Unit and Android Automotive OS emulator are available for thorough testing. Games will be reviewed against the car app quality guidelines for the games category before approval.
Android Bench has been updated to version 2.0, introducing long-horizon tasks (LHTs) that mirror complex, multi-day engineering challenges. This upgrade also includes agentic evaluation, starting with agents from corresponding model providers. The previous benchmark focused on simpler, incremental code changes, but the new LHTs include tasks like app dependency upgrades, feature additions, and building apps from scratch. Traditional binary scoring is being replaced with continuous scoring to better reflect the nuanced progress made on these complex tasks. This new scoring method considers functionality, visual fidelity, and avoids regressions, with penalties for instruction deviations. Currently, the highest pass rate for LHTs is around 28%, a significant drop from the prior benchmark's success rate. AI models demonstrate strength in writing new code over refactoring existing code, excelling at established deterministic transformations. However, they struggle with tasks requiring runtime validation, breaking framework changes, or knowledge gaps in unreleased libraries. Porting cross-platform apps to Android remains a particularly challenging area for AI. The evaluation now incorporates commonly used agents to assess performance in agentic workflows. New models like Gemini 3.8 Flash and OpenAI’s GPT-6 have been added to the leaderboard. Android Bench 2.0 aims to provide transparency and empower developers by offering a more robust environment for evaluating AI for Android development. Feedback on the updated methodology and leaderboard is encouraged for future improvements.
Android Studio Quail 4 is now a stable release, offering enhanced AI capabilities for app development. The IDE now bundles curated "Android skills" for AI models, ensuring accurate and up-to-date code assistance for Android-specific tasks. These skills guide large language models through complex workflows, leveraging Google's best practices. Twenty-three pre-loaded skills cover areas like build upgrades, profiling, and UI adaptation. Developers can also create custom skills for specialized team workflows or use them with external command-line tools. Android Studio Quail 4 also integrates Gemma 4, Google's powerful open model, for private, secure, and offline AI coding assistance. This integration requires significant RAM but allows for multi-file refactoring without code leaving the local machine or hitting token limits. User interface enhancements in Quail 4 improve AI interactions with hyperlinked code symbols and real-time notifications for parallel agent tasks. A unified Summary of Changes tab consolidates multi-step task outcomes for easier review. For more advanced AI usage, developers can upgrade their Gemini access through API keys, Google AI plans, or Gemini Enterprise. The Quail series has progressively introduced features like App Quality Insights integration, agentic multitasking, local model support, and simplified planning modes. Android Studio Quail 4 provides users with a more efficient and intelligent development experience, encouraging users to download and provide feedback.
WhatsApp, the world's largest messaging platform, adopted passkeys in 2023, enhancing user security and convenience. This initiative aimed to provide a fast, phishing-resistant authentication method that reduces user friction and protects against account takeovers. Mayank Manuja, an Android Engineer on the WhatsApp Registration and Access team, led this design and implementation. Building for billions of users required navigating diverse network conditions, device capabilities, and digital literacy levels. Passkeys offer a streamlined, one-tap login experience, leveraging public-private key cryptography with biometric or screen lock authentication. This significantly improves sign-in speeds and functions reliably even where traditional SMS OTP delivery is inconsistent.From a developer perspective, the Credential Manager API provided a unified interface, simplifying integration despite numerous edge cases across Android versions and device configurations. WhatsApp and Google collaborated to optimize credential lookup flow, improving latency for new passkey users. They also built a comprehensive error-handling layer to manage device-specific hurdles and ensure graceful degradation when passkey flows couldn't complete. Furthermore, they tackled OS-specific exceptions, implementing platform-level improvements for smoother passkey creation flows.WhatsApp refined the user experience through extensive A/B testing, developing a contextual framework for prompting passkey creation. On the backend, WhatsApp's server implements standard WebAuthn/FIDO2 ceremonies using Erlang and a Rust webauthn-rs library for signature verification. The server architecture orchestrates passkey registration by generating options for the client, verifying attestation, and securely persisting credentials. For authentication, it fetches valid credentials, generates a server-side challenge, and verifies the client's assertion.Advanced architectural considerations included migrating to a multi-passkey per account system, which required engineering a bounded list system to evict older credentials once a limit was reached. This significant structural shift was rolled out gradually through rigorous experimentation to ensure stability. Balancing the credential lifecycle also required careful management of credential validity.
Google Play is introducing new quality requirements to enhance the Android ecosystem for both developers and users. These changes focus on reducing app memory footprint and simplifying secure device migration. New performance thresholds are being established to address hardware constraints and Android's memory limits. These thresholds will cover dynamic memory usage, bitmap memory usage, and code optimization. Developers will have access to new tools within Play Console to identify and resolve memory bloat issues. These tools include memory metrics in Android vitals, crash filters, and DEX code optimization insights. Proactive performance alerts will also be provided when apps exceed new bad behavior thresholds. Enforcement for these memory-related requirements will begin in February 2027. Apps failing to meet these thresholds may experience reduced visibility and publishing capabilities.Additionally, Google Play is introducing a new onboarding standard for secure and seamless device migration. This standard requires apps supporting user sign-in to implement Zero-Tap Sign-In using the Android Restore Credentials API. This feature will automatically restore a user's sign-in state when they switch to a new Android device. The Zero-Tap Sign-In requirement will also take effect in April 2027. While games are currently exempt, guidance for their authentication is expected in 2027. Meeting these upcoming quality requirements is crucial for maintaining optimal visibility and publishing capabilities on Google Play.
Android Automotive Operating System for Software Defined Vehicle leverages virtualization for domain isolation, running multiple logical domains like cluster and infotainment systems in parallel virtual machines. It inherits Android's robust security features, including user ID-based process isolation and a deny-by-default posture enforced by SELinux. AAOS SDV integrates Android's mature vulnerability management infrastructure for identifying, remediating, and disclosing security findings through automated scanning and penetration testing. Software integrity is ensured through authenticated software delivery, utilizing read-only partitions and APEX packages with mandatory signature validation. APEX packages enhance security through immutable storage, cryptographic integrity via dm-verity, strict process isolation, and atomic recovery mechanisms for updates. For platform resilience, AAOS SDV prioritizes memory-safe development, primarily using Rust for new components. It establishes distributed trust with a mesh provisioning architecture that cryptographically verifies communication endpoints, binding network identity to execution state. DICE-based authentication and attestation are used for hardware-grounded identity verification and integrity checks, particularly for securing VM-to-VM communication via TLS. Layered access control, consisting of service-level and VM-level permissions, allows OEMs to balance security with updatability for dynamic vehicle updates. Overall, AAOS SDV offers a secure-by-design approach for software-defined vehicles through multi-layered defenses and hardware-rooted verification.
The Jetpack Compose August 2026 release, version 1.12, is now stable. This update introduces Mesh Gradients and Wide Color Gamut support for richer visuals. It also brings structural layout features like named areas in Grid and seamless integration with Android's Credential Manager. For developers, the compile SDK is updated to API 37, requiring a minimum AGP 9.2.0, and Modifier.onFirstVisible() is now deprecated in favor of Modifier.onVisibilityChanged(). Graphics capabilities are enhanced with MeshGradientPainter for multi-point gradients and full pipeline support for Wide Color Gamut and HDR rendering. The experimental Styles API continues to be built, focusing on type safety and custom design systems. Runtime optimizations include a Keyed SideEffect overload for more performant one-shot effects. Animation features now include DeferredTargetAnimation graduation and new composables for two-stage transitions with manual control and seamless handoff. Text editing gains new APIs for rich-text formatting in BasicTextField and programmatic control over text selection via SelectionState. Credential Manager integration allows text fields to prompt for passkeys and saved credentials. Layout enhancements include named areas in experimental Grid layouts for easier complex 2D arrangement. Performance improvements focus on startup, aiming for Time to Initial Display comparable to Views. Testing upgrades offer improved test synchronization with new APIs like hasPendingWork and runWithoutImplicitWait.
Google Play's top priority is providing a safe online experience and protecting users from harm, and to achieve this, they have been investing in baseline protections and empowering parents with tools to make decisions for their families. Google Play also aims to empower developers to deliver age-appropriate experiences based on their app's content. The Google Play Age Signals API is a privacy-preserving tool that allows parents to share their child's age range with apps, enabling developers to tailor their in-app safety experiences and content. This API is being expanded to all Play developers globally, with the experience first being rolled out to users in Australia and Canada by mid-August, and a full global rollout later this year. The Play Age Signals API puts parents in control, allowing them to share their child's age range directly with apps, and also enables adults to easily share their age when prompted by the app developer. Developers receive the signals they need to tailor their own in-app safety experiences and content for users in an age-appropriate way, and they have the flexibility to choose how they integrate safety signals. The API simplifies safety settings for parents, putting age-sharing controls in one place, directly inside the Google Family Link app, and parents have a choice to share their child's age range, which can be updated or turned off at any time. The Play Age Signals API builds upon a strong foundation of established safety features and strict policies enforced on Google Play, including rigorous safety standards for apps designed for families and built-in tools for developers to manage who can discover their apps. The expansion of the Play Age Signals API globally adds a powerful new tool to Google Play's existing safety suite, helping parents and developers work together to make Google Play a safer and more trustworthy place for families. By providing a reliable signal, Google Play enables developers to retain complete agency to tailor their app's content, features, and settings to match their audience, and this helps to create a safer online experience for all users.
The Android team has been working on optimizing the performance of coroutines in Android apps, particularly those using Kotlin. The kotlinx.atomicfu library, which is used by kotlinx.coroutines, was found to be a bottleneck due to its use of AtomicReferenceFieldUpdater, which has a significant overhead due to reflection checks. To address this issue, the R8 compiler has been updated to optimize most AtomicFieldUpdater calls into Unsafe variants, resulting in a 2x to 4x performance improvement. This optimization is available in AGP 9.2.0 and later versions, and it has a significant impact on the performance of Jetpack Compose, which uses coroutines extensively. The optimization works by replacing AtomicFieldUpdater calls with calls to Unsafe, which eliminates the need for reflection checks. The R8 compiler can optimize these calls statically, resulting in a significant performance improvement. The optimization has been tested and verified through benchmarks, which show a 2x improvement in coroutine performance. Additionally, the ART team is working on implementing similar optimizations natively at the VM level, which will provide further performance improvements. The optimization is available by default when using AGP 9.2.0 or later, and it can also be used directly with R8 9.2.0. The performance improvement is significant, with some benchmarks showing a 2x improvement in coroutine performance. Overall, the optimization is an important step in improving the performance of Android apps that use coroutines and Kotlin. The optimization has been successfully tested and implemented, and it is now available for use in Android apps. The Android team continues to work on optimizing the performance of Android apps, and this optimization is an important part of those efforts.