$30 off During Our Annual Pro Sale. View Details »

Building a successful Kids Book App using Firebase

Building a successful Kids Book App using Firebase

In this presentation, Rebecca Franks takes a look at why Firebase was a key aspect to Book Dash Apps success. She gives an introduction to Firebase, and how she is using it within the Book Dash App.

Find Rebecca on Twitter - https://twitter.com/riggaroo

Rebecca Franks

March 31, 2017
Tweet

More Decks by Rebecca Franks

Other Decks in Technology

Transcript

  1. Building a “successful” Kids
    Book App using Firebase
    Rebecca Franks - March 2017

    View Slide

  2. Hello
    Rebecca Franks
    Android Engineering Lead at DVT
    Google Developer Expert for
    Android and IoT
    @riggaroo
    https://riggaroo.co.za

    View Slide

  3. What app am I talking about?

    View Slide

  4. Book Dash

    View Slide

  5. View Slide

  6. Book Dash - Features
    - View books in different languages
    - View a book’s information
    - Download & read book
    - Manage downloads
    - Send App invites

    View Slide

  7. Book Dash
    https://github.com/bookdash/bookdash-android-app
    - Free
    - Open Source
    - Over 200 Books

    View Slide

  8. 4.42
    Correct as of 25 March 2017
    214 reviews

    View Slide

  9. 30,800 Total installs
    10,200 Active installs
    Correct as of 25 March 2017

    View Slide

  10. What made this app successful?

    View Slide

  11. “successful”

    View Slide

  12. Technically successful!
    - getting more users
    - easy enough to develop
    - getting good ratings

    View Slide

  13. Material Design

    View Slide

  14. Simple design with
    simple functionality
    that works.

    View Slide

  15. Beautiful illustrations
    and unique
    African content.

    View Slide

  16. View Slide

  17. What is Firebase?

    View Slide

  18. View Slide

  19. Cross-platform

    View Slide

  20. Integrated

    View Slide

  21. How did I use Firebase?

    View Slide

  22. Which Firebase features did I use?

    View Slide

  23. Book Dash Architecture

    View Slide

  24. Book Dash Architecture

    View Slide

  25. Firebase Realtime Database
    • Cloud-hosted NoSQL database
    • Synchronization & conflict
    resolution
    • Access directly from your app

    View Slide

  26. View Slide

  27. View Slide

  28. Realtime Database - Admin Portal Upload
    function addNewBook(bookName, description, downloadUrl) {

    var bookEntry = {

    bookTitle: bookName,

    bookDescription: description,

    bookUrl: downloadUrl

    };

    var newBookKey = firebase.database().ref().child(‘bd_books').push().key;

    return firebase.database().ref(‘bd_books/' + newBookKey).set(bookEntry);

    }

    View Slide

  29. View Slide

  30. Realtime Database - Android App Read Data
    DatabaseReference dbRef = firebaseDatabase.getReference(“bd_books");

    dbRef.addValueEventListener(new ValueEventListener() {

    @Override

    public void onDataChange(final DataSnapshot dataSnapshot) {

    for (DataSnapshot snap : dataSnapshot.getChildren()) {

    Book bookDetails = snap.getValue(Book.class);

    //..

    }

    }

    //..

    });

    View Slide

  31. Firebase Storage
    • Easy file storage
    • Handles poor
    connectivity
    • Backed by & accessible
    from Google Cloud
    Storage

    View Slide

  32. View Slide

  33. Storage - Android App Download
    StorageReference storageRef = storage.getReference().child("books/a-good-
    book.zip");
    File localFile = File.createTempFile("books", "zip");
    storageRef.getFile(localFile).addOnSuccessListener(new
    OnSuccessListener() {
    @Override
    public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
    // Local temp file has been created
    }
    });

    View Slide

  34. Firebase Hosting
    • Serve static assets
    • SSL by default
    • Custom domains

    View Slide

  35. Hosting
    npm install -g firebase-tools //installs cli tools


    firebase login //will prompt you to login & configure project


    firebase deploy //deploys all files to hosting

    View Slide

  36. View Slide

  37. Firebase Notifications
    • Simple UI, with no coding
    • Built on Cloud
    Messaging
    • Audience targeting
    • Conversion funnel
    insights

    View Slide

  38. Notifications
    If Firebase SDK is set up - all you need is:
    compile 'com.google.firebase:firebase-messaging:10.2.0'


    View Slide

  39. View Slide

  40. View Slide

  41. View Slide

  42. Firebase Analytics
    • Designed for apps
    • Event and user centric
    • Connects across Firebase

    View Slide

  43. Firebase Analytics - Custom Events
    public void trackDownloadBookStarted(Book book) {
    Bundle bundle = new Bundle();
    bundle.putString("book_name", book.getBookTitle());
    bundle.putString("book_id", book.getId());
    FirebaseAnalytics.getInstance(context)
    .logEvent("download_book_started", bundle);
    }

    View Slide

  44. View Slide

  45. Google
    Data Studio
    Export Firebase Analytics events into
    Big Query

    View Slide

  46. View Slide

  47. Quirks to keep in mind
    - Firebase only free up to a certain point
    - Ability to filter data is difficult
    - Structuring your data is important
    - Duplicating data is OKAY
    - Requires Google Play Services dependency (Android)

    View Slide

  48. In Summary - Why I Firebase?
    - Awesome easy to use tools - all in one
    - Super simple to rapidly prototype ideas
    - Cost effective
    - Firebase handles the scaling and infrastructure
    - Constant improvements and updates
    - Great online community with active support from Firebase Team

    View Slide

  49. In Summary
    Material Design + Firebase + Good App
    Idea = A technically successful app!

    View Slide

  50. Questions Rebecca Franks
    @riggaroo
    https://riggaroo.co.za

    View Slide

  51. Links
    - https://riggaroo.co.za
    - https://github.com/bookdash/bookdash-android-app
    - https://material.io/
    - https://firebase.google.com
    - https://www.google.com/analytics/data-studio/

    View Slide