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
Waiting for slices
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
ymnder
May 22, 2018
Programming
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Waiting for slices
CA.apk#6
https://cyberagent.connpass.com/event/84233/
ymnder
May 22, 2018
More Decks by ymnder
See All by ymnder
What’s new in Google Play's billing system
ymnder
1
420
Deep Linksをはじめよう
ymnder
0
510
Introduction to Wear OS Application Development
ymnder
0
610
CircleCIを使ったAndroidの開発フローの効率化とtips
ymnder
1
1.4k
Introduction to new features of Google Play Billing
ymnder
2
360
運用から学ぶPlay Billing Library
ymnder
2
800
What’s new in Google Play Billing v1.2
ymnder
0
780
詳解定期購入
ymnder
7
6.8k
社内向けライブラリを設計・運用する話
ymnder
0
1.2k
Other Decks in Programming
See All in Programming
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
200
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
170
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
240
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
210
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
330
フィードバックで育てるAI開発
kotaminato
1
120
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
140
Performance Engineering for Everyone
elenatanasoiu
0
270
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
190
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.4k
初めてのKubernetes 本番運用でハマった話
oku053
0
130
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
320
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
410
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
370
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
350
The Curse of the Amulet
leimatthew05
2
13k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Believing is Seeing
oripsolob
1
170
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Transcript
Waiting for slices CA.apk#6 @Shibuya 2018/05/22 @ymnd
ࠓͷ͓ॻ͖ ᶃ What are Slices ᶄ Where are Slices ᶅ
How wonderful are Slices ᶆ How install Slices 2
ࠓ͓͠ͳ͍͜ͱ • Slicesͷ෦࣮ • SliceManager: handle interactions • SliceProvider: provide
content(ContentProvider) • SliceAction: action • SliceView: view for displaying slice • TemplateSliceBuilder: base UI builder • ͲͷΑ͏ʹSlices͕ಈ͍͍ͯΔ͔
ࠓͷ͓ॻ͖ ᶃ What are Slices ᶄ Where are Slices ᶅ
How wonderful are Slices ᶆ How install Slices 4
What are Slices?
Slices are UI templates that can display rich, dynamic, and
interactive content from your app from within the Google Search app and later in other places like the Google Assistant.
ᶃWhat are Slices • remotableͰcontrolableͳૢ࡞Λఏڙ͢Δinline UI • ϦϞʔτίϯςϯπʹର͢Δ৽͍͠Ξϓϩʔν • ଞͷΞϓϦʹϛχΞϓϦΛࠩ͠ࠐΊΔΠϝʔδ
ᶃWhat are Slices • templated • ๛ͳίϯϙʔωϯτΛ༻ҙ͍ͯ͠Δ • ࣗͰॊೈʹΈ্͛ΒΕΔ •
interactive • ੩తͳσʔλ͚ͩͰͳ͍ • ϦΞϧλΠϜͳσʔλΛऔಘՄೳ • actionɺtoggleɺsliderɺscroll • updatable • bundled with jetpack • surfaceɺtemplatesɺcontrols(ex. text input)ͷߋ৽༧ఆ
ᶃWhat are Slices • Widgetͱҧ͏ͷʁ • RemoteViewͰ࣮͞Ε͍ͯͳ͍ • SliceViewͱ͍͏ΈΛ৽ͨʹ༻ҙ͍ͯ͠Δ •
ϨΠΞτxmlͰͳ͘ίϯϙʔωϯτͰΉ
ࠓͷ͓ॻ͖ ᶃ What are Slices ᶄ Where are Slices ᶅ
How wonderful are Slices ᶆ How install Slices 10
ᶄWhere are Slices • Google Search App: Auto Complete •
Google Assistant • and more…?
ᶄWhere are Slices: Search App • App Name • ΞϓϦ໊ʹͻ͔͚ͬͯදࣔ͢Δ
• permissionͱActivityͷURIͷඥ͚͕ඞཁ
ᶄWhere are Slices: Search App • General Terms • ؔ͢ΔΫΤϦʹԠͤ͞Δ
• deeplink / specific feature • FirebaseAppIndexingͰindexΛͭ͘Δ
ࠓͷ͓ॻ͖ ᶃ What are Slices ᶄ Where are Slices ᶅ
How wonderful are Slices ᶆ How install Slices 14
ᶅHow wonderful are Slices • ϢʔβʔͷೳಈతͳߦಈʹϑοΫͰ͖Δ • ݕࡧΞγελϯτػೳͰ݁ՌΛಘΒΕͨͱ͖ • ࣗͷΞϓϦͷ֎ͰίϯςϯπʹϦʔνͰ͖Δ
• ΞϓϦͷίΞػೳΛϛχΞϓϦͱͯ͠ఏڙͰ͖Δ • ʢΘΕ͍ͯΔؒΞϓϦফ͞Εͳ͍ʣ
ᶅHow wonderful are Slices: template • templateΛͬͯॊೈʹUIΛΈ্͛ΒΕΔ
ᶅHow wonderful are Slices: template • fun createSliceWithHeader(sliceUri: Uri) =
ListBuilder(context, sliceUri, ListBuilder.INFINITY) .setAccentColor(0xff0F9D) // Specify color for tinting icons .setHeader { it.apply { setTitle("Get a ride") setSubtitle("Ride in 4 min") setSummary("Work in 1 hour 45 min | Home in 12 min") } }.addRow { it.apply { setTitle("Home") setSubtitle("12 miles | 12 min | $9.00") addEndItem( IconCompat.createWithResource(context, R.drawable.ic_home), SliceHints.ICON_IMAGE ) } }
ࠓͷ͓ॻ͖ ᶃ What are Slices ᶄ Where are Slices ᶅ
How wonderful are Slices ᶆ How install Slices 18
ᶆHow install Slices • minSdk is 19+!!!!! • gradleʹҎԼΛهड़ʢα൛Ͱ͢ʣ dependencies
{ implementation 'androidx.slice:slice-core:1.0.0-alpha1' implementation 'androidx.slice:slice-builders:1.0.0-alpha1' implementation 'androidx.slice:slice-view:1.0.0-alpha1' }
ᶆHow install Slices ᶃ manifestʹproviderΛఆٛ ᶄ SliceProviderΛ࣮ɿURIܗࣜͰذɺUIΛߏங ᶅ SliceͷUIΛߏஙɿBuilderؔ ᶆ
BroadcasrReceiverͰΠϕϯτϋϯυϦϯά • PendingIntentΛ͍ɺSlices͔ΒActionΛ௨͢Δ • ΞϓϦͰActionΛड͚औΓߋ৽͢Δ ᶇ ࣮ػςετ • ݱঢ়ͰSliceViewerͱ͍͏DebugAppΛ͏
࣍ʹԿΛ͢Δ͔ • Code labΛΔ • Slicesͷ࣮աఔΛҰ௨ΓֶΔ • DocumentΛಡΉ • templateͷΈํͳͲ͕ॆ࣮͍ͯ͠Δ
• App ActionsΛֶͿ • ActionsΛػೳڧԽ͢ΔͨΊͷΈͱͯ͠ͷSlices • ෦࣮ΛಡΉ • ͨʔʔʔͷ͠ʔʔʔʔɿϒϩάॻ͔ͳ͖Ό
ࢀߟϦϯΫ • http://g.co/Slices • https://codelabs.developers.google.com/codelabs/android- slices-basic/index.html?index=..%2F..%2Findex#0 • https://blog.novoda.com/android-p-slices-missing- documentation-part-1/ •
https://techblog.picappinc.jp/google-i- o%E3%81%A7%E3%83%86%E3%83%B3%E3%82%B7%E3%8 3%A7%E3%83%B3%E4%B8%8A%E3%81%8C%E3%81%A3% E3%81%9Fslices%E3%81%AE%E8%A9%B1-4425de150b7b • http://konifar-zatsu.hatenadiary.jp/entry/2018/05/16/155727
whoami • twitter:@ymnd, github:@ymnder • Application Engineer • Android ܦిࢠ൛ΞϓϦ
• Android ࢴ໘ϏϡʔΞʔΞϓϦ • ٕज़ϒϩάͬͯ·͢ → https://hack.nikkei.com/blog/ 23
Slices͍͖ͬͯ