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
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
Inside Stream API
skrb
1
770
Creating Composable Callables in Contemporary C++
rollbear
0
170
さぁV100、メモリをお食べ・・・
nilpe
0
150
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.4k
Claspは野良GASの夢をみるか
takter00
0
210
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
140
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
360
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
560
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
180
ふつうのFeature Flag実践入門
irof
8
4.2k
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
sira's awesome portfolio website redesign presentation
elsirapls
0
280
The Spectacular Lies of Maps
axbom
PRO
1
820
Accessibility Awareness
sabderemane
1
140
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Exploring anti-patterns in Rails
aemeredith
3
430
Evolving SEO for Evolving Search Engines
ryanjones
0
220
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
150
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
310
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
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͍͖ͬͯ