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
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
410
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
790
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
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.5k
はてなアカウント基盤 State of the Union
cockscomb
0
660
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
300
Claspは野良GASの夢をみるか
takter00
0
210
OSもどきOS
arkw
0
590
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
160
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.3k
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
140
Oxlintのカスタムルールの現況
syumai
6
1.1k
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
200
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
120
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
740
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
620
We Have a Design System, Now What?
morganepeng
55
8.2k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
170
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Statistics for Hackers
jakevdp
799
230k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
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͍͖ͬͯ