Source linked

Android 17 ofrece resizabilidad y aplicaciones para la IA en dispositivos

android-developers.googleblog.com@systems_wire3 hours ago·Developer Tools·2 comments

Android 17 elimina la exclusión de la orientación y la redimensionabilidad en pantallas grandes, introduce AppFunctions para agentes de IA y aplica límites de memoria estrictos.

androidandroid 17googlejetpack composeappfunctionsadaptive design

Starting with Android 17, you can no longer lock your app to portrait on any large-screen device. The system will ignore screenOrientation, setRequestedOrientation(), resizeableActivity=false, and aspect ratio constraints on displays wider than 600dp. Only games (by Play Store category) are exempt.

Mandatory Resizability and the End of screenOrientation

Over 580 million large-screen devices are in users' hands. With Googlebooks -- the ChromeOS successor built on the Android stack -- coming, Google shifted from recommendation to mandate. Targeting API level 37 means your app must handle any window size, free-form windowing, and the user's preferred posture. No opt-out, no exceptions.

Three new multitasking primitives demand even more flexibility: App Bubbles (any app can become a floating bubble), the Bubble Bar for organizing them on foldables and tablets, and desktop interactive PiP that keeps windows fully interactive while always-on-top. Activity recreation also changes: configuration changes for keyboard, navigation, touchscreen, and color mode no longer restart activities by default. You must explicitly opt-in with android:recreateOnConfigChanges.

AppFunctions: Your App as an AI Agent Tool

Android 17 expands AppFunctions, a platform API and Jetpack library that turns your app's capabilities into orchestratable tools for Android MCP -- the on-device equivalent of the Model Context Protocol. AI agents like Gemini can discover and execute these functions with direct access to your app's local state. Adding an AppFunction is as simple as annotating a Kotlin class with @AppFunction and writing KDoc comments.

A new agent skill analyzes your app's workflows and auto-generates the Kotlin code and KDocs optimized for LLM tool-calling. Testing is supported via ADB commands and a test agent app. Private preview for Gemini integration is live; join the early access program at goo.gle/eap-af.

Strict Memory Limits and Lock-Free MessageQueue

Memory usage is the silent performance killer. Android 17 now enforces per-process memory limits based on device RAM, abruptly terminating processes that exceed them. Get MemoryLimiter:AnonSwap from ApplicationExitInfo.getDescription() when it happens. Tools to survive: R8 optimizer in full mode with the new configuration analyzer, LeakCanary in Android Studio Panda, and on-device anomaly detection via TRIGGER_TYPE_ANOMALY to auto-capture heap dumps.

Generational garbage collection in ART separates short-lived objects from long-lived ones, running frequent young-generation sweeps instead of full-heap scans. Testing shows reduced GC interference and lower maximum resident set size. And the core android.os.MessageQueue now uses a lock-free architecture for apps targeting SDK 37, reducing missed frames and improving startup time -- but it breaks reflection on private fields. Use the new peekWhen and poll APIs in TestLooperManager instead.

Privacy, PQC, and Smarter Native Code

Android 17 ships with a system-level contact picker (ACTION_PICK_CONTACTS) that grants temporary access to specific fields only, eliminating the need for READ_CONTACTS. A system-rendered location button gives session-only precise location. The EyeDropper API (ACTION_OPEN_EYE_DROPPER) lets users pick any pixel color without screen capture permissions.

Local network access now requires the ACCESS_LOCAL_NETWORK runtime permission or a privacy-preserving device picker. SMS OTP messages are delayed by three hours for apps targeting SDK 37 (unless they're the default SMS app or an assistant). Android 17 also introduces ML-DSA quantum-safe key generation in secure hardware and hybrid APK signing (v3.2 scheme) combining classical and ML-DSA signatures.

Safer Dynamic Code Loading extends to native libraries: all .so files loaded via System.load() must be read-only or the system throws UnsatisfiedLinkError. And when entering passwords with a physical keyboard, the last typed character is no longer shown by default.

What This Changes Next

Android 17 marks the transition from an operating system to an intelligence system, but the immediate pain point for most developers is mandatory adaptive design. If you haven't migrated to Jetpack Compose yet, now is the time: all new APIs, libraries, and tools are Compose-first, and legacy android.widget components plus Fragments, RecyclerView, and ViewPager are in maintenance mode. Google's AI-driven XML to Compose migration skill can automate the conversion. The developer previews are over; the new rules are live on Pixel devices and incoming to partners from Honor to Xiaomi. Update your libraries, test on a large-screen emulator, and make sure your app survives the resize.


Source: Android 17 is here
Domain: android-developers.googleblog.com

Read original source ->

External source stays available while the OJO article and comment thread stay local.

Comments load interactively on the live page.