Google I/O 2022 Recap: Dev Tools & Jetpack

Ken Baldauf

Senior Software Engineer @ Acorns

Android Studio Dolphin Beta

  • View Compose animations with animation preview
  • Track Compose recomposition counts in layout inspector
  • Can generate multiple Compose Previews at once with a custom defined annotation class
  • Improved Wear OS emulator pairing & run configurations
  • New Logcat V2: sports improved formatting & search
  • Adds support for Gradle Managed Test Devices
    • Ability to define & manage virtual devices via Gradle
  • Debug coroutines on API 29+ with coroutine-core 1.6.0+

Android Studio Electric Eel Canary

  • Live Edit allows Compose Preview to update in real time
    • Experimental feature focussed on UI/UX code changes
    • No current support for new or method name changes
  • Resizable emulators
    • test multiple screen sizes with a single emulator
  • With API 33, you can now pair 2 emulators with virtual bluetooth
  • Experimentally mirror physical device in Android Studio
  • Integration with Google Play SDK Index
    • Provides insights into over 100 widely used SDKs
  • View App Quality Insights from Firebase Crashlytics

Health Connect

  • A platform built in collaboration with Samsung
  • Unifies health data from multiple devices & apps
  • Devs: single API for reading/writing health & fitness data
  • Users: control over data access + secure on device storage
  • Tracks activity, measurements, nutrition, sleep & vitals
  • Samsung Health, Google Fit, Fitbit, MyFitnessPal, Leap Fitness & Withings are all onboard
  • Will support API 28+ on device with Google Play Services
  • androidx.health is currently available via a Jetpack Alpha

Jetpack Compose

  • Compose 1.2 & Compose for Wear OS are both in Beta
  • Adds support for android:includeFontPadding=false
  • Downloadable font support
    • Async access Google Fonts & define fallback fonts
  • Improves text magnifier added in Compose 1.1
  • Define custom lazy layouts with experimental LazyLayout
  • Insets move from Accompanist to Compose Foundation
  • Navigation Component is now integrated into Compose 
  • Material 3: window size classes
    • Opinionated breakpoints that categorize height/width
    • Balance simplicity with various device form factors

Jetpack: Room

  • Room 2.4 - Stable
    • Stable support for Kotlin Symbol Processing (KSP)
      • 2x compilation speed improvement of KAPT
    • Adds support for auto migrations
    • Built-in support for Paging 3.0
  • Room 2.5 - Alpha
    • Start of a full Kotlin rewrite
      • Converted room-common, room-migration & paging from room-runtime

Jetpack: Macrobenchmark

  • Measure app start-up & scrolling performance
  • Version 1.1 has reach release candidate
    • Features improvements to testing speed
    • Can now be setup via Android Studio
    • Capture allocation counts & output results in IDE
    • Load traces in Android Studio for inspection
    • Generate custom Baseline Profiles
  • Baseline Profiles: list of classes/methods included in APK
    • Android Runtime (ART) will use list to perform Ahead-of-time (AOT) compilation
    • Faster launch times if AOT methods used in startup

Jetpack: JankStats

  • metrics-performance: 1.0.0 Alpha
  • Builds upon API 24's FrameMetrics; works on API 16+
  • Helps track & analyze UI performance problems
    • Heuristic approach to pinpoint causes of frame drops
      • Determines when Jank occurs & ties it to the current UI & user state
    • Exposes OnFrameListener for per-frame reporting
      • Provides info on a frame's completion time, UI context & whether it was considered Jank
      • Encouraged to aggregate data for bulk logging

Jetpack: DragAndDrop

  • Version 1.0.0 is a new Stable release; Supports API 24+
  • Accept drag-and-drop from other apps or within the app
  • Designed for split screen & new device form factors
  • Adds a DropHelper utility class
    • Simplifies the implementation of drag & drop
    • Specify which views are drop targets
      • AppCompatEditText works on Android 7+ devices
      • All View on devices running Android 12+
    • Configure highlight that shows when user drags content over a target
    • Uses OnReceiveContentListener to handle ClipData

Jetpack: Misc

  • Paging 3.1 Stable: adds support for Rx & Guava
  • Tracing 1.1 Stable: enables profiling in non-debug builds 
    • Now API 14+; Previously only feasible on API 29+
  • Annotation is migrating to Kotlin & adding highly requested annotations
    • Ex: @DeprecatedSince inspired by @RequiresApi
  • AppCompat 1.6 Alpha: backports Android 13's per-app language settings to API 14
  • Launched series of Modern Android Development Skills  videos focussed on Jetpack's Architecture components
  •  Over 100 projects now on GitHub

Flutter

  • Launch of Flutter 3
    • Coincides with Dart 2.17
  • Now fully native on Apple Silicon for development
  • Completes change from mobile-centric to multiplatform
    • Adds stable support for macOS & Linux
      • Supports both Intel & Apple Silicon for macOS with Universal Binary
    • Supports Android, iOS, Web, Windows, macOS + Linux

Google I/O 2022 Recap

By Kenneth Baldauf

Google I/O 2022 Recap

A recap of the latest updates in developer tools & Jetpack from Google I/O 2022

  • 179