Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

Android Q ● User privacy & security ● Developer productivity Android Q @andyb129 slides ~ bit.ly/2JeHWyY

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Dark theme @andyb129 slides ~ bit.ly/2JeHWyY

Slide 5

Slide 5 text

Why? ● Environment ● Battery ● Accessibility @andyb129 Dark theme slides ~ bit.ly/2JeHWyY

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Gesture Navigation 2008 (Cupcake) 2011 (ICS) 2014 (Lollipop) 2017 (Oreo) 2018 (Pie) @andyb129 slides ~ bit.ly/2JeHWyY

Slide 8

Slide 8 text

● 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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Jetpack ● View bindings ● Compose ● View Pager2 ● CameraX library ● Library updates - Worker Manager, Navigation etc. @andyb129 slides ~ bit.ly/2JeHWyY

Slide 13

Slide 13 text

Jetpack - View bindings ● Generated from XML file ● Null safe & Type safe fields ● No need to wrap layout in tag like Data Binding slides ~ bit.ly/2JeHWyY

Slide 14

Slide 14 text

Jetpack - Compose @andyb129 slides ~ bit.ly/2JeHWyY

Slide 15

Slide 15 text

● 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

Slide 16

Slide 16 text

Jetpack - ViewPager2 ● Based on RecyclerView ● Uses same adapter as RecyclerView (simple views) RecyclerView.Adapter ● FragmentStateAdapter for Fragments ● RTL support ● Vertical paging ● Better dataset change notifications implementation 'androidx.viewpager2:viewpager2:1.0.0-alpha05' @andyb129 slides ~ bit.ly/2JeHWyY

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Thank Q, and Q and most of all Q Questions? @andyb129 slides ~ bit.ly/2JeHWyY