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
DevFest Atlanta - Firebase Remote Config + Fire...
Search
Rebecca Franks
November 12, 2016
Science
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DevFest Atlanta - Firebase Remote Config + Firebase Test Lab
Rebecca Franks
November 12, 2016
More Decks by Rebecca Franks
See All by Rebecca Franks
Custom Drawing in Compose - Londroid December 2022
riggaroo
0
300
Android Studio - What's new 2020
riggaroo
0
180
Getting Started with MotionLayout - Async Android 2020
riggaroo
2
2.5k
Mobile Era 2019 - Tips for Building Custom Views on Android with Canvas APIs
riggaroo
2
360
Over ❤️ Kotlin - How we've used Kotlin to build a Mobile Design App
riggaroo
2
7.1k
Tips for Building Custom Views on Android with Canvas APIs
riggaroo
2
810
In a World of Pure Android Animation 🍭🍫
riggaroo
3
780
Building your Personal Brand - IWD Johannesburg 2019
riggaroo
5
380
How to write a great Conference Proposal - Global CFP Day - Johannesburg 2019
riggaroo
4
600
Other Decks in Science
See All in Science
AI bij literatuuronderzoek in de wetenschap
voginip
0
260
Conversation is the New Dashboard: 属人性を排除する第4世代BIツールの勢力図
shomaekawa
1
680
ハミルトン・ヤコビ方程式の解の性質と物理的意味
enakai00
0
910
From Prediction to Understanding: Causal Discovery for Data Science and AI Applications
sshimizu2006
0
300
O(log n)-Approximation Algorithms for Bipartiteness Ratio
tasusu
0
200
データベース04: SQL (1/3) 単純質問 & 集約演算
trycycle
PRO
0
1.7k
社内で活躍できるデータサイエンティストになるために
aikinohara
1
170
ゲームと人工知能
miyayou
0
200
機械学習 - 決定木からはじめる機械学習
trycycle
PRO
0
1.7k
機械学習 - 授業概要
trycycle
PRO
0
650
Wet Active Matter
rajeshrinet
0
150
Utiliser Bitcoin sans Internet
rlifchitz
0
380
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Balancing Empowerment & Direction
lara
6
1.3k
Deep Space Network (abreviated)
tonyrice
0
320
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
330
The Art of Programming - Codeland 2020
erikaheidi
57
14k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Transcript
Firebase Remote Config & Test Lab Rebecca Franks Google Developer
Expert - Android @riggaroo riggaroo.co.za
Who am I?
None
Firebase Product Offering
Firebase Dev Summit 2016 - Berlin • New Analytics Features
- StreamView / DebugView • Crash Reporting is now out of Beta with new features • Udacity Course - Firebase in a weekend • Lots of other small things
Agenda • Remote Config • Setup & Basic Usage •
Conditions • A/B Testing • Staged Rollouts • Custom Analytics Audiences • Test Lab • Robo Tests • Instrumentation Tests
Remote Config
• Key / Value Pairs saved on Firebase server •
Change behaviour at runtime • No app update required Remote Config
Features • Quickly deploy changes • Customise your app for
segments of user base • Run A/B Tests • Free!
Available for Android iOS
Firebase Server Setup
Android Setup Project Level build.gradle: buildscript { // ... dependencies
{ // ... classpath 'com.google.gms:google-services:3.0.0' } }
Android Setup App Level app/build.gradle: dependencies { // ... compile
'com.google.firebase:firebase-core:9.8.0' compile 'com.google.firebase:firebase-config:9.8.0' } // At the bottom apply plugin: 'com.google.gms.google-services'
Android Setup • Download google-services.json • Place in app/ folder.
• Create remote config defaults file - res/xml/ remote_config.xml <?xml version="1.0" encoding="utf-8"?> <defaultsMap> <entry> <key>welcome_message</key> <value>Hello User!</value> </entry> </defaultsMap>
Initialise Firebase Remote Config remoteConfig = FirebaseRemoteConfig.getInstance(); FirebaseRemoteConfigSettings config =
new FirebaseRemoteConfigSettings.Builder() .setDeveloperModeEnabled(BuildConfig.DEBUG) .build(); remoteConfig.setConfigSettings(config); remoteConfig.setDefaults(R.xml.remote_config);
Fetch remoteConfig.fetch(CACHE_TIME_SECONDS).addOnComplete Listener(new OnCompleteListener<Void>() { }); @Override public void onComplete(@NonNull
Task<Void> task) { if (task.isSuccessful()) { Log.d(TAG, "Fetch Succeeded"); remoteConfig.activateFetched(); } else { Log.d(TAG, "Fetch Failed"); } displayWelcomeMessage(); }
Display void displayWelcomeMessage(){ String helloMessage = remoteConfig.getString("welcome_message"); greetingTextView.setText(helloMessage); }
Demo Android app fetching single remote config value
Types you can store on Remote Config • Strings •
Integers • Booleans • Long • Double • Byte Arrays
Conditions • Powerful decision- making server • Target a group
of app instances • Made up of one or more rules that must evaluate to true
Different greeting per platform?
Demo - No code changes!
Types of Conditionals • OS Type • App ID •
Device in Region or Country • App Version • Language • Audience from Analytics • Random Percentile
How does the app decide what value to use? In-app
default value? Static initialised value No No Yes Yes Parameter value Value fetched from the server?
Priority of Conditionals
A/B Testing & Feature Rollout • Experimenting with your UI
• Different audiences receive different UI
A/B Testing - Server Setup
A/B Testing - Android Setup String experiment = config.getString("experiment_variant"); FirebaseAnalytics.getInstance(this)
.setUserProperty("Experiment", experiment); if (experiment.equals("variant_a")) { //.. } else if (experiment.equals("variant_b")) { //... } else { //.. }
Demo A B No Experiment
Analytics Log your events + track in the Firebase Console
buttonCheckout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { //.. } }); firebaseAnalytics.logEvent(“CheckoutClicked”, new Bundle());
A/B Testing - Analytics
Filter - Variant_A
OR Export to BigQuery
Experiment A - Winner! A
Gradual Feature Rollouts • Leverage “User in Random Percentile” feature
• Gradually increase the value of the percentage • Rollout to more customers as you gain confidence
Create stage rollout condition
Create config using that condition
Gradually increase value
Custom Audiences - Events
Remote Config using Custom Audience
Unsupported App Versions
Unsupported App Versions
Unsupported App Versions void loadAppSupported() { boolean appSupported = remoteConfig.getBoolean("app_supported");
if (!appSupported) { showAppNotSupportedDialog(); } }
Test Lab
What is Firebase Test Lab? • Run tests at Googles
Device Farm • Virtual Devices + Physical Devices • Robo Tests & Custom Instrumentation Tests • Free Tier • 5 tests per day on physical devices • 10 tests per day on virtual devices • Pay per hour
Runs on Android
Why run tests on Firebase? • History of results •
Logs attached to each test • Screenshots & videos • Don’t have to manage your own device farm
Robo Test • Random clicking around in your application +
recording results • No code changes required to run a Robo Test • Uses Monkey Runner
Running Monkey Locally $ adb shell monkey -p your.package.name -v
500 Command line:
Running Monkey on Firebase
Viewing Robo Test Results
Instrumentation Tests • Need to be writing test code •
Espresso • Robotium • UIAutomator
Run Instrumentation Tests Locally • Device / Emulator attached •
Espresso: ./gradlew connectedAndroidTest
Options for running tests • Firebase Console • Command Line
- Using gcloud API • Android Studio
Running Instrumentation Tests in Android Studio
Viewing Test Results
Recap •Remote Config •Getting setup •Using remote config •A/B Testing
+ Gradual Roll outs •Test Lab •Robo Tests •Instrumentation tests
Thank you! Rebecca Franks Google Developer Expert - Android @riggaroo
/ +RebeccaFranksSA riggaroo.co.za
Links Firebase Remote Config - https://firebase.google.com/docs/remote-config/ Firebase Test Lab -
https://firebase.google.com/docs/test-lab/ Testing Support Library - https://developer.android.com/topic/libraries/ testing-support-library/index.html Demo Remote Config Project - https://github.com/riggaroo/remote-config- demo-ssa-launchpad-2016 Demo Test Lab Project - https://github.com/googlesamples/android- testing/tree/master/ui/uiautomator/BasicSample