Deep Dive into the Realtime Database - Google I/O 2016

Firebase · 41K views · 2016 · 20:48

Open on YouTube

Web developmentDatabases & storageSoftware (other)talkdated

Why Stack Overflow recommends it

Stack Overflow users link it when asking about Firebase Realtime Database behavior such as offline persistence and listener patterns in Android and JavaScript apps.

Recommended by 1 people across 1 different months, 2016 to 2019.

What it is

A 20-minute Google I/O 2016 session in which Firebase developer advocate David East explains how the Firebase Realtime Database works. It covers speed, security rules and offline support, with examples across Android, iOS and the web.

What people said

Recommends srinij · 2019-11 · Stack Overflow · on “Firebase Realtime Database, ListAdapter, DiffUtil and ViewModel”

So I figured this out by doing the following in my ViewModel . private val _message = MutableLiveData<List<TextListModel>>() val message: LiveData<List<TextListModel>> get() = _message //... private val eventListener = object : ValueEventListener { override fun onCancelled(databaseError: DatabaseError) { Timber.e("Error!! ${databaseError.toException()}") } override fun onDataChange(dataSnapshot: DataSnapshot) { val listOfMessages : MutableList<TextListModel> = mutableListOf() for(msg in dataSnapshot.children) { val item = msg.getValue(TextListModel::class.java) listOfMessages.add(item!!) } _message.value = listOfMessages } } In my fragment I observe message and perform adapter.submitList(new

Cites Artem Svirskyi · 2016-06 · Stack Overflow · on “Persistance enabled in javascript firebase”

Just watched Deep Dive into the Realtime Database [this video] . And Im wondering, is there a standard way to persist data in JavaScript? To store data in localStorage, if the user is offline and then closes the app.

Cites Nominalista · 2016-12 · Stack Overflow · on “ValueEventListener vs ChildEventListener for RecyclerView in Android”

Firebase Database users know that there are two basic listeners for listening Data: ValueEventListener and ChildEventListener . It works great when we listen for one object, but becomes quite difficult when we listen for some collection. To specify question, let's imagine that we have HackerNews feed, and we listen e.g. "posts" object in Firebase. Of course we have RecyclerView in our app for displaying posts and I think good idea would be using FirebaseUI, but the problem is that we want to make more abstract application in case of changing server side or tests. So we would use some adapters, but this is another question [LINK] . We have two listeners as I mentioned, question is which is be