Upgrade to the new Firebase

Firebase helps simplify app development by providing developers with a backend as a service. Developing backend code requires a lot of effort but now with Firebase developers can concentrate on developing new app features rather than fight with backend code. After Google announced its new Firebase features at Google I/O 2016 there has been a lot of buzz surrounding the new features.

Firebase was well loved for its

Now, Google has made Firebase even better by unleashing even more features

Everything is tied into one neat dashboard where you can manage all the features.

Upgrading

If your an existing Firebase.com user then you can follow the steps here to upgrade your app to the new Firebase console.

Getting started

If your new, follow these steps to get started

Whats new for Android

The new Firebase uses a singleton to check for an existent instance rather than creating a new one each time. Also, we no longer need to call Firebase.setAndroidContext() to initialize Firebase. Before the new upgrades, I used the factory method and singleton to get a unique reference to an instance.

Before

Firebase rootRef = new Firebase("https://<your-app>.firebaseio.com/");

After

DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();

Signing out makes more sense now, instead of

ref.unauth()

It is now just

FirebaseAuth.getInstance().signOut();

Which makes it a lot easier to understand whereas before you would have to lookup the docs to be sure what unauth() does.

Further Reading