What’s New in (Android) Q?

What’s New in (Android) Q?

Summary of some of the cool new features announced for Android Q in 2019

Cba4aca9318039a288aae9be121abdc0?s=128

Andy B

July 02, 2019
Tweet

Transcript

  1. Join the Q Android ^ @andyb129 slides ~ bit.ly/2JeHWyY

  2. Android Q • User privacy & security • Developer productivity

    Android Q @andyb129 slides ~ bit.ly/2JeHWyY
  3. Topics • Dark theme • Gesture navigation • New share

    sheet • (More) Notification changes -smart reply • Bubbles API • Jetpack ◦ Compose ◦ View bindings ◦ View Pager2 ◦ CameraX library • Other new libraries & API’s @andyb129 slides ~ bit.ly/2JeHWyY
  4. Dark theme @andyb129 slides ~ bit.ly/2JeHWyY

  5. Why? • Environment • Battery • Accessibility @andyb129 Dark theme

    slides ~ bit.ly/2JeHWyY
  6. Dark theme • Implement options 1) Themes 2) Force Dark

    (photos sometimes look strange but view opt-out available) - also enable per activity if needed 3) Use Custom theme (-night resource qualifier e.g. values-night) • Material design page dedicated to designing dark theme - https://material.io/design/color/dark-theme.html • Google I/O talk - https://youtu.be/OCHEjeLC_UY @andyb129
  7. Gesture Navigation 2008 (Cupcake) 2011 (ICS) 2014 (Lollipop) 2017 (Oreo)

    2018 (Pie) @andyb129 slides ~ bit.ly/2JeHWyY
  8. • Push content edge to edge • Avoid clickable views

    in chrome area (top/bottom/left/right) • Gesture areas (home - bottom, back - left+right edge) • Exclusion rects ◦ Home gesture never excluded as only exit point from app ◦ The DrawerLayout and SeekBar components support automatic opt-out behavior out of the box. Gesture Navigation
  9. New share sheet • Much faster • Content preview •

    Copy to clipboard (top right) • New sharing shortcut api • Joe birch blog link -> https://joebirch.co/2019/03/26/exploring-andro id-q-sharing-shortcuts/ • Google I/O talk - What’s new in Android OS User interface - https://youtu.be/nWbW58RMteI
  10. Notifications • Priority/Gentle notification sections • What takes priority? ◦

    Apps can requests high or max priority (causes popup - use sparingly) ◦ OS heuristics - essential device function, comms from person, events/alarms ◦ User always gets final say (long press to switch between priority/gentle) • Notification actions - smart replies from OS @andyb129 slides ~ bit.ly/2JeHWyY
  11. Bubbles API (preview) • Current API Issues - SYSTEM_ALERT_WINDOW ◦

    Allows transparent overlays on screen ◦ Privacy concerns i.e. think your typing into one screen but actually another ◦ Always running (battery/performance) • Solution - Bubbles API ◦ Developer preview in API 29 (turn on in dev settings) ◦ Progressive rollout - dev settings, system setting and then deprecated SYSTEM_ALERT_WINDOW in later API @andyb129
  12. Jetpack • View bindings • Compose • View Pager2 •

    CameraX library • Library updates - Worker Manager, Navigation etc. @andyb129 slides ~ bit.ly/2JeHWyY
  13. Jetpack - View bindings • Generated from XML file •

    Null safe & Type safe fields • No need to wrap layout in <Layout> tag like Data Binding slides ~ bit.ly/2JeHWyY
  14. Jetpack - Compose @andyb129 slides ~ bit.ly/2JeHWyY

  15. • Reactive UI toolkit (AOSP) • Written in Kotlin •

    Unbundled (will be an AndroidX library) • WARNING! Pre-alpha - Very early stages (test with AndroidX toolchain installed) • Kotlin compiler plugin used for annotations (no annotation processor) • Compatible with existing views so you can mix and match d.android.com/jetpackcompose Google I/O Talk (Declarative UI Patterns) - https://youtu.be/VsStyq4Lzxo Jetpack - Compose
  16. Jetpack - ViewPager2 • Based on RecyclerView • Uses same

    adapter as RecyclerView (simple views) RecyclerView.Adapter<ViewPagerAdapter.ViewHolder> • FragmentStateAdapter for Fragments • RTL support • Vertical paging • Better dataset change notifications implementation 'androidx.viewpager2:viewpager2:1.0.0-alpha05' @andyb129 slides ~ bit.ly/2JeHWyY
  17. Jetpack - CameraX library • Fixes device specific implementations •

    Backwards compatible to Lollipop (API 5.0) - version alpha-04 • Extensions from manufacturers for device specific functions i.e. HDR, Portrait, Night mode etc. @andyb129
  18. Jetpack - Library updates • Preferences - use AndroidX version

    (alpha 4) (android.preference is deprecated) • Work manager - 2.0 - Just went stable (AndroidX) • Navigation - 2.0 - Just went stable (AndroidX) • SaveState for ViewModel 1.0 alpha (store values to survive process death) • NEW! Benchmarking 1.0 alpha - performance testing https://developer.android.com/studio/profile/benchmark • Lifecycles, LiveData and Room - now with coroutines https://medium.com/androiddevelopers/viewmodels-with-saved-state-jetpack-navigation-data-binding-and-coroutine s-df476b78144e
  19. Other stuff • Android studio - concentrating on bug fixing

    & performance! (instead of features) - ‘Instant run’ becomes ‘Apply changes’ • In App Updates API (Play services core lib) - flexible or immediate - Blog - https://joebirch.co/2019/05/07/exploring-in-app-updates -on-android/ • New Settings sheets - blog - https://joebirch.co
  20. Summary • Dark theme • Gesture navigation • New share

    sheet • Smart Notification responses • Bubbles Api • Jetpack ◦ View bindings ◦ Compose ◦ View Pager2 ◦ CameraX library ◦ Library updates • Other stuff - In App Updates API, Jetpack benchmark, Setting sheet @andyb129 slides ~ bit.ly/2JeHWyY
  21. Resources • Google I/O - What’s new in Android -

    https://www.youtube.com/watch?v=td3Kd7fOROw • Android Developer blog - https://android-developers.googleblog.com/2019/05/whats-new-in-android-q- beta-3-more.html • Google I/O - Declarative UI Patterns (Jetpack Compose) - https://www.youtube.com/watch?v=VsStyq4Lzxo&t • List of all Google I/O talk links (Chet Haase) - https://medium.com/androiddevelopers/whats-now-in-android-d78061ac8b92
  22. Thank Q, and Q and most of all Q Questions?

    @andyb129 slides ~ bit.ly/2JeHWyY