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=unspecified, firebase_event_origin(_o)=app, firebase_screen_class(_sc)=Main, firebase_screen_id(_si)=-1488012662865927065}] 08-02 13:33:15.766 1591-2140/? D/FA: Logging event (FE): sign_up_female, Bundle[{sign_up_method=unspecified, firebase_event_origin(_o)=app, firebase_screen_class(_sc)=Main, firebase_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

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 anAndroid 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
  • 3.
  • 4.
  • 5.
  • 6.
    MORE MOBILE REFRESH WELLINGTON2018 - 7 SEPTEMBER 2018
  • 7.
  • 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 (Notification, App Indexing, Remote Config, 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 ▸ Loginto 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.
  • 14.
    SETUP AND INTEGRATION ADDFIREBASE TO ANDROID APP
  • 15.
    SETUP AND INTEGRATION ADDFIREBASE TO ANDROID APP
  • 16.
    SETUP AND INTEGRATION ADDFIREBASE TO ANDROID APP
  • 17.
    SETUP AND INTEGRATION ADDFIREBASE TO ANDROID APP
  • 18.
    GOOGLE-SERVICES.JSON (I) ▸ Datafile 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) ▸ Thefile 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
  • 20.
    APP STEP FA 1- ADD LIBRARIES ▸ References to FA libraries in Gradle files ▸ 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 ANALYTICSEVENTS? ▸ 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: ▸ 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
  • 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 ▸ Simpleexample:
 
 
 ▸ 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 ▸ Evenif 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
  • 27.
  • 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 DEBUGGINGYOUR 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=unspecified, firebase_event_origin(_o)=app, firebase_screen_class(_sc)=Main, firebase_screen_id(_si)=-1488012662865927065}] 08-02 13:33:15.766 1591-2140/? D/FA: Logging event (FE): sign_up_female, Bundle[{sign_up_method=unspecified, firebase_event_origin(_o)=app, firebase_screen_class(_sc)=Main, firebase_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 - ACTIVEUSERS FIREBASE ANALYTICS CONSOLE
  • 33.
    DASHBOARD - APPVERSION AND DEVICES FIREBASE ANALYTICS CONSOLE
  • 34.
  • 35.
    DASHBOARD - AGE/GENDERAND 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 OVERTIME FIREBASE ANALYTICS CONSOLE ▸ “How many of the users who installed still use the app after <n> days?”
  • 38.
    USER RETENTION COHORTS FIREBASEANALYTICS CONSOLE ▸ How many of the users who installed still use the app broken down by weeks
  • 39.
    STREAMVIEW - LIVEDASHBOARD FIREBASE ANALYTICS CONSOLE
  • 40.
  • 41.
    FIREBASE CRASHLYTICS PROBLEM ▸ Ourapp 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
  • 47.
  • 48.
    FIREBASE MESSAGING INTRO ▸ Communicatewith a device ▸ Commonly used to send “Push Notifications” ▸ 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 notification on the phone ▸ Icons
  • 53.
  • 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 definition ▸ Add Dao for films ▸ 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 films to the database ▸ Stop manually refreshing the films list onActivityResult ▸ Delete LocalData ▸ Notice we aren’t migrating existing locally saved films
  • 58.
  • 59.
    APP WHY VIEWMODEL? ▸ Doesn’trecreate 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 film list via the ViewModel ▸ Next Step -> List ordering?
  • 61.
  • 62.
    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/
  • 63.
    RESOURCES NEXT STEPS ▸ Udacityonline 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 ▸ Androiddeveloper certifications: ▸ https://home.pearsonvue.com/androidatc ▸ https://developers.google.com/training/certification/associate-android- developer/
  • 66.
  • 67.
  • 68.
    MORE MOBILE REFRESH WELLINGTON2018 - 7 SEPTEMBER 2018
  • 69.
    RESOURCES GET IN TOUCH KaiKoenig Email: kai@ventego-creative.co.nz Twitter: @AgentK Kate Henderson Email: hi@kate.nz Twitter: @Mistyepd