Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Firebase training

Firebase training

Talk given at GDG DevFest Nord Italia 2016 in MIlan

Roberto Orgiu

November 12, 2016
Tweet

More Decks by Roberto Orgiu

Other Decks in Programming

Transcript

  1. Who’s speaking? • Android developer since Android 2.2 ~ more

    than 5 years • Speaker, author, gamer ~ nearly 30 years +RobertoOrgiu @_tiwiz [email protected]
  2. ❏ Designed for apps ❏ Event and user centric ❏

    Connects across Firebase ❏ Free & unlimited Firebase Analytics
  3. Firebase services Firebase Analytics Integration Big Query • Access all

    25 event parameters and user properties • Generate custom metrics • Join your Firebase Analytics dataset with data from external sources • Firebase crash reporting • Firebase notification • Firebase Remote Config
  4. Firebase Analytics Why we should like • Free & unlimited

    • Some standard events are logged automatically • Easy setup • Audiences of users • Funnel analysis • All in one console What is missing • No real time view * • Events available after 4 hours * • Only mobile platform • Behavior flow misses Since Firebase Summit
  5. Which should I use? • For app-only companies: use Firebase

    Analytics • For companies that only have a website: use Google Analytics • For companies with both an app and a website: use both Firebase Analytics and Google Analytics with their integration
  6. ❏ Account management ❏ Synch & conflict resolution ❏ Out

    of the box UI ❏ Compatible with most common accounts Firebase Autenthication
  7. Firebase Autenthication User features Identity providers • Google • Facebook

    • Twitter • Github • Represents the account signed in the app • Fixed set of basic properties • Additional custom properties via Realtime database • Firebase Auth instance persists the user's state
  8. Anonymous authentication • Some Firebase services need Authenticated users •

    Use temporary anonymous accounts to authenticate with Firebase • It is always possible convert anonymous user to permanent Account
  9. ❏ Cloud-hosted NoSQL database ❏ Synch & conflict resolution ❏

    Access directly from the app ❏ Freemium service Firebase Realtime Database
  10. Firebase Realtime Database Structured Data • Data are a simple

    JSON tree • Avoiding nesting data • Flatten data structure • Create data that scale { “silvia”: { “item_1”: “Milk”, “item_2”: “Eggs”, “item_3”: “Kale” } }
  11. Firebase Realtime Database Security Rules • Define: ◦ how your

    data should be structured ◦ when data can be read from or written to • Rules type: ◦ .read: Describes if and when data is allowed to be read by users ◦ .write: Describes if and when data is allowed to be written. ◦ .indexOn: Specifies a child to index to support ordering and querying. ◦ .validate: Defines what a correctly formatted value will look like
  12. Firebase Realtime Database Security Rules • Security overview: ◦ Authentication:

    control access to database ◦ Authorization: control access to data ◦ Data validation: check data consistency ◦ Indexes: define indexes for ordering and querying the data
  13. ❏ Easy scalable file storage ❏ Handles poor connectivity ❏

    Backed by & accessible from Google Cloud Storage Firebase Storage
  14. Firebase Storage keylines • Firebase Storage performs uploads and downloads

    regardless of network quality. • Integrates seamlessly with Firebase Authentication to identify users. • Provides a declarative security language. • Files stored in Google Cloud Platform -No Firebase Realtime Database.
  15. Firebase Storage - Storage security rules • determine who has

    read and write access to files stored • determinate how files are structured and what metadata they contain • Rules: the allow rule, which allowsread and write operations // Grants a user access to a node matching their user ID service firebase.storage { match /b/<your-firebase-storage-bucket>/o { // Files look like: "user/<UID>/path/to/file.txt" match /user/{userId}/{allPaths=**} { allow read, write: if request.auth.uid == userId; } } }
  16. ❏ Served over a secure connection ❏ Fast content delivery

    ❏ Rapid deployment ❏ Connect custom domain ❏ Customize hosting behavior Firebase Hosting
  17. ❏ Server side variables - key/value pair ❏ A/B testing

    without deploying ❏ User segmentation via Firebase Analytics & device features Firebase Remote Config
  18. Firebase Remote Config - Rule types ❏ User random percentile

    ❏ OS type ❏ App ID ❏ App version ❏ Device language ❏ Device in region/country ❏ User audiance via Firebase Analytics
  19. ❏ One services for mobile and web client ❏ Versatile

    message targeting ❏ Send messages from client app ❏ Integrates with Firebase Analytics Firebase Notification - FCM
  20. ❏ See crashes & impact ❏ Version & OS drill

    down ❏ Integrate with Firebase Analytics Firebase Crash reporting
  21. Does Firebase crash reporting replace Crashlytics? These two particular tools

    behave correctly together due to their implementations. YES
  22. Firebase Crash reporting Why we should like • Native &

    ordinary crashes displayed • Easy setup - no initialization • Integrated with Firebase analytics • All in one console What is missing • Required Google Play Services • No possible mark as resolved • Search through crashes is not easy. • Impossible to have listener when crash occurs
  23. ❏ Real test automation services ❏ Scaled Infrastructure ❏ Only

    Android devices ❏ Pay as you go Firebase Test lab
  24. ❏ Customize different user experiences via a single URL ❏

    Works across platforms ❏ Preserves URL state, even through app install flow ❏ Analytics insights Firebase Deep links
  25. ❏ Drop widget for sharing ❏ Support SMS & Email

    ❏ Recipient suggestions to the user Firebase App Invites
  26. Share 15% off, for you and friends! Get 15% off

    your first order SEND in action
  27. ❏ promotes app results on Google Search ❏ Associates your

    app and website ❏ Suggested results on the Google app ❏ App Indexing powers Now on Tap’s Firebase App Indexing
  28. ❏ Engaging formats: video, interstitial & native ❏ 1M+ apps

    using AdMob ❏ Integrated with Firebase SDK Firebase AdMob