Upgrade to Pro — share decks privately, control downloads, hide ads and more …

I Watched 14 Hours of Google I/O Videos So That...

I Watched 14 Hours of Google I/O Videos So That You Don't Have To

Apart from all the AI/Gemini stuff, what is actually interesting & important to Android Developers in this year's Google I/O? This talks aims to tell you exactly what you need to know and nothing more than that.

Louis Tsai

May 29, 2024
Tweet

More Decks by Louis Tsai

Other Decks in Programming

Transcript

  1. 3

  2. New in Android Studio • Android Studio • New IntelliJ,

    new features • sticky-lines • slow-USB cable warning • in-line breakpoints • In-emulator Layout Inspector • Compose Preview & UI Check • Profiler redesign • AI tooling preview & how to opt-out • More frequent updates 4 • Firebase • New Release Monitoring Stuff • Device Streaming is free (for now)
  3. New in Android Studio • Android Studio • New IntelliJ,

    new features • sticky-lines • slow-USB cable warning • in-line breakpoints • In-emulator Layout Inspector • Compose Preview & UI Check • Profiler redesign • AI tooling preview & how to opt-out • More frequent updates ! 4 • Firebase • New Release Monitoring Stuff • Device Streaming is free (for now)
  4. 5

  5. Design scalable Compose API • If they were to build

    a “Chip” Composable, what would they do • Naming, Parameters & their ordering, what to expose and what not to, testability, etc. • Not just “this is what you need to do”, actually explain why • If you bike shed a lot with your team • If you haven’t done much with Compose 6
  6. Design scalable Compose API • If they were to build

    a “Chip” Composable, what would they do • Naming, Parameters & their ordering, what to expose and what not to, testability, etc. • Not just “this is what you need to do”, actually explain why • If you bike shed a lot with your team • If you haven’t done much with Compose ! 6
  7. 8

  8. Make Compose apps fast • Speed run a Codelab +

    A few info about upcoming performance improvements • How to use perfetto to debug where the jank comes from • How to use custom traces, how to mark class as “@Immutable” to avoid recomposition • Great for people who started running into Compose issue • “Practical performance problem solving in Jetpack Compose” 9
  9. Make Compose apps fast • Speed run a Codelab +

    A few info about upcoming performance improvements • How to use perfetto to debug where the jank comes from • How to use custom traces, how to mark class as “@Immutable” to avoid recomposition • Great for people who started running into Compose issue • “Practical performance problem solving in Jetpack Compose” " 9
  10. 10

  11. Material 3 adaptive layout APIs • androidx.compose.material3.adaptive:${a few libraries here}

    • Compact (Phone), Medium (Un-foldable / vertical tablet), Expanded (horizontal tablet) • NavigationSuiteScaffold, which automatically switch between • Bottom navigation bar • Navigation Rail (i.e. on the left) • Think about “Panes” instead of “Screens” • ListDetailPaneScaffold • SupportingPaneScaffold 11
  12. Material 3 adaptive layout APIs • androidx.compose.material3.adaptive:${a few libraries here}

    • Compact (Phone), Medium (Un-foldable / vertical tablet), Expanded (horizontal tablet) • NavigationSuiteScaffold, which automatically switch between • Bottom navigation bar • Navigation Rail (i.e. on the left) • Think about “Panes” instead of “Screens” • ListDetailPaneScaffold • SupportingPaneScaffold • Check if your apps can/should use those libraries directly • And if not, how to DIY the adaptive-ness to your design 14
  13. Material 3 adaptive layout APIs • androidx.compose.material3.adaptive:${a few libraries here}

    • Compact (Phone), Medium (Un-foldable / vertical tablet), Expanded (horizontal tablet) • NavigationSuiteScaffold, which automatically switch between • Bottom navigation bar • Navigation Rail (i.e. on the left) • Think about “Panes” instead of “Screens” • ListDetailPaneScaffold • SupportingPaneScaffold • Check if your apps can/should use those libraries directly • And if not, how to DIY the adaptive-ness to your design " 14
  14. 15

  15. New in Google Play • A lot more places to

    show ads & campaigns • A lot more places to show app/content recommendations for apps & GAMES • A lot more ways for people to pay • A lot more ways to target those user to open your app (and hopefully pay) • You can charge 999.99 USD now* • Play SDK Console open to all • Play console got more QoL improvements, like a “Discard release” button • Deep link Patching: update deep link without deployment & adoption of new version? • Remember that Play Billing Library v5 is deprecating this year • Migrate or you will NOT be able to update your app by August 16
  16. New in Google Play • A lot more places to

    show ads & campaigns • A lot more places to show app/content recommendations for apps & GAMES • A lot more ways for people to pay • A lot more ways to target those user to open your app (and hopefully pay) • You can charge 999.99 USD now* • Play SDK Console open to all • Play console got more QoL improvements, like a “Discard release” button • Deep link Patching: update deep link without deployment & adoption of new version? • Remember that Play Billing Library v5 is deprecating this year • Migrate or you will NOT be able to update your app by August " 16
  17. 17

  18. Build widgets with Glance • 99% similar API to normal

    Compose, but for Wear OS (androidx.glance) • “Canonical widget layouts”: templates for people to use: List, Grid, Text, etc • Technical Details of how to get it setup, cause there are a few XMLs • How to make sure your widget matches users * a e s t h e t i c * • You can now add custom error RemoteView • There is an API for testing 18
  19. Build widgets with Glance • 99% similar API to normal

    Compose, but for Wear OS (androidx.glance) • “Canonical widget layouts”: templates for people to use: List, Grid, Text, etc • Technical Details of how to get it setup, cause there are a few XMLs • How to make sure your widget matches users * a e s t h e t i c * • You can now add custom error RemoteView • There is an API for testing 18 "
  20. 19

  21. Social media & entertainment on Android • CameraX libraries •

    Compose View Finder in alpha • 1.4 beta with better Kotlin APIs • How to get the best compatible feature set • Media3 libraries • More stable • More performantaster • Easier to maintain 20
  22. Social media & entertainment on Android • CameraX libraries •

    Compose View Finder in alpha • 1.4 beta with better Kotlin APIs • How to get the best compatible feature set • Media3 libraries • More stable • More performantaster • Easier to maintain " 20
  23. 21

  24. Android accessibility updates • New a11y features • Better support

    for hearing aids, braille input • More Sound Notifications • Project Relate for people with atypical speech • Lookout Find Mode to find stuff via computer vision • New APIs & tools • Better and more precise/accurate API for Talkback • Traversal API to gives you more control • Auto-generated content description for images • Accessibility scan (now support Compose) & new UI Check Mode 22
  25. Android accessibility updates • New a11y features • Better support

    for hearing aids, braille input • More Sound Notifications • Project Relate for people with atypical speech • Lookout Find Mode to find stuff via computer vision • New APIs & tools • Better and more precise/accurate API for Talkback • Traversal API to gives you more control • Auto-generated content description for images • Accessibility scan (now support Compose) & new UI Check Mode " 22
  26. 23

  27. Markers in Maps Compose • Codelab on how to use

    the library • How to get API key & how to keep a secret • How to put markers (pins) where you want to put them • How to bridge to non-compose Google Maps functions 24
  28. Markers in Maps Compose • Codelab on how to use

    the library • How to get API key & how to keep a secret • How to put markers (pins) where you want to put them • How to bridge to non-compose Google Maps functions " 24
  29. 25

  30. Battery efficiency on Android • Async APIs ? Scheduling APIs

    ? specific APIs ? Foreground Service? • Use Perfetto to debug who is causing all the extra power drain • Pixel 6 or newer • Watch out for “dangerous” APIs like wake lock 26
  31. Battery efficiency on Android • Async APIs ? Scheduling APIs

    ? specific APIs ? Foreground Service? • Use Perfetto to debug who is causing all the extra power drain • Pixel 6 or newer • Watch out for “dangerous” APIs like wake lock " 26
  32. 28

  33. New in Google TV • Android 14 for TV is

    coming • Performance Improvement; Reduce Power Consumptions • Better a11y features & support • Round app icon please and thank you • Compose 1.0 Beta 29
  34. New in Google TV • Android 14 for TV is

    coming • Performance Improvement; Reduce Power Consumptions • Better a11y features & support • Round app icon please and thank you • Compose 1.0 Beta # 29
  35. 30

  36. Future of Wear OS • Wear OS 5 coming soon

    (based on Android 14) • Some design suggestions & complication • New “Watch Face Format” version 2 • By 2025, all new watch faces must use it 31
  37. Future of Wear OS • Wear OS 5 coming soon

    (based on Android 14) • Some design suggestions & complication • New “Watch Face Format” version 2 • By 2025, all new watch faces must use it # 31
  38. 32

  39. Android for cars • Android Auto & Automotive OS •

    Google Cast coming to first Rivian, soon other cars • More emulators, e.g. ones with insane wide screen • Play with it via Pixel Tablet • More categories of apps will be open • 3 Tiers of Cars app • Car Differentiated: Tailor to car • Care Optimised: Good for centre screen • (New): Car Ready: Just tablet apps 33
  40. Android for cars • Android Auto & Automotive OS •

    Google Cast coming to first Rivian, soon other cars • More emulators, e.g. ones with insane wide screen • Play with it via Pixel Tablet • More categories of apps will be open • 3 Tiers of Cars app • Car Differentiated: Tailor to car • Care Optimised: Good for centre screen • (New): Car Ready: Just tablet apps # 33
  41. 34

  42. New in Health on Android • Reminder that Google Fit

    will be fully killed by 2025 June • Storage: Health Connect • Recording API: Record distance, steps, and Calories • Health Connect’s new features • Wear OS gets new metrics for you to request • Better tooling: sensor panel in Android Studio 35
  43. New in Health on Android • Reminder that Google Fit

    will be fully killed by 2025 June • Storage: Health Connect • Recording API: Record distance, steps, and Calories • Health Connect’s new features • Wear OS gets new metrics for you to request • Better tooling: sensor panel in Android Studio # 35
  44. 36

  45. Multiplatform game rendering • (Not a game dev) • Optimize

    for different OS (incl. Windows), form factor, performance, etc • Make sure you account for any possible screen sizes & aspect ratio • Android 15 will make app edge-to-edge by default • Utilise newer GPU features like Ray Tracing • Use Frame Pacing Library (a.k.a. Swappy) to see what might be slowing things down • Vulkan > OpenGL 37
  46. Multiplatform game rendering • (Not a game dev) • Optimize

    for different OS (incl. Windows), form factor, performance, etc • Make sure you account for any possible screen sizes & aspect ratio • Android 15 will make app edge-to-edge by default • Utilise newer GPU features like Ray Tracing • Use Frame Pacing Library (a.k.a. Swappy) to see what might be slowing things down • Vulkan > OpenGL 37 #
  47. 38

  48. Actionable performance optimisation • TL;DR: Use Baseline Profile to reduce

    JIT compiling • Measure App Startup with Macro Benchmark • Rendering Performance from Macro Benchmark • Time To Fully Display (TTFD) • Power Consumption from Macro Benchmark • Leak Canary will be coming to Android Studio 39
  49. Actionable performance optimisation • TL;DR: Use Baseline Profile to reduce

    JIT compiling • Measure App Startup with Macro Benchmark • Rendering Performance from Macro Benchmark • Time To Fully Display (TTFD) • Power Consumption from Macro Benchmark • Leak Canary will be coming to Android Studio # 39
  50. 40

  51. Build productive app experiences • Adaptive Adaptive Adaptive • You

    can launch URL side-by-side with 2 lines change • Stylus handwriting to TextField 1.7 / EditText • Also easier to access low latency ink • Notes role: allow your note-taking app to open from lock screen w/o unlocking • Think about keyboard shortcuts, focus state, and hover state 41
  52. Build productive app experiences • Adaptive Adaptive Adaptive • You

    can launch URL side-by-side with 2 lines change • Stylus handwriting to TextField 1.7 / EditText • Also easier to access low latency ink • Notes role: allow your note-taking app to open from lock screen w/o unlocking • Think about keyboard shortcuts, focus state, and hover state # 41
  53. 42

  54. 2024 Keynote mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini

    Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem 43
  55. 2024 Keynote mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini

    Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem mini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gemini Gem ' 43
  56. 45

  57. AI-powered compliance with Checks • Platform with website, API, and

    CLI • e.g. let you know which domain your app is contacting • e.g. let you know which SDK you have include and why that might be dangerous • Later will also have a IDE plugin to give you inline feedback locally • Android (Jave & Kotlin) & iOS (Swift) 46
  58. AI-powered compliance with Checks • Platform with website, API, and

    CLI • e.g. let you know which domain your app is contacting • e.g. let you know which SDK you have include and why that might be dangerous • Later will also have a IDE plugin to give you inline feedback locally • Android (Jave & Kotlin) & iOS (Swift) $ 46
  59. 47

  60. Passkeys and identity solutions • Easier sign-up = happier users

    • Passkey is safer & more convenient • Credential Manager: 3-in-1 • Sign in with Google + Passkey + Password • Soon: Licences 48
  61. Passkeys and identity solutions • Easier sign-up = happier users

    • Passkey is safer & more convenient • Credential Manager: 3-in-1 • Sign in with Google + Passkey + Password • Soon: Licences $ 48
  62. 49

  63. 51

  64. Building adaptive Android apps • Different screen sizes, form factor,

    input, etc • Different orientations • Screenshot test with @Preview 52
  65. Building adaptive Android apps • Different screen sizes, form factor,

    input, etc • Different orientations • Screenshot test with @Preview $ 52
  66. 53

  67. Android security essentials • Play Protect can now run immediately

    if it’s the first time an app is seen in the world • Screen Share a single app only & notification & OTP will be hidden • Most Notification listener services won’t get OTP notifications • Remote lock your device & Private space to keep your data private • You need to explain why you need access to ALL media, and will soon be a policy on Play • Play Integrity API is faster and you should use it • Min TargetSdk 24 for Android 15 • More restrictions on Intent to reduce abuse • More restrictions on background activity 54
  68. Android security essentials • Play Protect can now run immediately

    if it’s the first time an app is seen in the world • Screen Share a single app only & notification & OTP will be hidden • Most Notification listener services won’t get OTP notifications • Remote lock your device & Private space to keep your data private • You need to explain why you need access to ALL media, and will soon be a policy on Play • Play Integrity API is faster and you should use it • Min TargetSdk 24 for Android 15 • More restrictions on Intent to reduce abuse • More restrictions on background activity $ 54
  69. 55

  70. Business success with Google Play • More ways to customise

    your store listing to each users • Gemin Gemini Gemin Gemini Gemin Gemini • Tax, Compliance, and more • Orders API in early access, to programatically see orders in real time • Play Billing Lab • Discard release button 56
  71. Business success with Google Play • More ways to customise

    your store listing to each users • Gemin Gemini Gemin Gemini Gemin Gemini • Tax, Compliance, and more • Orders API in early access, to programatically see orders in real time • Play Billing Lab • Discard release button $ 56
  72. 58

  73. 60

  74. New in ChromeOS • PLEASE FOR THE LOVE OF GOD

    OPTIMIZE FOR • Keyboard & mouse • Large screen devices • Teasing a future where you can easily USB adb into a ChromeOS device to debug 61
  75. New in ChromeOS • PLEASE FOR THE LOVE OF GOD

    OPTIMIZE FOR • Keyboard & mouse • Large screen devices • Teasing a future where you can easily USB adb into a ChromeOS device to debug & 61
  76. 62

  77. Developer Keynote • Gemini Gemini Gemini Gemini Gemini Gemini Gemini

    Gemini Gemini Gemini Gemini Gemini • AICore gives you access to Gemini Nano • Kotlin Multiplatform to share business logic • Adaptive Adaptive Adaptive • Firebase new logo • Cloud SQL in Firebase Data Connect 63
  78. Developer Keynote • Gemini Gemini Gemini Gemini Gemini Gemini Gemini

    Gemini Gemini Gemini Gemini Gemini • AICore gives you access to Gemini Nano • Kotlin Multiplatform to share business logic • Adaptive Adaptive Adaptive • Firebase new logo • Cloud SQL in Firebase Data Connect & 63
  79. 64

  80. Privacy on Chrome & Android • Third-Party Cookies has a

    bad rap, we will replace that with something (better?) 65
  81. Privacy on Chrome & Android • Third-Party Cookies has a

    bad rap, we will replace that with something (better?) & 65