Step 1: Login into your required Firebase account in browser
Step 2: In Android Studio →Go to Tools →Firebase →An tab named “Assistant” with appear.
Step 3: Click on cloud messaging →Setup Firebase Cloud Messaging
Step 4: Click on button labeled as “Connect to Firebase” then if you want you can create a new Firebase project or select any existing Firebase project, after choosing hit Connect to Firebase button.(As soon as your Android Studio project is connect to your Firebase project button label turns green in color.)
Step 5: Finally click on “Add FCM to your app” →Accept chages.
Now your project is configured with Firebase and you can start coding.