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
Firebase - Remote Config
Search
Fumihiko Shiroyama
June 10, 2016
Programming
5
1.4k
Firebase - Remote Config
Firebase - Remote Config @ shibuya.apk #8 Google I/O 2016 Report
Fumihiko Shiroyama
June 10, 2016
Tweet
Share
More Decks by Fumihiko Shiroyama
See All by Fumihiko Shiroyama
The world of Android wireless communications without Internet
srym
1
120
AWS Device FarmとCircleCIでAndroidのUIテストを自動化しよう
srym
1
4.9k
Spring BootをKotlinで作成しAmazon Elastic Container Service (ECS) で稼働させる
srym
6
1.9k
iOSDC_2019_DeviceFarm.pdf
srym
8
19k
世界で戦うエンジニアになるために_公開用.pdf
srym
18
45k
Unit Testing in a Nutshell - DroidKaigi 2018
srym
11
15k
Clean Architecture & TDD
srym
1
3.7k
はやい・やすい・うまい!スタートアップでも使える Retrofit + RxJava で瞬間APIクッキングレシピ
srym
2
590
I/O 2017 Short Report
srym
0
300
Other Decks in Programming
See All in Programming
C#/.NETのこれまでのふりかえり
tomokusaba
1
160
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
400
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
3
2.3k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
430
EventSourcingの理想と現実
wenas
6
2.1k
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.1k
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
offers_20241022_imakiire.pdf
imakurusu
2
360
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
How GitHub (no longer) Works
holman
311
140k
RailsConf 2023
tenderlove
29
880
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Writing Fast Ruby
sferik
626
61k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Done Done
chrislema
181
16k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Building Adaptive Systems
keathley
38
2.2k
Adopting Sorbet at Scale
ufuk
73
9k
Transcript
'JSFCBTF3FNPUF$POpH 4IJCVZBBQL(PPHMF*03FQPSU
'VNJIJLP4IJSPZBNB 4PGUXBSF&OHJOFFS /JLLFJ*OD ʲ࿈ࡌதʳ εϚϗΞϓϦ։ൃΛՃ͢Δɼ 'JSFCBTFΛͬͯΈΑ͏ IUUQHJIZPKQEFWTFSJBM pSFCBTF
'JSFCBTF.BKPS6QHSBEFT
None
ʂ
3FNPUF$POpH
IUUQTXXXZPVUVCFDPNXBUDI MJTU1-M ,[;&T:-N0'@*BZS5OUFWYUC6Y%-W@$997'10G
w 4JNQMF,FZ7BMVFTUPSF w 0OMJOFDPOUFOUTVQEBUJOHXJUIPVUSFJOTUBMMBUJPO w "#5FTUJOH w 6TFSTFHNFOUBUJPOT
%FNP
4FUVQ
None
None
None
None
QSPKFDUCVJMEHSBEMF buildscript { // ... dependencies { // ... classpath
'com.google.gms:google-services:3.0.0' } }
BQQCVJMEHSBEMF apply plugin: 'com.android.application' android { // ... } dependencies
{ // ... compile 'com.google.firebase:firebase-core:9.0.2' compile 'com.google.firebase:firebase-config:9.0.2' } // ADD THIS AT THE BOTTOM apply plugin: 'com.google.gms.google-services'
$PEF
SFTYNMSFNPUF@DPOpH@EFGBVMUTYNM <?xml version="1.0" encoding="utf-8"?> <defaultsMap> <entry> <key>color</key> <value>white</value> </entry> </defaultsMap>
"DUJWJUZ FirebaseRemoteConfigSettings remoteConfigSettings = new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(BuildConfig.DEBUG) .build(); remoteConfig =
FirebaseRemoteConfig.getInstance(); remoteConfig.setConfigSettings(remoteConfigSettings); remoteConfig.setDefaults(R.xml.remote_config_defaults);
FirebaseRemoteConfigSettings remoteConfigSettings = new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(BuildConfig.DEBUG) .build(); remoteConfig = FirebaseRemoteConfig.getInstance();
remoteConfig.setConfigSettings(remoteConfigSettings); remoteConfig.setDefaults(R.xml.remote_config_defaults); ճ࣌ؒҎ্ͷϦΫΤετΤϥʔʹͳΔͷͰ ։ൃ࣌͜ͷઃఆඞਢʂ "DUJWJUZ
FirebaseRemoteConfigSettings remoteConfigSettings = new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(BuildConfig.DEBUG) .build(); remoteConfig = FirebaseRemoteConfig.getInstance();
remoteConfig.setConfigSettings(remoteConfigSettings); remoteConfig.setDefaults(R.xml.remote_config_defaults); σϑΥϧτͷ,FZ7BMΛઃఆ "DUJWJUZ
private void fetch() { long cacheExpiration = 3600; if (remoteConfig.getInfo().getConfigSettings().isDeveloperModeEnabled())
{ cacheExpiration = 0; } remoteConfig.fetch(cacheExpiration) .addOnSuccessListener(aVoid -> { Log.d(TAG, "Fetch succeeded."); remoteConfig.activateFetched(); String colorName = remoteConfig.getString("color"); container.setBackgroundColor(Color.parseColor(colorName)); }) .addOnFailureListener(e -> Log.e(TAG, "Fetch failed.", e)); }
private void fetch() { long cacheExpiration = 3600; if (remoteConfig.getInfo().getConfigSettings().isDeveloperModeEnabled())
{ cacheExpiration = 0; } remoteConfig.fetch(cacheExpiration) .addOnSuccessListener(aVoid -> { Log.d(TAG, "Fetch succeeded."); remoteConfig.activateFetched(); String colorName = remoteConfig.getString("color"); container.setBackgroundColor(Color.parseColor(colorName)); }) .addOnFailureListener(e -> Log.e(TAG, "Fetch failed.", e)); } $BDIF&YQJSBUJPO EFGBVMUIPVST
private void fetch() { long cacheExpiration = 3600; if (remoteConfig.getInfo().getConfigSettings().isDeveloperModeEnabled())
{ cacheExpiration = 0; } remoteConfig.fetch(cacheExpiration) .addOnSuccessListener(aVoid -> { Log.d(TAG, "Fetch succeeded."); remoteConfig.activateFetched(); String colorName = remoteConfig.getString("color"); container.setBackgroundColor(Color.parseColor(colorName)); }) .addOnFailureListener(e -> Log.e(TAG, "Fetch failed.", e)); } 'FUDI4FSWFS4FUUJOHT
private void fetch() { long cacheExpiration = 3600; if (remoteConfig.getInfo().getConfigSettings().isDeveloperModeEnabled())
{ cacheExpiration = 0; } remoteConfig.fetch(cacheExpiration) .addOnSuccessListener(aVoid -> { Log.d(TAG, "Fetch succeeded."); remoteConfig.activateFetched(); String colorName = remoteConfig.getString("color"); container.setBackgroundColor(Color.parseColor(colorName)); }) .addOnFailureListener(e -> Log.e(TAG, "Fetch failed.", e)); } 4VDDFTT$BMMCBDL
private void fetch() { long cacheExpiration = 3600; if (remoteConfig.getInfo().getConfigSettings().isDeveloperModeEnabled())
{ cacheExpiration = 0; } remoteConfig.fetch(cacheExpiration) .addOnSuccessListener(aVoid -> { Log.d(TAG, "Fetch succeeded."); remoteConfig.activateFetched(); String colorName = remoteConfig.getString("color"); container.setBackgroundColor(Color.parseColor(colorName)); }) .addOnFailureListener(e -> Log.e(TAG, "Fetch failed.", e)); } "DUJWBUF
private void fetch() { long cacheExpiration = 3600; if (remoteConfig.getInfo().getConfigSettings().isDeveloperModeEnabled())
{ cacheExpiration = 0; } remoteConfig.fetch(cacheExpiration) .addOnSuccessListener(aVoid -> { Log.d(TAG, "Fetch succeeded."); remoteConfig.activateFetched(); String colorName = remoteConfig.getString("color"); container.setBackgroundColor(Color.parseColor(colorName)); }) .addOnFailureListener(e -> Log.e(TAG, "Fetch failed.", e)); } 'BJMVSF$BMMCBDL
$POTPMF
None
None
None
None
"EE$POEJUJPO
None
None
HSBZXIJUF
.VMUJQMF$POEJUJPO
"QQ7FSTJPO
045ZQF
None
)JHI1SJPSJUZ
%SBH%SPQ
1SJPSJUZ
IUUQTpSFCBTFHPPHMFDPNEPDTSFNPUFDPOpH QBSBNFUFSTQBSBNFUFS@WBMVF@QSJPSJUZ
w 4FSWFS4JEF w ෳϚονͨ͠ΒҰ൪্ͷઃఆ w ͳ͚ΕαʔόαΠυͷσϑΥϧτ w $MJFOU4JEF w αʔό͔ΒऔͬͨΩϟογϡ
w ΞϓϦͷσϑΥϧτ
5JQT
.VMUJQMFHPPHMFTFSWJDFTKTPO
#VJME7BSJBOU w BQQTSDCVJME5ZQFqBWPSHPPHMF TFSWJDFTKTPO +VTU8PSLT
4BNQMF$PEF w IUUQTpSFCBTFHPPHMFDPNEPDTSFNPUF DPOpHBOESPJESFRVJSFNFOUT w IUUQTHJUIVCDPNTSZN 3FNPUF$POpH4BNQMF
5IBOLZPV
8FSFIJSJOH IUUQTXXXXBOUFEMZDPNQSPKFDUT