Slide 1

Slide 1 text

REMOTE CONFIG pro tips Ubiratan Soares August / 2017

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

PRO TIPS

Slide 9

Slide 9 text

Attention to tool limits and policies 1

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Do not forget to provide the default values 2

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

// At application setup level FirebaseRemoteConfig .getInstance() .setDefaults(R.xml.remote_config_defaults); ➜ ~/path/to/app/main tree res res !"" xml !"" remote_config_defaults.xml

Slide 14

Slide 14 text

Beware of backward compatibility for configs 3

Slide 15

Slide 15 text

Assign values by build type per config 4

Slide 16

Slide 16 text

Choose the proper activate / fetch strategy for configs 5

Slide 17

Slide 17 text

Default Expires = 12h activateFetched() Async Fetching RemoteConfig SDK ACTUAL VALUES getXYZ() CACHED VALUES fetch(timeToCache)

Slide 18

Slide 18 text

Are the upated values for configs needed right now ?

Slide 19

Slide 19 text

Load values for the next time usage, at application lifecycle level. For non-critical configs

Slide 20

Slide 20 text

If you cannot wait for the next interaction with your app … Can user wait for the actual values for configs at current app section ?

Slide 21

Slide 21 text

Waiting for refresh Fetch and activate using callback and provide the proper visual feedback (usually a blocking, loading screen)

Slide 22

Slide 22 text

If actual config values are critical for feature …

Slide 23

Slide 23 text

Fetch and activate using callback before user interaction with remote- controled feature No delays accepted

Slide 24

Slide 24 text

Find a way to override config`s local caching when needed 6

Slide 25

Slide 25 text

Default Expires = 12h activateFetched() Async Fetching RemoteConfig SDK ACTUAL VALUES getXYZ() CACHED VALUES fetch(timeToCache)

Slide 26

Slide 26 text

Monitor application foreground / background dance and re-fetch with cache invalidation at transition

Slide 27

Slide 27 text

Force a fetch with cache purging + activate using a push notification

Slide 28

Slide 28 text

FINAL REMARKS • RemoteConfig is a great tool for feature-flagging • Deadly simple to integrate with provided SDKs • Beware of basics (default values, limitations, config compatibilities, etc) • Choose the proper fetch+activate strategy for each config

Slide 29

Slide 29 text

UBIRATAN SOARES Computer Scientist by ICMC/USP Software Engineer, curious guy Google Developer Expert for Android Teacher, speaker, etc, etc

Slide 30

Slide 30 text

THANK YOU @ubiratanfsoares ubiratansoares.github.io https://br.linkedin.com/in/ubiratanfsoares