Android 17 Developer Preview: Every New API Explained

Android 17 Developer Preview: Every New API Explained

Android 17's developer preview cycle has been running since February 2026, with the final API level expected in the August stable release. The preview is feature-complete enough that developers can begin implementing and testing against new APIs now. Android 17 is not a radical architecture change — there's no new graphics pipeline or threading model overhaul — but it's a substantive update with changes across AI integration, health data, media, security, and the increasingly important large screen/foldable form factor story.

The AICore System Service and Gemini Nano 2

The biggest new API surface in Android 17 is the AICore system service, which provides managed access to Gemini Nano 2 running on-device. This replaces the ad-hoc download-on-demand model from Android 14-16's experimental AI API.

The key classes developers interact with:

InferenceSession is the primary entry point. You create a session with a SessionConfig that specifies the capability you need (TEXT_GENERATION, SUMMARIZATION, or LANGUAGE_TRANSLATION), and the system allocates model resources appropriately. Sessions are pooled across apps — the Gemini Nano 2 model is loaded once and shared, reducing memory overhead significantly compared to per-app model loading.

TextGenerationRequest and TextGenerationResponse handle the actual inference. The API is streaming by default via Flow<TextGenerationPartialResponse> in Kotlin, with a convenience suspend fun generateText() for single-result use cases.

The @RequiresAICapability annotation and AICapabilityChecker allow apps to gracefully handle devices that don't have on-device AI support. Android 17 makes the on-device model available on devices with 8GB or more RAM, but the API surface exists on all Android 17 devices — you check availability at runtime.

What it enables: Summarization of long text without network connectivity, classifying user input for routing to different app features, grammar correction in text fields, and lightweight question-answering against a provided context. The model is smaller than Gemini 1.5 Flash and significantly less capable on complex reasoning tasks, but for many local NLP tasks it's sufficient.

Health Connect 3.0

Android 17 ships Health Connect 3.0, a significant update to the health data platform introduced in Android 14.

New data types: Android 17 adds formal support for continuous glucose monitoring (CGM) via BloodGlucoseRecord extensions that support streaming data rather than spot readings, HRV (Heart Rate Variability) detail records with SDNN and RMSSD metrics, skin temperature baseline and deviation records, and SpO2 trend data. These additions are driven by the proliferation of wearables that can generate this data — the APIs land before mainstream devices widely support them, but the timing is appropriate.

Aggregation queries with privacy preservation: The new AggregateGroupByPeriod and AggregateGroupByDuration APIs return statistical aggregates (average, sum, min, max) without requiring apps to read individual records. For a step-counting feature, an app can get "weekly step averages for the past month" with a single query rather than reading every individual record. This is important because many apps legitimately need trends without needing raw data, and this API pattern allows Health Connect to share more with apps while exposing less granular data.

Background reads with limitations: Android 17 introduces controlled background read access — apps can be granted permission to read specific health data types in the background for specific purposes (e.g., a cardiac monitoring app that needs to check heart rate readings overnight). This is gated behind a new permission category that requires detailed justification and is more stringently reviewed during Play Store review.

Predictive Back: Full Enforcement

The predictive back gesture — where users see a preview of the destination before completing the back navigation — is now fully enforced in Android 17. Apps that haven't migrated off onBackPressed() will experience broken behavior: the system intercepts the back gesture for the predictive animation, and the app's onBackPressed() never fires at the correct time.

The migration path:

  1. Remove onBackPressed() overrides and replace with OnBackPressedCallback via onBackPressedDispatcher.addCallback()
  2. For custom animations, implement OnBackAnimationCallback to participate in the predictive back preview
  3. For edge-to-edge content, update gesture exclusion rects so the back gesture doesn't conflict with app gestures near the screen edge

Jetpack Navigation 2.8+ handles this automatically for apps using the Navigation component. Apps with manual back stack management need explicit migration. Given that the behavior break is immediate and visible to all users on Android 17 devices, this should be the highest-priority Android 17 migration item for most apps.

Large Screen and Foldable APIs

Android 17 formalizes the adaptive UI guidance with new Jetpack library support:

WindowSizeClass receives a new MinWidthSizeClass variant that gives more granular breakpoints for the medium-width range (400-840dp) where many foldables spend time in their different orientations. The existing Compact/Medium/Expanded classification was too coarse for the range of form factors now shipping.

ActivityEmbedding (the API for splitting activities across foldable halves) gains a new SplitController.splitWhenAvailable() method that declaratively configures split behavior. Previously this required more boilerplate. The new API mirrors SwiftUI's NavigationSplitView in conciseness.

WindowAreaController and WindowAreaSession provide programmatic access to the rear display on foldables (like the Samsung Galaxy Z Fold 6's cover display) for apps that want to use it explicitly rather than relying on system management.

Security and Privacy Changes

Two changes with behavioral implications:

Photo picker enforcement: Android 17 restricts READ_MEDIA_IMAGES and READ_MEDIA_VIDEO access further. Apps targeting SDK 37 (Android 17) must use the system photo picker for all image/video selection flows. Direct gallery access is limited to apps with documented and approved use cases (camera apps, photo editors). This continues the narrowing of broad storage access that began in Android 10.

Network security changes: Apps can no longer make cleartext HTTP connections by default without explicit configuration. While cleartextTrafficPermitted has been available for years, Android 17 changes the default to false for apps targeting SDK 37, matching iOS's App Transport Security behavior from 2016.

What Developers Need to Address

The items that require code changes before targeting SDK 37:

  1. Predictive Back migration — any use of onBackPressed()
  2. HTTP cleartext — any non-encrypted endpoints (typically internal/dev URLs that leaked into production configs)
  3. Photo picker adoption — any flows using storage permission for media selection
  4. Health Connect permission checks — if you use Health Connect, the new granular permission set changes some read flows

Everything else is additive. The AICore and Health Connect 3.0 APIs are opt-in. Large screen improvements are progressive enhancement. Android 17 is a developer-friendly release in the sense that the must-do migration items are well-telegraphed and the new APIs are genuinely useful rather than ceremonial.