SlideShare uma empresa Scribd logo
1 de 69
Baixar para ler offline
ANDROID 103 - FIREBASE AND
ARCHITECTURE COMPONENTS
KATE HENDERSON & KAI KOENIG
HELLO
HELLO
I’m Kate!
I’m an Android Developer, GDG Organiser, Carpenter
Find me on Twitter: @Mistyepd
and I’m Kai!
I’m a { Software Engineer | Pilot | GDG Organiser | 

Gamer | Dad to 1 cat and 3 chickens | … }
Find me on Twitter: @AgentK
HELLO
CODE
https://github.com/TheRealAgentK/
SummerOfTech-Android-2018
MORE
GDG WELLINGTON
https://www.meetup.com/GDG-Wellington/
MORE
WELLINGTON.KT
https://www.meetup.com/Wellington-kt/
MORE
MOBILE REFRESH WELLINGTON 2018 - 7 SEPTEMBER 2018
FIREBASE ANALYTICS
WHAT IS FIREBASE?
▸ Mobile and web application development platform
▸ Collection of various integrated services
▸ Analytics
▸ Development (Messaging, Auth, RT Database, Storage, Crash Reporting etc)
▸ Grow/Outreach (Notification, App Indexing, Remote Config, Admob etc)
▸ Some free, others commercial
FIREBASE AND FIREBASE ANALYTICS
FIREBASE ANALYTICS
▸ A.k.a. Google Analytics for Firebase
▸ Free analytics and reporting solution
▸ Focus:
▸ General app usage and user demographics
▸ Built-in and custom events
▸ User engagement
FIREBASE AND FIREBASE ANALYTICS
ANALYTICS FEATURES (I)
▸ Max. 500 Events
▸ max. 25 parameters per event
▸ 1 “value” parameter per event
▸ Up to 25 User Properties
▸ Filters
▸ Integration with other Google/Firebase products
FIREBASE AND FIREBASE ANALYTICS
ANALYTICS FEATURES (II)
▸ Dashboard
▸ Audience Segmentation
▸ Conversion/Attribution
▸ Funnels/Cohorts
▸ Streamview (NEW!)
▸ Inferred Data from Google (Play)
FIREBASE AND FIREBASE ANALYTICS
MANUAL SETUP
▸ Login to Firebase console, create a Firebase project
▸ Allows to import existing Google projects, e.g. from Google Cloud Messaging
▸ “Add Firebase to your Android app”
▸ Specify package name of your app
▸ Rinse and repeat for the debug version of your app
SETUP AND INTEGRATION
SETUP AND INTEGRATION
CREATE FIREBASE PROJECT
SETUP AND INTEGRATION
ADD FIREBASE TO ANDROID APP
SETUP AND INTEGRATION
ADD FIREBASE TO ANDROID APP
SETUP AND INTEGRATION
ADD FIREBASE TO ANDROID APP
SETUP AND INTEGRATION
ADD FIREBASE TO ANDROID APP
GOOGLE-SERVICES.JSON (I)
▸ Data file that contains all the information to hook Firebase into your Android
project:
SETUP AND INTEGRATION
{
"project_info": {
"project_number": "45364632432432",
"firebase_url": "https://something.firebaseio.com",
"project_id": "something",
"storage_bucket": "something.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:45364632432432:android:45362432ae",
"android_client_info": {
"package_name": “com.this.is.my.package.app”
}
},
...
GOOGLE-SERVICES.JSON (II)
▸ The file is typically placed in /app
▸ Build flavors:
▸ All in one Firebase project: add more apps to your Firebase setup - 1 file
▸ Each flavor in its own Firebase project: multiple services files, usually placed
in the flavor’s root directory
▸ Firebase Analytics is app-scoped, other Firebase services are project-scoped
SETUP AND INTEGRATION
APP
STEP FA 1 - ADD LIBRARIES
▸ References to FA libraries in Gradle files
▸ When app runs - there should be some FA output in logical
APP
STEP FA 2 - ADD LIBRARIES
▸ Add new Button to DetailActivity
▸ Wire up onClick event handler in Data Binding
▸ When clicked, we “simulate” a purchase (showing a Toast)
WHAT ARE ANALYTICS EVENTS?
▸ System/app or user action that can be tracked
▸ Firebase supports a huge range of built-in events (FirebaseAnalytics.Event)
with built-in parameters (FirebaseAnalytics.Param)
▸ Alternatively: track your own custom events
▸ Logged with:

<firebaseInstance>.logEvent(type, bundle)
▸ General: use built-in events whenever possible!
ANALYTICS EVENTS
BUILT-IN EVENTS (I)
▸ Automatically collected:
▸ first_open, app_update, app_remove etc
▸ Predefined, but not automatically collected:
▸ 4 categories of events: general, retail/commerce, lead generation, gaming
▸ There are predefined parameters, too
▸ Some parameters are mandatory, most data is optional though
ANALYTICS EVENTS
BUILT-IN EVENTS (II)
▸ Simple example:





▸ Create Bundle
▸ Send event type and Bundle object to Firebase
▸ Google recommends to NOT use strings, but the Event/Param constants
ANALYTICS EVENTS
Bundle params = new Bundle();
params.putString("image_name", name);
params.putString("full_text", text);
mFirebaseAnalytics.logEvent("share_image", params);
CUSTOM EVENTS
▸ Simple example:





▸ Come up with whatever you want as event and parameter names
▸ Modify built-in events by adding more parameters
▸ Can be done very informal, but personally I prefer to have typed payload
objects that I validate and then parse into logEvent() calls
ANALYTICS EVENTS
params.putString(“flight_number", flightNumber);
params.putString("destinationAirport", destAP);
mFirebaseAnalytics.logEvent(“flight_selected", params);
EVENT REPORTING
▸ Even if you have NO events you want to track, Firebase Analytics is worthwhile
having for the automatically collected events
▸ On the Firebase Analytics event list, you can set events to be treated as
conversions goals
▸ Some (built-in) events are always treated as conversion
▸ Necessary for funnels and integration with Google Ad Campaigns
ANALYTICS EVENTS
EVENT REPORTING
ANALYTICS EVENTS
APP
STEP FA 3 - ADD CODE FOR PURCHASE EVENT
▸ Track event in onClick handler on DetailViewModel
APP
STEP FA 4 - ADD CODE FOR “ACHIEVEMENT” EVENT
▸ When users add new movies we now track an event in FA
BEHIND THE SCENES
▸ Firebase SDK in your app logs an event or changes a user property
▸ Data gets saved locally on the device
▸ Google Play services on the device then once per hour post the collected data
to the Firebase backend to save processing power and battery
▸ Android: once per hour for all apps
▸ iOS: once per hour for each each
▸ Conversion events trigger a batch upload instantly
SETUP AND INTEGRATION
TESTING AND DEBUGGING YOUR INTEGRATION
▸ Real-time/local via ADB, with a 24hr delay in the FA console or via Streamview:
SETUP AND INTEGRATION
08-02 13:33:15.607 1591-2140/? D/FA: Logging event (FE): sign_up, Bundle[{sign_up_method=unspecied,
rebase_event_origin(_o)=app, rebase_screen_class(_sc)=Main, rebase_screen_id(_si)=-1488012662865927065}]
08-02 13:33:15.766 1591-2140/? D/FA: Logging event (FE): sign_up_female, Bundle[{sign_up_method=unspecied,
rebase_event_origin(_o)=app, rebase_screen_class(_sc)=Main, rebase_screen_id(_si)=-1488012662865927065}]
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
DASHBOARD - ACTIVE USERS
FIREBASE ANALYTICS CONSOLE
DASHBOARD - APP VERSION AND DEVICES
FIREBASE ANALYTICS CONSOLE
DASHBOARD - COUNTRY
FIREBASE ANALYTICS CONSOLE
DASHBOARD - AGE/GENDER AND INTEREST
FIREBASE ANALYTICS CONSOLE
FUNNELS
FIREBASE ANALYTICS CONSOLE
▸ Chain of events, funnel tracks the retention of users
▸ “How many of the users who install, sign_up for free and eventually buy a
membership?”
USER RETENTION OVER TIME
FIREBASE ANALYTICS CONSOLE
▸ “How many of the users who installed still use the app after <n> days?”
USER RETENTION COHORTS
FIREBASE ANALYTICS CONSOLE
▸ How many of the users who installed still use the app broken down by weeks
STREAMVIEW - LIVE DASHBOARD
FIREBASE ANALYTICS CONSOLE
FIREBASE CRASHLYTICS
FIREBASE CRASHLYTICS
PROBLEM
▸ Our app runs on thousands of devices out there
▸ How can we get information on what happens on user’s devices?
▸ Crashes, Exceptions, Errors, Slowness etc
▸ Crashlytics tracks errors and crashes for you
▸ Note: distributing your app in Google Play will also give you bug/crash
statistics - they can have an influence on your Play store ranking
APP
STEP FC 1 - ADD LIBRARIES
▸ Adding the libraries to Gradle
▸ Starts logging fatal errors right away (see in logcat)
APP
STEP FC 2 - ADD A BUTTON TO CRASH THE APP
▸ New Button on DetailView
▸ Crashlytics.getInstance().crash() - simulates a proper app crash
APP
STEP FC 2 - ADD A BUTTON TO CRASH THE APP
▸ New Button on DetailView
▸ Crashlytics.getInstance().crash() - simulates a proper app crash
APP
STEP FC 3 - ADDING AN APPLICATION CLASS AND STARTING CRASHLYTICS
▸ A custom application class allows you access to the application lifecycle
▸ Setup in Manifest, inherit from an Application or AppCompat class
▸ Launching Crashlytics manually to enable debugging
▸ Create an exception (Division by Zero) and deal with it in try/catch
APP
STEP FC 4 - CLEANUP
▸ Just cleanup the manually fabricated exception
FIREBASE MESSAGING
FIREBASE MESSAGING
INTRO
▸ Communicate with a device
▸ Commonly used to send “Push Notifications”
▸ Requires 2 services
▸ Messaging Service
▸ ID Service
▸ Device Token used to push to a particular device
APP
STEP FN 1 - LIBRARIES
▸ Adding the libraries to Gradle
APP
STEP FN 2 - ID SERVICE
▸ Adding 2 services to Manifest
▸ onTokenRefresh in ID Service
APP
STEP FN 3 - MESSAGING SERVICE
▸ Implementation of Messaging service
▸ Difference between immediate handling of message and job scheduling
APP
STEP FN 4 - NOTIFICATION
▸ Showing a notification on the phone
▸ Icons
ROOM AND
ARCHITECTURE
COMPONENTS
APP
STEP AC 1 - ENTITIES
▸ Add all the room gradle dependencies
▸ Convert Film to a Entity
▸ Annotations we use
▸ @Entity
▸ @ColumnInfo
▸ @PrimaryKey
APP
STEP AC 2 - MAKE ROOM FOR EVERYTHING
▸ Realise I made a mistake in step 1 (annotationProcessor vs kapt)
▸ Create a DataManager to use the same database instance everywhere
▸ Add abstract Database definition
▸ Add Dao for films
▸ More annotations!!!
APP
STEP AC 3 - USE DATAMANAGER FOR OFFLINE REMOTE DATA
▸ Use DataManager in the MainActivity to fetch the remote list and update the
database
▸ Observe the LiveData
▸ Still manually combining local and remote lists
APP
STEP AC 4 - USE DATAMANAGER FOR LOCAL DATA
▸ Let DataManger save local films to the database
▸ Stop manually refreshing the films list onActivityResult
▸ Delete LocalData
▸ Notice we aren’t migrating existing locally saved films
VIEWMODEL
APP
WHY VIEWMODEL?
▸ Doesn’t recreate everything on rotate
▸ Google supported
▸ Separation of logic and data from the
activity
APP
STEP AC 5 - VIEWMODEL (THE GOOGLE VERSION)
▸ Create ViewModel with lazy{ }
▸ Move DataManager calls into ViewModel
▸ Observe the film list via the ViewModel
▸ Next Step -> List ordering?
RESOURCES
RESOURCES
RESOURCES
▸ Firebase: https://firebase.google.com/
▸ Firebase in a weekend: https://www.udacity.com/course/firebase-in-a-
weekend-by-google-android--ud0352
▸ Architecture components: https://developer.android.com/topic/libraries/
architecture/
RESOURCES
NEXT STEPS
▸ Udacity online courses:
▸ https://www.udacity.com/courses/android
▸ Android Basics Nanodegree: https://www.udacity.com/course/android-
basics-nanodegree-by-google--nd803
▸ Android Developer Nanodegree: https://www.udacity.com/course/android-
developer-nanodegree-by-google--nd801
RESOURCES
NEXT STEPS
▸ Books:
▸ Kotlin: https://kotlinlang.org/docs/books.html
▸ Android: Soooooo many. Make sure you buy something that is current (at
least for Android 7, better for 8)
RESOURCES
NEXT STEPS
▸ Android developer certifications:
▸ https://home.pearsonvue.com/androidatc
▸ https://developers.google.com/training/certification/associate-android-
developer/
MORE
GDG WELLINGTON
https://www.meetup.com/GDG-Wellington/
MORE
WELLINGTON.KT
https://www.meetup.com/Wellington-kt/
MORE
MOBILE REFRESH WELLINGTON 2018 - 7 SEPTEMBER 2018
RESOURCES
GET IN TOUCH
Kai Koenig
Email: kai@ventego-creative.co.nz
Twitter: @AgentK
Kate Henderson
Email: hi@kate.nz
Twitter: @Mistyepd

Mais conteĂşdo relacionado

Mais procurados

Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelAtlassian
 
Google analytics
Google analyticsGoogle analytics
Google analyticsSean Tsai
 
Splunk bangalore user group 2020 08 01
Splunk bangalore user group 2020 08 01Splunk bangalore user group 2020 08 01
Splunk bangalore user group 2020 08 01NiketNilay
 
Serverless Security: Are you ready for the Future?
Serverless Security: Are you ready for the Future?Serverless Security: Are you ready for the Future?
Serverless Security: Are you ready for the Future?James Wickett
 
How to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup MunichHow to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup MunichJĂźrgen Etzlstorfer
 
Let's your users share your App with Friends: App Invites for Android
 Let's your users share your App with Friends: App Invites for Android Let's your users share your App with Friends: App Invites for Android
Let's your users share your App with Friends: App Invites for AndroidWilfried Mbouenda Mbogne
 
Surviving Serverless in Real-Life
Surviving Serverless in Real-LifeSurviving Serverless in Real-Life
Surviving Serverless in Real-LifeOPEN KNOWLEDGE GmbH
 
Monitoring as a Self-Service in Atlassian DevOps Toolchain
Monitoring as a Self-Service in Atlassian DevOps ToolchainMonitoring as a Self-Service in Atlassian DevOps Toolchain
Monitoring as a Self-Service in Atlassian DevOps ToolchainAndreas Grabner
 
Twitter APIs for #MediaHackday
Twitter APIs for #MediaHackdayTwitter APIs for #MediaHackday
Twitter APIs for #MediaHackdayAndy Piper
 
Laurentiu macovei meteor. a better way of building apps
Laurentiu macovei   meteor. a better way of building appsLaurentiu macovei   meteor. a better way of building apps
Laurentiu macovei meteor. a better way of building appsCodecamp Romania
 
I Love APIs 2015: Continuous Integration the Virtuous Cycle
I Love APIs 2015: Continuous Integration the Virtuous CycleI Love APIs 2015: Continuous Integration the Virtuous Cycle
I Love APIs 2015: Continuous Integration the Virtuous CycleApigee | Google Cloud
 
API Creation to Iteration without the Frustration
API Creation to Iteration without the FrustrationAPI Creation to Iteration without the Frustration
API Creation to Iteration without the FrustrationNordic APIs
 
DevOps.2D: two dimensions
of engineering
DevOps.2D: two dimensions
of  engineeringDevOps.2D: two dimensions
of  engineering
DevOps.2D: two dimensions
of engineeringAntons Kranga
 
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017Matt Raible
 

Mais procurados (14)

Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Google analytics
Google analyticsGoogle analytics
Google analytics
 
Splunk bangalore user group 2020 08 01
Splunk bangalore user group 2020 08 01Splunk bangalore user group 2020 08 01
Splunk bangalore user group 2020 08 01
 
Serverless Security: Are you ready for the Future?
Serverless Security: Are you ready for the Future?Serverless Security: Are you ready for the Future?
Serverless Security: Are you ready for the Future?
 
How to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup MunichHow to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup Munich
 
Let's your users share your App with Friends: App Invites for Android
 Let's your users share your App with Friends: App Invites for Android Let's your users share your App with Friends: App Invites for Android
Let's your users share your App with Friends: App Invites for Android
 
Surviving Serverless in Real-Life
Surviving Serverless in Real-LifeSurviving Serverless in Real-Life
Surviving Serverless in Real-Life
 
Monitoring as a Self-Service in Atlassian DevOps Toolchain
Monitoring as a Self-Service in Atlassian DevOps ToolchainMonitoring as a Self-Service in Atlassian DevOps Toolchain
Monitoring as a Self-Service in Atlassian DevOps Toolchain
 
Twitter APIs for #MediaHackday
Twitter APIs for #MediaHackdayTwitter APIs for #MediaHackday
Twitter APIs for #MediaHackday
 
Laurentiu macovei meteor. a better way of building apps
Laurentiu macovei   meteor. a better way of building appsLaurentiu macovei   meteor. a better way of building apps
Laurentiu macovei meteor. a better way of building apps
 
I Love APIs 2015: Continuous Integration the Virtuous Cycle
I Love APIs 2015: Continuous Integration the Virtuous CycleI Love APIs 2015: Continuous Integration the Virtuous Cycle
I Love APIs 2015: Continuous Integration the Virtuous Cycle
 
API Creation to Iteration without the Frustration
API Creation to Iteration without the FrustrationAPI Creation to Iteration without the Frustration
API Creation to Iteration without the Frustration
 
DevOps.2D: two dimensions
of engineering
DevOps.2D: two dimensions
of  engineeringDevOps.2D: two dimensions
of  engineering
DevOps.2D: two dimensions
of engineering
 
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017 Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
Bootiful Development with Spring Boot and Angular - Connect.Tech 2017
 

Semelhante a Android 103 - Firebase and Architecture Components

Introduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted ConfIntroduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted ConfIn Marketing We Trust
 
(Micro?)services architecture in practice
(Micro?)services architecture in practice(Micro?)services architecture in practice
(Micro?)services architecture in practiceThe Software House
 
Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...Zeeshan Rahman
 
Urban Airship & Android Application Integration Document
Urban Airship & Android Application Integration DocumentUrban Airship & Android Application Integration Document
Urban Airship & Android Application Integration Documentmobi fly
 
Salesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any PlatformSalesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any Platformandyinthecloud
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for LaunchCraig Phares
 
Offline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and ReactOffline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and ReactIlia Idakiev
 
Write once, ship multiple times
Write once, ship multiple timesWrite once, ship multiple times
Write once, ship multiple timesŽeljko Plesac
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoDaniel Zivkovic
 
What is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays FinlandWhat is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays FinlandMaarten Balliauw
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015MobileMoxie
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Suzzicks
 
Cloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcoreCloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcoreDavid Saitta
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Sittiphol Phanvilai
 
iPhone App Development
iPhone App Development iPhone App Development
iPhone App Development ManekTech
 
Mobile app development
Mobile app developmentMobile app development
Mobile app developmentManekTech
 
Swift Development
Swift DevelopmentSwift Development
Swift DevelopmentManekTech
 

Semelhante a Android 103 - Firebase and Architecture Components (20)

Introduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted ConfIntroduction to Digital Analytics for Apps - Trusted Conf
Introduction to Digital Analytics for Apps - Trusted Conf
 
(Micro?)services architecture in practice
(Micro?)services architecture in practice(Micro?)services architecture in practice
(Micro?)services architecture in practice
 
Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...Urban Airship and Android Integration for Push Notification and In-App Notifi...
Urban Airship and Android Integration for Push Notification and In-App Notifi...
 
Urban Airship & Android Application Integration Document
Urban Airship & Android Application Integration DocumentUrban Airship & Android Application Integration Document
Urban Airship & Android Application Integration Document
 
Salesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any PlatformSalesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any Platform
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for Launch
 
Google Assistant Revolution
Google Assistant RevolutionGoogle Assistant Revolution
Google Assistant Revolution
 
Offline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and ReactOffline progressive web apps with NodeJS and React
Offline progressive web apps with NodeJS and React
 
Write once, ship multiple times
Write once, ship multiple timesWrite once, ship multiple times
Write once, ship multiple times
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in Toronto
 
What is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays FinlandWhat is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays Finland
 
React Native
React NativeReact Native
React Native
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
 
Cloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcoreCloud web applications: the new perspective of sproutcore
Cloud web applications: the new perspective of sproutcore
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
 
iPhone App Development
iPhone App Development iPhone App Development
iPhone App Development
 
Mobile app development
Mobile app developmentMobile app development
Mobile app development
 
Swift Development
Swift DevelopmentSwift Development
Swift Development
 

Mais de Kai Koenig

Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Kai Koenig
 
Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsKai Koenig
 
Android 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesAndroid 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesKai Koenig
 
Kotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKai Koenig
 
Kotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKai Koenig
 
Improving your CFML code quality
Improving your CFML code qualityImproving your CFML code quality
Improving your CFML code qualityKai Koenig
 
Summer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcampSummer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcampKai Koenig
 
2017: Kotlin - now more than ever
2017: Kotlin - now more than ever2017: Kotlin - now more than ever
2017: Kotlin - now more than everKai Koenig
 
Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?Kai Koenig
 
Coding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinCoding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinKai Koenig
 
API management with Taffy and API Blueprint
API management with Taffy and API BlueprintAPI management with Taffy and API Blueprint
API management with Taffy and API BlueprintKai Koenig
 
Little Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinLittle Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinKai Koenig
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data MiningKai Koenig
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and youKai Koenig
 
Real World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileReal World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileKai Koenig
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friendKai Koenig
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101Kai Koenig
 
There's a time and a place
There's a time and a placeThere's a time and a place
There's a time and a placeKai Koenig
 
Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Kai Koenig
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developersKai Koenig
 

Mais de Kai Koenig (20)

Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones
 
Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other things
 
Android 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesAndroid 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutes
 
Kotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 version
 
Kotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a tree
 
Improving your CFML code quality
Improving your CFML code qualityImproving your CFML code quality
Improving your CFML code quality
 
Summer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcampSummer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcamp
 
2017: Kotlin - now more than ever
2017: Kotlin - now more than ever2017: Kotlin - now more than ever
2017: Kotlin - now more than ever
 
Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?
 
Coding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinCoding for Android on steroids with Kotlin
Coding for Android on steroids with Kotlin
 
API management with Taffy and API Blueprint
API management with Taffy and API BlueprintAPI management with Taffy and API Blueprint
API management with Taffy and API Blueprint
 
Little Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinLittle Helpers for Android Development with Kotlin
Little Helpers for Android Development with Kotlin
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data Mining
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and you
 
Real World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileReal World Lessons in jQuery Mobile
Real World Lessons in jQuery Mobile
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friend
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101
 
There's a time and a place
There's a time and a placeThere's a time and a place
There's a time and a place
 
Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developers
 

Último

Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 

Último (20)

Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 

Android 103 - Firebase and Architecture Components

  • 1. ANDROID 103 - FIREBASE AND ARCHITECTURE COMPONENTS KATE HENDERSON & KAI KOENIG
  • 2. HELLO HELLO I’m Kate! I’m an Android Developer, GDG Organiser, Carpenter Find me on Twitter: @Mistyepd and I’m Kai! I’m a { Software Engineer | Pilot | GDG Organiser | 
 Gamer | Dad to 1 cat and 3 chickens | … } Find me on Twitter: @AgentK
  • 6. MORE MOBILE REFRESH WELLINGTON 2018 - 7 SEPTEMBER 2018
  • 8. WHAT IS FIREBASE? ▸ Mobile and web application development platform ▸ Collection of various integrated services ▸ Analytics ▸ Development (Messaging, Auth, RT Database, Storage, Crash Reporting etc) ▸ Grow/Outreach (Notication, App Indexing, Remote Cong, Admob etc) ▸ Some free, others commercial FIREBASE AND FIREBASE ANALYTICS
  • 9. FIREBASE ANALYTICS ▸ A.k.a. Google Analytics for Firebase ▸ Free analytics and reporting solution ▸ Focus: ▸ General app usage and user demographics ▸ Built-in and custom events ▸ User engagement FIREBASE AND FIREBASE ANALYTICS
  • 10. ANALYTICS FEATURES (I) ▸ Max. 500 Events ▸ max. 25 parameters per event ▸ 1 “value” parameter per event ▸ Up to 25 User Properties ▸ Filters ▸ Integration with other Google/Firebase products FIREBASE AND FIREBASE ANALYTICS
  • 11. ANALYTICS FEATURES (II) ▸ Dashboard ▸ Audience Segmentation ▸ Conversion/Attribution ▸ Funnels/Cohorts ▸ Streamview (NEW!) ▸ Inferred Data from Google (Play) FIREBASE AND FIREBASE ANALYTICS
  • 12. MANUAL SETUP ▸ Login to Firebase console, create a Firebase project ▸ Allows to import existing Google projects, e.g. from Google Cloud Messaging ▸ “Add Firebase to your Android app” ▸ Specify package name of your app ▸ Rinse and repeat for the debug version of your app SETUP AND INTEGRATION
  • 13. SETUP AND INTEGRATION CREATE FIREBASE PROJECT
  • 14. SETUP AND INTEGRATION ADD FIREBASE TO ANDROID APP
  • 15. SETUP AND INTEGRATION ADD FIREBASE TO ANDROID APP
  • 16. SETUP AND INTEGRATION ADD FIREBASE TO ANDROID APP
  • 17. SETUP AND INTEGRATION ADD FIREBASE TO ANDROID APP
  • 18. GOOGLE-SERVICES.JSON (I) ▸ Data le that contains all the information to hook Firebase into your Android project: SETUP AND INTEGRATION { "project_info": { "project_number": "45364632432432", "firebase_url": "https://something.firebaseio.com", "project_id": "something", "storage_bucket": "something.appspot.com" }, "client": [ { "client_info": { "mobilesdk_app_id": "1:45364632432432:android:45362432ae", "android_client_info": { "package_name": “com.this.is.my.package.app” } }, ...
  • 19. GOOGLE-SERVICES.JSON (II) ▸ The le is typically placed in /app ▸ Build flavors: ▸ All in one Firebase project: add more apps to your Firebase setup - 1 le ▸ Each flavor in its own Firebase project: multiple services les, usually placed in the flavor’s root directory ▸ Firebase Analytics is app-scoped, other Firebase services are project-scoped SETUP AND INTEGRATION
  • 20. APP STEP FA 1 - ADD LIBRARIES ▸ References to FA libraries in Gradle les ▸ When app runs - there should be some FA output in logical
  • 21. APP STEP FA 2 - ADD LIBRARIES ▸ Add new Button to DetailActivity ▸ Wire up onClick event handler in Data Binding ▸ When clicked, we “simulate” a purchase (showing a Toast)
  • 22. WHAT ARE ANALYTICS EVENTS? ▸ System/app or user action that can be tracked ▸ Firebase supports a huge range of built-in events (FirebaseAnalytics.Event) with built-in parameters (FirebaseAnalytics.Param) ▸ Alternatively: track your own custom events ▸ Logged with:
 <firebaseInstance>.logEvent(type, bundle) ▸ General: use built-in events whenever possible! ANALYTICS EVENTS
  • 23. BUILT-IN EVENTS (I) ▸ Automatically collected: ▸ rst_open, app_update, app_remove etc ▸ Predened, but not automatically collected: ▸ 4 categories of events: general, retail/commerce, lead generation, gaming ▸ There are predened parameters, too ▸ Some parameters are mandatory, most data is optional though ANALYTICS EVENTS
  • 24. BUILT-IN EVENTS (II) ▸ Simple example:
 
 
 ▸ Create Bundle ▸ Send event type and Bundle object to Firebase ▸ Google recommends to NOT use strings, but the Event/Param constants ANALYTICS EVENTS Bundle params = new Bundle(); params.putString("image_name", name); params.putString("full_text", text); mFirebaseAnalytics.logEvent("share_image", params);
  • 25. CUSTOM EVENTS ▸ Simple example:
 
 
 ▸ Come up with whatever you want as event and parameter names ▸ Modify built-in events by adding more parameters ▸ Can be done very informal, but personally I prefer to have typed payload objects that I validate and then parse into logEvent() calls ANALYTICS EVENTS params.putString(“flight_number", flightNumber); params.putString("destinationAirport", destAP); mFirebaseAnalytics.logEvent(“flight_selected", params);
  • 26. EVENT REPORTING ▸ Even if you have NO events you want to track, Firebase Analytics is worthwhile having for the automatically collected events ▸ On the Firebase Analytics event list, you can set events to be treated as conversions goals ▸ Some (built-in) events are always treated as conversion ▸ Necessary for funnels and integration with Google Ad Campaigns ANALYTICS EVENTS
  • 28. APP STEP FA 3 - ADD CODE FOR PURCHASE EVENT ▸ Track event in onClick handler on DetailViewModel
  • 29. APP STEP FA 4 - ADD CODE FOR “ACHIEVEMENT” EVENT ▸ When users add new movies we now track an event in FA
  • 30. BEHIND THE SCENES ▸ Firebase SDK in your app logs an event or changes a user property ▸ Data gets saved locally on the device ▸ Google Play services on the device then once per hour post the collected data to the Firebase backend to save processing power and battery ▸ Android: once per hour for all apps ▸ iOS: once per hour for each each ▸ Conversion events trigger a batch upload instantly SETUP AND INTEGRATION
  • 31. TESTING AND DEBUGGING YOUR INTEGRATION ▸ Real-time/local via ADB, with a 24hr delay in the FA console or via Streamview: SETUP AND INTEGRATION 08-02 13:33:15.607 1591-2140/? D/FA: Logging event (FE): sign_up, Bundle[{sign_up_method=unspecied, rebase_event_origin(_o)=app, rebase_screen_class(_sc)=Main, rebase_screen_id(_si)=-1488012662865927065}] 08-02 13:33:15.766 1591-2140/? D/FA: Logging event (FE): sign_up_female, Bundle[{sign_up_method=unspecied, rebase_event_origin(_o)=app, rebase_screen_class(_sc)=Main, rebase_screen_id(_si)=-1488012662865927065}] adb shell setprop log.tag.FA VERBOSE adb shell setprop log.tag.FA-SVC VERBOSE adb logcat -v time -s FA FA-SVC
  • 32. DASHBOARD - ACTIVE USERS FIREBASE ANALYTICS CONSOLE
  • 33. DASHBOARD - APP VERSION AND DEVICES FIREBASE ANALYTICS CONSOLE
  • 34. DASHBOARD - COUNTRY FIREBASE ANALYTICS CONSOLE
  • 35. DASHBOARD - AGE/GENDER AND INTEREST FIREBASE ANALYTICS CONSOLE
  • 36. FUNNELS FIREBASE ANALYTICS CONSOLE ▸ Chain of events, funnel tracks the retention of users ▸ “How many of the users who install, sign_up for free and eventually buy a membership?”
  • 37. USER RETENTION OVER TIME FIREBASE ANALYTICS CONSOLE ▸ “How many of the users who installed still use the app after <n> days?”
  • 38. USER RETENTION COHORTS FIREBASE ANALYTICS CONSOLE ▸ How many of the users who installed still use the app broken down by weeks
  • 39. STREAMVIEW - LIVE DASHBOARD FIREBASE ANALYTICS CONSOLE
  • 41. FIREBASE CRASHLYTICS PROBLEM ▸ Our app runs on thousands of devices out there ▸ How can we get information on what happens on user’s devices? ▸ Crashes, Exceptions, Errors, Slowness etc ▸ Crashlytics tracks errors and crashes for you ▸ Note: distributing your app in Google Play will also give you bug/crash statistics - they can have an influence on your Play store ranking
  • 42. APP STEP FC 1 - ADD LIBRARIES ▸ Adding the libraries to Gradle ▸ Starts logging fatal errors right away (see in logcat)
  • 43. APP STEP FC 2 - ADD A BUTTON TO CRASH THE APP ▸ New Button on DetailView ▸ Crashlytics.getInstance().crash() - simulates a proper app crash
  • 44. APP STEP FC 2 - ADD A BUTTON TO CRASH THE APP ▸ New Button on DetailView ▸ Crashlytics.getInstance().crash() - simulates a proper app crash
  • 45. APP STEP FC 3 - ADDING AN APPLICATION CLASS AND STARTING CRASHLYTICS ▸ A custom application class allows you access to the application lifecycle ▸ Setup in Manifest, inherit from an Application or AppCompat class ▸ Launching Crashlytics manually to enable debugging ▸ Create an exception (Division by Zero) and deal with it in try/catch
  • 46. APP STEP FC 4 - CLEANUP ▸ Just cleanup the manually fabricated exception
  • 48. FIREBASE MESSAGING INTRO ▸ Communicate with a device ▸ Commonly used to send “Push Notications” ▸ Requires 2 services ▸ Messaging Service ▸ ID Service ▸ Device Token used to push to a particular device
  • 49. APP STEP FN 1 - LIBRARIES ▸ Adding the libraries to Gradle
  • 50. APP STEP FN 2 - ID SERVICE ▸ Adding 2 services to Manifest ▸ onTokenRefresh in ID Service
  • 51. APP STEP FN 3 - MESSAGING SERVICE ▸ Implementation of Messaging service ▸ Difference between immediate handling of message and job scheduling
  • 52. APP STEP FN 4 - NOTIFICATION ▸ Showing a notication on the phone ▸ Icons
  • 54. APP STEP AC 1 - ENTITIES ▸ Add all the room gradle dependencies ▸ Convert Film to a Entity ▸ Annotations we use ▸ @Entity ▸ @ColumnInfo ▸ @PrimaryKey
  • 55. APP STEP AC 2 - MAKE ROOM FOR EVERYTHING ▸ Realise I made a mistake in step 1 (annotationProcessor vs kapt) ▸ Create a DataManager to use the same database instance everywhere ▸ Add abstract Database denition ▸ Add Dao for lms ▸ More annotations!!!
  • 56. APP STEP AC 3 - USE DATAMANAGER FOR OFFLINE REMOTE DATA ▸ Use DataManager in the MainActivity to fetch the remote list and update the database ▸ Observe the LiveData ▸ Still manually combining local and remote lists
  • 57. APP STEP AC 4 - USE DATAMANAGER FOR LOCAL DATA ▸ Let DataManger save local lms to the database ▸ Stop manually refreshing the lms list onActivityResult ▸ Delete LocalData ▸ Notice we aren’t migrating existing locally saved lms
  • 59. APP WHY VIEWMODEL? ▸ Doesn’t recreate everything on rotate ▸ Google supported ▸ Separation of logic and data from the activity
  • 60. APP STEP AC 5 - VIEWMODEL (THE GOOGLE VERSION) ▸ Create ViewModel with lazy{ } ▸ Move DataManager calls into ViewModel ▸ Observe the lm list via the ViewModel ▸ Next Step -> List ordering?
  • 62. RESOURCES RESOURCES ▸ Firebase: https://rebase.google.com/ ▸ Firebase in a weekend: https://www.udacity.com/course/rebase-in-a- weekend-by-google-android--ud0352 ▸ Architecture components: https://developer.android.com/topic/libraries/ architecture/
  • 63. RESOURCES NEXT STEPS ▸ Udacity online courses: ▸ https://www.udacity.com/courses/android ▸ Android Basics Nanodegree: https://www.udacity.com/course/android- basics-nanodegree-by-google--nd803 ▸ Android Developer Nanodegree: https://www.udacity.com/course/android- developer-nanodegree-by-google--nd801
  • 64. RESOURCES NEXT STEPS ▸ Books: ▸ Kotlin: https://kotlinlang.org/docs/books.html ▸ Android: Soooooo many. Make sure you buy something that is current (at least for Android 7, better for 8)
  • 65. RESOURCES NEXT STEPS ▸ Android developer certications: ▸ https://home.pearsonvue.com/androidatc ▸ https://developers.google.com/training/certication/associate-android- developer/
  • 68. MORE MOBILE REFRESH WELLINGTON 2018 - 7 SEPTEMBER 2018
  • 69. RESOURCES GET IN TOUCH Kai Koenig Email: kai@ventego-creative.co.nz Twitter: @AgentK Kate Henderson Email: hi@kate.nz Twitter: @Mistyepd