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.