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

Building a successful Kids Book App using Firebase

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

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

Transcript

51 slides
  1. Hello Rebecca Franks Android Engineering Lead at DVT Google Developer

    Expert for Android and IoT @riggaroo https://riggaroo.co.za
  2. Book Dash - Features - View books in different languages

    - View a book’s information - Download & read book - Manage downloads - Send App invites
  3. Firebase Realtime Database • Cloud-hosted NoSQL database • Synchronization &

    conflict resolution • Access directly from your app
  4. 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);
 }
  5. 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);
 //..
 }
 }
 //..
 });
  6. Firebase Storage • Easy file storage • Handles poor connectivity

    • Backed by & accessible from Google Cloud Storage
  7. 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<FileDownloadTask.TaskSnapshot>() { @Override public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) { // Local temp file has been created } });
  8. 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
  9. Firebase Notifications • Simple UI, with no coding • Built

    on Cloud Messaging • Audience targeting • Conversion funnel insights
  10. Notifications If Firebase SDK is set up - all you

    need is: compile 'com.google.firebase:firebase-messaging:10.2.0'

  11. 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); }
  12. 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)
  13. 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

More Decks by Rebecca Franks

Other Decks in Technology