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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
590
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
1B+ /day規模のログを管理する技術
broadleaf
0
140
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
170
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
240
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
yield再入門 #phpcon
o0h
PRO
0
480
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
240
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
550
symfony/aiとlaravel/boost
77web
0
130
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
140
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Facilitating Awesome Meetings
lara
57
7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Amusing Abliteration
ianozsvald
1
230
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
The SEO identity crisis: Don't let AI make you average
varn
0
520
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Automating Front-end Workflow
addyosmani
1370
210k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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͍͖ͬͯ