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
みんなでプロポーザルを書いてみた
yuriko1211
0
260
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Outline View in SwiftUI
1024jp
1
330
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
Remix on Hono on Cloudflare Workers
yusukebe
1
290
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
900
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Jakarta EE meets AI
ivargrimstad
0
610
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Jakarta EE meets AI
ivargrimstad
0
540
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Visualization
eitanlees
145
15k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
It's Worth the Effort
3n
183
27k
Code Review Best Practice
trishagee
64
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Happy Clients
brianwarren
98
6.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Making Projects Easy
brettharned
115
5.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