Firebase Integration
#
Integrate FireBase to the ApplicationStep 1: Create Project in the firebase console using your app package name. Ex: com.testapp
Step 2: After the project creation download the google-service.json
file which is automatically generated.
Step 3: Add the google-service.json
file to your android Application with in the app folder.
Step 4: Add the firebase dependencies in the project level build.gradle file.
Step 5: Apply plugin in app/build.gradle
#
Integrate Firebase Push notificationStep 1: Add the FCM dependency to your app-level build.gradle file.
Step 2: Add below line in your app manifest file.
Step 3: Create MyFirebaseMessagingService
file in your application that extends FirebaseMessagingService
service.
- Java
- Kotlin
Step 4: Enable Cloud messaging in FireBase, you can enable cloud messaging in the below Link. Enable cloud messaging
Step 5: Copy
Cloud Messaging API key and configure it in the chat server to receive message and calls from Chat SDK.
You can find Cloud Messaging API key in Project Settings
under Cloud Messaging
tab. Please refer below screenshot.
Step 6: Open the AndroidManifest.xml and add below permissions.
Step 7: Get the device token and add it in cloud message console.
- Java
- Kotlin
#
Integrate Firebase CrashlyticsStep 1: Add the Crashlytics In your project-level build.gradle.
Step 2: Add Crashlytics in your app-level build.gradle
Refer Firebase Crashlytics DocumentNote: After added Crashlytics to your application. In first time it will take more than 12 hours to affect the Firebase Crashlytics UI.