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
Transcript
59 slides
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
More Decks by Rebecca Franks
See All by Rebecca Franks
Custom Drawing in Compose - Londroid December 2022
riggaroo
0
330
Android Studio - What's new 2020
riggaroo
0
200
Getting Started with MotionLayout - Async Android 2020
riggaroo
2
2.6k
Mobile Era 2019 - Tips for Building Custom Views on Android with Canvas APIs
riggaroo
2
380
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
840
In a World of Pure Android Animation 🍭🍫
riggaroo
3
800
Building your Personal Brand - IWD Johannesburg 2019
riggaroo
5
390
How to write a great Conference Proposal - Global CFP Day - Johannesburg 2019
riggaroo
4
620
Other Decks in Science
See All in Science
JPA2026_NetworkSymposium_Shimotsukasa
junkashihara
0
120
白金鉱業Meetup Vol.25 【初学者向け発表枠】「で、この施策って効いてるの」に答える効果検証の基礎 ~ATE / ATT / CATE / LATEを現場の問いに翻訳する~
brainpadpr
1
460
Utiliser Bitcoin sans Internet
rlifchitz
0
460
言葉をはかる:テキストマイニング入門①講義編
satocos135
0
310
知能とはなにか -ヒトとAIのあいだ-
tagtag
PRO
0
200
Path integral polarons for real semiconductors
jarvist
0
130
機械学習 - K-means & 階層的クラスタリング
trycycle
PRO
0
2.4k
生成AI時代のインタラクションサイエンス(招待講演)/interaction-science
okana2ki
0
130
チュートリアル:世界モデル
hf149
0
2.6k
暗号解読における量子計算の展望
neutron63zf
0
500
データベース05: SQL(2/3) 結合質問
trycycle
PRO
0
1.4k
Toward Causal Scientific Discovery with AI
sshimizu2006
0
250
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
480
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
350
Thoughts on Productivity
jonyablonski
76
5.5k
A better future with KSS
kneath
240
18k
Into the Great Unknown - MozCon
thekraken
41
2.8k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
750
Accessibility Awareness
sabderemane
1
300
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
840
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k