Yarden Cohen Yarden Cohen - 1 month ago 15
Android Question

How to upgrade FirebaseListAdapter

I'm following this guide:

https://firebase.google.com/support/guides/firebase-android

I've already upgraded all of my code except the command

FirebaseListAdapter
.

Is there any simple alternative to it? I can't use it on its own because the last input parameter is
Firebase
, and thats no longer available.

Here is my code that I'm stuck with:

adapter = new FirebaseListAdapter<myObject>(this, myObject.class, R.layout.mylist, mRef) {
@Override
protected void populateView(View view, myObject currentOb, int i) {

...

}


but the
mRef
is setup as
DatabaseReference
and not
Firebase ref
as needed for the last input..

Thanks ahead.

Answer

You'll need to upgrade the FirebaseUI library to a version that is compatible with the Firebase SDK that you're using.

The FirebaseUI readme contains this handy table:

FirebaseUI  Firebase/Play 
Version     Services Version
0.6.0       9.6.0
0.5.3       9.4.0
0.4.4       9.4.0
0.4.3       9.2.1
0.4.2       9.2.0
0.4.1       9.0.2
0.4.0       9.0.0
Comments