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
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
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
360
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
140
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
240
フィードバックで育てるAI開発
kotaminato
1
120
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.5k
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
330
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.7k
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
270
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
140
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Embracing the Ebb and Flow
colly
88
5.1k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
260
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
420
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͍͖ͬͯ