Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What's new in Android 2018
Search
GDG Montreal
November 25, 2018
Technology
0
53
What's new in Android 2018
This a deck that Google provide to share what is new in Android 2018.
GDG Montreal
November 25, 2018
Tweet
Share
More Decks by GDG Montreal
See All by GDG Montreal
Advanced Pregnancy Risk Assessment Using AI Model Chain by Kiruthika Subramani
gdgmontreal
0
28
Al and Security: A double edge sword? by Stacy Véronneau and Yan Bellerose
gdgmontreal
0
56
Scaling AI on a Budget: A Startup's GPU Optimization Journey by Shannon Lal
gdgmontreal
0
40
Build Your Own Secured AI Platform with Google Cloud Vertex AI by unleashing the Power of Multi-LLM by Eckarath Khounsombath
gdgmontreal
0
64
FlutterMTL_-_Flutter_Next_24.pdf
gdgmontreal
0
41
Developing Flutter Applications in Dev Container Environments - Ali Yazdi
gdgmontreal
0
210
Building an ML powered Android Livestreaming App by Etienne Caron
gdgmontreal
1
66
Boosting Your Mobile App: Small Details, Big Impact by Mathieu Fillion
gdgmontreal
0
26
The Hitchhiker's Guide to MLOps by David Cardozo
gdgmontreal
0
28
Other Decks in Technology
See All in Technology
Understanding_Thread_Tuning_for_Inference_Servers_of_Deep_Models.pdf
lycorptech_jp
PRO
0
140
ネットワーク保護はどう変わるのか?re:Inforce 2025最新アップデート解説
tokushun
0
140
AIとともに進化するエンジニアリング / Engineering-Evolving-with-AI_final.pdf
lycorptech_jp
PRO
0
140
WordPressから ヘッドレスCMSへ! Storyblokへの移行プロセス
nyata
0
290
標準技術と独自システムで作る「つらくない」SaaS アカウント管理 / Effortless SaaS Account Management with Standard Technologies & Custom Systems
yuyatakeyama
3
1.3k
Amazon S3標準/ S3 Tables/S3 Express One Zoneを使ったログ分析
shigeruoda
5
580
生まれ変わった AWS Security Hub (Preview) を紹介 #reInforce_osaka / reInforce New Security Hub
masahirokawahara
0
350
Amazon Bedrockで実現する 新たな学習体験
kzkmaeda
2
630
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
5
4.4k
TechLION vol.41~MySQLユーザ会のほうから来ました / techlion41_mysql
sakaik
0
200
なぜ私はいま、ここにいるのか? #もがく中堅デザイナー #プロダクトデザイナー
bengo4com
0
1.2k
Delegating the chores of authenticating users to Keycloak
ahus1
0
130
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
49
14k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
17
950
Designing Experiences People Love
moore
142
24k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
230
Practical Orchestrator
shlominoach
188
11k
Writing Fast Ruby
sferik
628
62k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Transcript
What’s new in Android @L_de_V Laurence de Villers
What’s New In Android PI A s
Android App Bundle
Source: Partner provided data 5 10 15 20 25 30
35 40 45 50 55 60 65 70 75 80 85 90 95 100 APK size (MBs) Conversion rate decreases as apps get larger Play Store conversion rate (% of visitors who install) Trendline
xxhdpi hdpi xhdpi mdpi ldpi xxxhdpi
xxhdpi arm hdpi arm xhdpi arm mdpi arm ldpi arm
xxxhdpi arm xxhdpi x86 hdpi x86 xhdpi x86 mdpi x86 ldpi x86 xxxhdpi x86
xxhdpi arm64 hdpi arm64 xhdpi arm64 mdpi arm64 ldpi arm64
xxxhdpi arm64 xxhdpi arm hdpi arm xhdpi arm mdpi arm ldpi arm xxxhdpi arm xxhdpi x86 hdpi x86 xhdpi x86 mdpi x86 ldpi x86 xxxhdpi x86 xxhdpi x86_64 hdpi x86_64 xhdpi x86_64 mdpi x86_64 ldpi x86_64 xxxhdpi x86_64
xxhdpi arm64 v:14 hdpi arm64 v: 16 xhdpi arm64 v:15
mdpi arm64 v:17 ldpi arm64 v:18 xxxhdpi arm64 v:13 xxhdpi arm v:20 hdpi arm v:22 xhdpi arm v:21 mdpi arm v:23 ldpi arm v:24 xxxhdpi arm v:19 xxhdpi x86 v: 8 hdpi x86 v:10 xhdpi x86 v:9 mdpi x86 v: 11 ldpi x86 v:12 xxxhdpi x86 v: 7 xxhdpi x86_64 v: 2 hdpi x86_64 v: 4 xhdpi x86_64 v:3 mdpi x86_64 v:5 ldpi x86_64 v: 6 xxxhdpi x86_64 v: 1
Android App Bundle Benefit from a smaller app Stop managing
multiple APKs Deliver features on-demandBETA
Source: Partner provided data saving 11% saving 23% saving 45%
saving 22% 28% saving ABA English Airbnb LinkedIn Perigee saving 49% RV AppStudios saving 64% Memrise Pluto. TV
Optimized APK for each device Upload an Android App Bundle
Dynamic Delivery
/res/xxxhdpi classes.dex /res/xxhdpi config_xxxhdpi.apk base.apk config_xxxhdpi.apk /res/xhdpi /res/hdpi config_xhdpi.apk config_hdpi.apk
/res/mhdpi /res/ldpi config_mhdpi.apk config_ldpi.apk /lib/x86 /lib/arm config_x86.apk config_arm.apk /res/values-en /res/values-fr config_en.apk config_fr.apk /res/values-es config_es.apk …
App Bundle APK
Android App Bundle Start today at g.co/androidappbundle
Android Jetpack Accelerate App Development
None
95% supported devices
Refactor android.support.v4.* android.support.v7.* // etc. androidx.*
Jetpack Architecture
Jetpack Architecture Lifecycle Lifecycle Aware Components
Jetpack Architecture Lifecycle Lifecycle Aware Components ViewModel View data decoupled
from OS lifecycle
Jetpack Architecture Lifecycle Lifecycle Aware Components ViewModel View data decoupled
from OS lifecycle Room SQLite object mapping
Jetpack Architecture Lifecycle Lifecycle Aware Components ViewModel View data decoupled
from OS lifecycle Room SQLite object mapping LiveData Lifecycle aware observables
Jetpack Architecture Lifecycle Lifecycle Aware Components ViewModel View data decoupled
from OS lifecycle Paging (1.0!) Asynchronous data retrieval Room SQLite object mapping LiveData Lifecycle aware observables
Jetpack Architecture WorkManager Job scheduling Navigation Backstack and app flows
PREVIEW
View Models Simplifying Android development
What is the hardest part of Android Development?
None
ViewModel onCleared()
ViewModel + LiveData onCleared() observe LiveData
ViewModel + LiveData onCleared() LiveData observe
ViewModel + LiveData onCleared() LiveData observe
ViewModel + LiveData onCleared() LiveData
ViewModel + LiveData onCleared() LiveData observe
ViewModel + LiveData onCleared() LiveData observe
ViewModel + LiveData onCleared() LiveData observe
ViewModel + LiveData onCleared() LiveData
Room A better way to do databases
2016: How do you do Databases on Android?
Database SQLite App Logic Content Provider
Database Uri App Logic Content Provider SQLite
Database Content Values Uri App Logic Content Provider SQLite
App Logic Content Provider Database Content Values Uri SQLite Not
type-safe
App Logic Content Provider Database Content Values Uri SQLite Not
type-safe Not type-safe
App Logic Content Provider Database Content Values Uri SQLite Not
type-safe Not type-safe
Room Database App Logic Content Provider Content Values Uri Not
type-safe Not type-safe SQLite
Room DAO SQLite
Room SQL DAO View Model SQLite Type-safe
Room SQL Entities DAO View Model Type-safe Type-safe SQLite
WorkManager Backwards compatible background work PREVIEW
Battery Optimizations Optimize background tasks to stay charged longer
Unlimited Background Services Doze App Standby Limited Broadcasts Release Wakelocks
Service Limitations App Standby Buckets Background Restrictions
There is still a lot of work to do Sending
logs Uploading images and videos Syncing data Processing data
Basic Work: upload a photo upload
// A simple Worker class UploadPhotoWorker : Worker() { override
fun doWork(): WorkerResult { uploadPhoto() return WorkerResult.SUCCESS } } SUCCESS FAILURE RETRY Runs on a background thread
// Creating a work request and enqueuing it val request:
WorkRequest = OneTimeWorkRequestBuilder<UploadPhotoWorker>().build() WorkManager.getInstance().enqueue(request) Ω
What if you lose connectivity? Use constraints!
// Creating a work request with network constraints val constraints
= Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) .build() val request = OneTimeWorkRequestBuilder<UploadPhotoWorker>() .setConstraints(constraints) .build() WorkManager.getInstance().enqueue(request)
Show Progress upload
Chain Work compress upload
Parallel Work upload
Complex Flows filter filter filter compress upload
When to use? Best-Effort Exact Timing ThreadPool Coroutines ThreadPool Coroutines
When to use? Best-Effort Guaranteed Execution Exact Timing Deferrable ThreadPool
Coroutines ThreadPool Coroutines Foreground Service
WorkManager Respects users battery Works with OS Backwards compatible (API14)
Navigation How to get around your app PREVIEW
Challenges for navigation Fragment Transactions Deep Links Passing Arguments Up
and Back Errorprone Boilerplate Testing
Home Category Item https://... Need to be created and added
to back stack on deep link
Navigation Graph A navigation graph is a blueprint of screens
and the actions that link them.
Navigation Define navigation graph with visual tool / XML: Make
a single navigate() call and runtime library handles everything
None
Safe Args Type-safe arguments when launching a Fragment
HelpFragment.kt if (!arguments.containsKey("screenName")) { throw IllegalArgumentException() } val category: Int
= arguments.getInt("category") val screenName: String = arguments.getString("screenName")
HomeFragment.kt findViewById<Button>(R.id.help_button).setOnClickListener { v -> val helpDirections = HomeFragmentDirections.help("Home") helpDirections.category
= 1703 v.findNavController().navigate(helpDirections) }
HelpFragment.kt val args : HelpFragmentArgs = HelpFragmentArgs.fromBundle(arguments) val screenName: String
= args.screenName val category: Int = args.category
Navigation IDE tooling for app navigation Manage deeplinks Safe argument
passing
Jetpack Architecture Start today at d.android.com/arch
Integration Tests e2e Tests Unit Tests Android Test Part of
Jetpack
@RunWith(AndroidJUnit4::class) class SimpleUnifiedTest { @Test fun viewIsVisible() { assertEquals(view.visibility, View.VISIBLE)
} } Failed: Expected 0 but was 16 F
@RunWith(AndroidJUnit4::class) class SimpleUnifiedTest { @Test fun viewIsVisible() { assertThat(view).isVisible() }
} Failed: View was not visible F NEW
Core Platform changes in Android Pie
Battery App Standby Buckets usage based access to jobs, alarms,
network, messaging Background Restriction user can restrict badly-behaved apps
Background Inputs & Privacy
Kotlin Performance & Compiler ART, D8, R8 Nullability support library
and libcore
Android KTX Part of Jetpack Concise, readable code. A suite
of libraries Android KTX, Testing KTX, ...
Background Text Measurement Text measurement is expensive Up to 80
to 90% of the draw/measure/layout loop Pre-computed text API offloads most of the work to a worker thread PrecomputedText.create(...)
Baseline distance
val tv: TextView // Distance from top to first baseline
tv.firstBaselineToTopHeight = distancePx // Distance from bottom to last baseline tv.lastBaselineToBottomHeight = distancePx NEW
Security Unified BiometricDialog @deprecated FingerprintManager Stronger protection for private keys
StrongBox backend Build.SERIAL doesn’t work anymore
System UI Integrating fully with Android
Display Cutouts Simulate notches in developer options (skip the electrical
tape) WindowInsets#getDisplayCutout() android:windowLayoutInDisplayCutoutMode • mode=”never” • mode=”default” • mode=”shortEdges” + DisplayCutout#getSafeInsets() • mode=”shortEdges” + DisplayCutout#getBounds()
Slices A new approach to remote content • Within an
app or between apps • Structured data, flexible templates • Interactive, updatable • Backwards-compatible! • (Support Library, KitKat/API 19+)
Actions Deep links into your app • “shortcuts with parameters”
• “a visible Intent” Define actions in actions.xml Register with App Indexing to show as on-device search results
Notifications People love messages …so we focused on MessagingStyle •
Inline images/stickers • Participant images • Smart reply UI • RemoteInput.setChoices() And more!
What’s New In Android Android App Bundle https://g.co/androidappbundle Android Jetpack
https://d.android.com/jetpack https://d.android.com/kotlin https://d.android.com/arch https://d.android.com/arch/navigation https://d.android.com/arch/workmanager Core Platform App Standby Buckets Background Restrictions System UI Display Cutouts Slices & Actions Notifications
Thank You!