To add Firebase to your app you’ll need a Firebase project and a Firebase configuration file for your app. When prompted, enter your app’s .
In my previous post, Firebase as a Backend, I briefly explained the features of Firebase and what benefits you can have if you use Firebase as your service base. Here, I will explain to you what are the initial steps you should take to start using Firebase for your applications.
Add following line in dependencies of app module
compile 'com.google.firebase:firebase-core:16.0.0'
Add following code at the last of build.gradle for app module
apply plugin : 'com.google.gms.google-services'
Add following code to dependencies of root-level build.gradle
classpath 'com.google.gms:google-services:4.0.1'
Add following code to allprojects section in root-level build.gradle
repositories {
maven {
url "https://maven.google.com"
}
}
These above steps will now link your Firebase Project with Android project. If something does not work, try reinstalling the app. Next question which comes to mind is How to use Database, Storage, etc. in Android Application. For that, I have written separate posts on Database and Storage The following table shows which dependency you should add in order to use respective component.
Feel free to ask anything on Firebase. Do write in comments section below if you are already using Firebase and finding some issues.
#mobile-apps #android