Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Remote Configを導入して、Notificationsは導入しませんでした
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ryo Sakaguchi
July 13, 2016
Technology
1.4k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Remote Configを導入して、Notificationsは導入しませんでした
Remote ConfigとNotificationとAnalyticsに関してさくっと話しました。
Otemachi_firebase #1
Ryo Sakaguchi
July 13, 2016
More Decks by Ryo Sakaguchi
See All by Ryo Sakaguchi
なんとなくgRPC-Java を使ってるそこの俺、gRPC-Kotlin に移行したらどうだ?
wakwak3125
0
25
Android Architecture Componentsを使って、改善・効率化するAndroidアプリ開発
wakwak3125
0
1.4k
Test multiple APKs with Robolectric
wakwak3125
0
840
Clip, Elevation and ViewOutlineProvider
wakwak3125
1
1.4k
WebView as Fancy and effective View
wakwak3125
1
1.7k
ViewPager2をちょっとさわってみよう
wakwak3125
0
1.7k
年末だし、振り返るKotlin
wakwak3125
1
1.2k
社内ライブラリのアップデートフロー
wakwak3125
4
3.9k
Wantedly Peopleのリリースフロー
wakwak3125
1
4.9k
Other Decks in Technology
See All in Technology
Antigravity SDK for the Java Developer
glaforge
0
230
認知負荷を吸収し、プロダクトをまたぐPR Preview基盤の設計事例
taiki45
2
540
AI coding 整合正規方法
philipz
0
560
AI駆動開発で仕様はどこまで書くべきか? ― 人とAIの責務境界から考える開発プロセスの実践
takahiromatsui
1
220
AWS DevOps Agent スキルをつかいこなそう / Master AWS DevOps Agent Skills
kinunori
2
620
Terraformを用いたJamf Pro構成のIaC, GitOps化への挑戦
yukun
0
110
2026-09-26 Platform Engineering Kaigi 2026 インフラとアプリの境界線と委譲の設計 / Drawing the Infra and App Line
masasuzu
0
440
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
7
820
ScotSecure West 2026 - Glasgow
raybugg
0
200
特殊変数大全
dak2
0
170
HacobuにおけるFDEとは/登壇資料(戸井田 裕貴)
hacobu
PRO
1
520
【Findyテック文化祭ワークショップ】新卒エンジニア&採用担当と作る、 なりたい姿と今やるべき一歩
dip_tech
PRO
0
150
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Documentation Writing (for coders)
carmenintech
77
5.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
How to make the Groovebox
asonas
2
2.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
600
My Coaching Mixtape
mlcsv
0
330
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Why Our Code Smells
bkeepers
PRO
340
58k
Transcript
Remote ConfigΛಋೖͯ͠ɺ Notificationsಋೖ͠·ͤΜͰͨ͠ɻ @wakwak3125 Otemachi Firebase #1
About me ɾࡔޱ ྒʢ͔͙ͪ͞ Γΐ͏ʣ ɾLang-8ͱ͍͏ձࣾͰಇ͍͍ͯ·͢ɻ ɾҰࡢ·ͰՈ۩ͷൢചһΛ͍ͯ͠·ͨ͠ ɾձࣾTwitterͰΘ͘Θ͘͞ΜͱݺΕ͍ͯ·͢
HiNativeʢϋΠωΠςΟϒʣ commitϝοηʔδΛఴͯ͠Β͏ͷΦεεϝͰ͢
Agenda • What’s Remote Config • What’s Notifications • Remote
Config, Pros/Cons • Notifications, Pros/Cons • Analytics with Remote Config
What’s Remote Config?
What’s Remote Config? • ΦϯϥΠϯ্Ͱઃఆͨ͠Λଈ࠲ʹΞϓϦʹಧ͚Δ ͜ͱ͕Ͱ͖Δπʔϧ • A/BςετͷͨΊʹͬͯΈͨΓ • ηάϝϯτຖʹΞϓϦͷڍಈΛ͔͑ͨΓ
• มߋΛΞϓϦͷΞοϓσʔτͳ͠ʹөͤͨ͞Γ • ͋ΔػೳΛ༗ޮԽͨ͠ΓແޮԽͨ͠Γ
Chang the behavior by segments. • ಛఆͷϢʔβʔ͞ΜͷΈʹԿ͔Λද͍ࣔͤͨ͞ • ϨϏϡʔૌٻμΠΞϩά •
ϔϏʔϢʔβʔ͚ͷ͝Ҋ
How to use Remote Config ?
Step1 FirebaseͷґଘؔΛՃ // Add dependencies to app/build.gradle compile 'com.google.firebase:firebase-core:9.2.0' compile
‘com.google.firebase:firebase-config:9.2.0' // Create singleton Remote Config object remoteConfig = FirebaseRemoteConfig.getInstance() val configSettings = FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnable(BuildConfig.DEBUG).build() remoteConfig.setConfigSettings(configSettings)
Step2 σϑΥϧτΛઃఆ // Create default parameter like this. res/xml/remote_config_default_params.xml <defaultsMap>
<entry> <key>show_review_dialog</key> <value>false</value> </entry> </defaultsMap> // set default parameters by “setDefaults()” remoteConfig = FirebaseRemoteConfig.getInstance() remoteConfig.setDefaults(R.xml.remote_config_default_params)
Step3 ύϥϝʔλʔΛRemote ConfigαʔόʔʹConsole͔Β ઃఆ (Review targetʹ͍ͭͯޙड़)
Step4 αʔόʔ͔ΒΛऔಘ // Fetch the parameter from server. override fun
onPostResume() { super.onPostResume() // cacheExpireΛ։ൃ࣌0ʹ͢Δͱɺͷมߋͷ֬ೝΛ͘͢͠ͳΓ·͢ɻ val cacheExpire: Long = 3600L remoteConfig.fetch(cacheExpire) .addOnFailureListener({ Log.d(TAG, "Failure") }) .addOnSuccessListener ({ // औಘͨ͠ύϥϝʔλʔΛ༗ޮԽ͢Δɻ remoteConfig.activateFetched() }) .addOnCompleteListener({ Log.i(TAG, "Complete") })}
Step5 औಘͨ͠ΛͬͯԿ͔͢Δ // Fetch the parameter from server. // Ұऔಘͨ͠Ωϟογϡ͞ΕΔͷͰɺfetch͢Δඞཁͳ͍ɻ
if (remoteConfig.getBoolean(“show_review_dialog”)) { showReviewDialog() }
Point • ެࣜͷυΩϡϝϯτʹॻ͍ͯ͋Γ·͕͢ɺdeveloper modeΛ༗ޮԽ͠ͳ͍ ͱɺfetchճʹ੍ݶ͕ઃఆ͞ΕΔͨΊɺඞͣ༗ޮԽ͠·͠ΐ͏ɻ • ͷfetchεϓϥογϡɺॳճىಈ࣌ʹ·ͱΊͯऔಘ͓͖ͯ͠ɺऔಘՄ൱Λ ࣋ͬͯࠓޙ࠶fetch͢Δ͔Ͳ͏͔Λஅ͢Εྑ͍ͱࢥ͍·͢ɻ • ͦͯ͠fetch()Αࣦ͘ഊ͠·͢ɻ·ͨɺonCreateͰݺͿͱ͔ͳΓͷ֬Ͱࣦ
ഊɺ·ͨηοτ͍ͯ͠ΔOnCompleteListener͕ݺΕ·ͤΜͰͨ͠ɻ work around ͱͯ͠ onPostResumeͰfetchͯ͋͛͠Δ͜ͱͰྑͦ͞͏Ͱ͢ɻ • Ref: http://stackoverflow.com/questions/37501124/firebaseremoteconfig- fetch-does-not-trigger-oncompletelistener-every-time
What’s Notifications ?
What’s Notifications ? • FirebaseͷGROWηΫγϣϯʹҐஔ͚ΒΕ͍ͯΔλʔήςΟ ϯάՄೳͳϓογϡϝοηʔδ৴πʔϧ • ϓογϡ௨ͷ։෧ଌఆ • ϓογϡ௨։෧ޙͷίϯόʔδϣϯΠϕϯτͷଌఆ
• ηάϝϯτ͝ͱʹ৴Մೳ • ΞϓϦͷར༻ଅਐʹͭͳ͕Δ • ϓογϡϝοηʔδૹΓϗʔμΠ
Versatile message targeting. • Analyticsͱͷ࿈ܞͰ͍ΖΜͳλʔήοτ͚ʹϓογϡΛ৴Ͱ͖·͢ɻ • ຊޠֶशऀ͚ʹຊจԽʹؔ͢Δ໘നͦ͏ͳ࣭Λ৴ͨ͠Γ • αϒεΫϦϓγϣϯϓϥϯͷηʔϧΛʮҎલαϒεΫϦϓγϣϯొΛ ͍͕ͯͨ͠ղͯ͠͠·ͬͨਓʯʹ͓Βͤͨ͠Γ…
• Console͔ΒखܰʹϓογϡϝοηʔδΛ࡞Δ͜ͱ͕Ͱ͖ΔͷͰɺඇ։ൃ ऀͷΞϧόΠτ͞Μʹ͓ئ͍͢Δ͜ͱ͕Ͱ͖Δɻ • Analytics࿈ܞͰͲΜͳϢʔβʔʹ৴Ͱ͖Δͳ͊ศརͦ͏ͩͳͱࢥͬͯ ಋೖ
͠Α͏ͱࢥ͍·͕ͨࣙ͠Ί·ͨ͠
Why…? • ΞϓϦ͕ϑΥΞάϥϯυͷ࣌͡Όͳ͍ͱɺConsoleͰ࡞ͬͨϓογϡ௨ͷΞ ΠίϯσʔλΛΧελϚΠζ͢Δ͜ͱ͕Ͱ͖ͳ͔ͬͨͨΊࣙΊͪΌ͍·ͨ͠… • ΞϓϦΛόοΫάϥϯυʹ͍ͯ͠Δਓୡ(જࡏతͳϢʔβʔ͞Μୡ)ΛΞϓϦ ʹͬͯͤ͜͞ΔͨΊʹ͍͔͕ͨͬͨɺཁ݅Λຬͨ͢͜ͱ͕Ͱ͖ͳ͔ͬͨɻ • όοΫάϥϯυঢ়ଶͰɺΞϓϦΛىಈͤ͞Δ͚ͩͰ͖Δ͕ɺͦΕͰΞ ΠίϯͷઃఆͳͲΛConsoleͰͰ͖ͳ͍ͷ͢͜͠ࠔΔͨΊɻ
• ଞʹແྉͰྑ͍αʔϏεΛݟ͚ͭͨɻ • OneSignalͱ͍͏αʔϏε͕ߴػೳ͔ͭૹΓϗʔμΠͰྑ͔ͬͨͰ͢ɻ
Use Remote Config with Firebase Analytics !
Use Remote Config with Analytics • Remote Config͋͘·Ͱɺαʔόʔ͔ΒΛओ มߋͨ͠Γ͢ΔͨΊ͚ͩͷπʔϧɻมߋޙͷӨڹ ԠΛݟΔͨΊʹूܭ࡞ۀ͕ඞཁɻͦ͜·Ͱ
Remote Config͚ͩͰͰ͖·ͤΜɻ • ·ͨɺηάϝϯτΛߜͬͨมߋͷద༻୯ମͰ Ͱ͖·ͤΜɻ
Set up(1/6) • ઌʹઆ໌͍ͯͨ͠ϨϏϡʔૌٻμΠΞϩάΛྫʹઆ ໌͍ͨ͠ͱࢥ͍·͢ɻ • ϨϏϡʔΛॻ͍ͯ΄͍͠ϢʔβʔͷଐੑΛܾΊΔɻ ྫ͑…(HiNativeͷ߹) • ࣭ճ͕10ճҎ্ͷϢʔβʔ͞Μʹରͯ͠Ϩ
ϏϡʔૌٻΛߦ͍ͬͯ·͢ɻ
Set up(2/6) • ଐੑ͕ܾ·ͬͨΒɺ࣍ͦͷϢʔβʔଐੑΛ Analyticsʹઃఆͯ͋͛͠·͠ΐ͏ɻ • ࠓճ͜Μͳײ͡ʹͯ͠Έ·ͨ͠ɻ
Set up(3/6) • ઌ΄Ͳ࡞ͬͨϓϩύςΟΛݩʹΦʔσΟΤϯεΛ࡞ ͠·͢ɻ
Set up(4/6) ࠷ޙʹɺΞϓϦଆ͔ΒϢʔβʔϓϩύςΟΛૹ ৴͠·͢ɻ // ϨϏϡʔରϢʔβʔͷ࣭ͷ͖͍͠ // ͜͜ͷɺRemoteConfigͰઃఆ͓͚ͯ͠ɺϨϏϡʔରʹ͢ΔϢʔβʔͷ࣭ Λ͍ͭͰม͑Δ͜ͱ͕Ͱ͖·͢ɻ val
threshold = 10 // numberOfQuestionsΞϓϦΛ༻͍ͯ͠ΔϢʔβʔͷ࣭ val reviewTarget = (numberOfQuestions >= threshold).toString() // Firebase AnalyticsʹϢʔβʔϓϩύςΟΛૹ৴ firebaseAnalytics.setUserProperty(“review_target”, reviewTarget)
Set up(5/6) • Analyticsʹઃఆͨ͠ϓϩύςΟΛݩʹɺRemote Config ʹ݅ΛՃ͠·͢ɻ
Set up(6/6) • Remote Configͷύϥϝʔλʔʹ݅Λద༻͠·͢ɻ ݅ͷΛՃ -> Review targetΛબ
͕࣌ؒΞϨ͢͜ͱ • Remote Configͬͯͯؾ͍ͮͨ͜ͱͱ͔ • A/BςετάϧʔϐϯάͳͲ͕Ͱ͖ͳ͍ͷͰɺҰ࿈ͷྲྀΕͳͲΛςετ͢Δ߹ͪΐͬͱ͕͋Δɻʢνϡʔ τϦΞϧͷҰ࿈ͷςΩετͷςετʣ • ύοͱࢥ͍͍ͭͨͷɺRemote Configͷʹจࣈͷ੍ݶ͕΄΅΄΅ແ͍ͷͰɺJSONͳΜ͔ΛೖΕ͓͍ͯ
ͯɺͦΕΛύʔεͯ͠͏Α͏ʹ͢Εɺॊೈʹมߋ͔ͭάϧʔϐϯά͕Ͱ͖ΔΜ͡Όͳ͍͔ͳͱࢥ͍·ͨ͠ɻ • FirebaseશମΛ௨ͯ͠ࢥͬͨ͜ͱ • Lang-8ͷΑ͏ͳখنͳձࣾ(5ਓن)ͱ͔ͩͱɺͯ͢Λࣗࣾ։ൃͰಠࣗʹ͍ͬͯΔͱ͍͘Β͕࣌ؒ͋ͬͯ Γͳ͍ͷͰɺ͜͏͍ͬͨϫϯετοϓͰ͍Ζ͍ΖͰ͖Δπʔϧඇৗʹॿ͔Δͳ͊ͱ͍͏ҹͰͨ͠ɻ • ͔͠ແྉɻ • ͍Ζ͍Ζফͤͳ͍ɻ • Ճͨ͠ΞϓϦ͕ফͤͳ͍ • Ճͨ͠ϓϩύςΟফͤͳ͍ • σϑΥϧτͰ༻ҙ͞Ε͍ͯΔͷফͤͳ͍ • ͱʹ͔͘ফͤͳ͍
͋Γ͕ͱ͏͍͟͝·ͨ͠