KiviCare (TM) Pharma Addon- Documentation

🔥Firebase Configuration

🕒 Estimated Reading Time: 2 minutes
📂 Location: Configurations & Customization →Firebase Configuration

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

📌 What is this file for?

This guide walks you through connecting your mobile application with Firebase for enabling key features like authentication, push notifications, and real-time services.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🟩 1. Create a New Firebase Project

1. Go to Firebase Console.

2. Click on “Add Project” and create a new one (e.g., named "Example").

3. After project creation, you’ll see a dashboard like this:

4. Navigate to Project Settings and set the Support Email under “General”.

🟩 2. Add Your App to Firebase Console

1. On the Firebase dashboard, click the Android icon to register your app.

2. Enter your App Package Name (e.g., com.example.userApp) and click Register App.

3. Once done, download the google-services.json file. Place this file inside your Flutter project at: android/app/google-services.json

🟩 3. Set Up Firebase Authentication

1. In Firebase Console, go to:
Build → Authentication → Get Started

2. Enable the following sign-in methods:

  • Email/Password
  • Google Login
  • Apple Sign-In (if needed)

3. Confirm that all selected login methods are enabled.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🟩 4. Add SHA Fingerprint (For Login Authorization)

📌 Why it’s important?
Google Login & OTP Login require SHA Fingerprint to verify authenticity.

🔹 How to Add SHA Fingerprint:

1. Follow these steps if you didn’t initially provide a SHA certificate fingerprint for your Firebase Android app or if you need to add an additional one:

  • Go to Project Settings → Your Apps  card
  • Select the Firebase Android app to which you want to add a SHA fingerprint.
  • Click Add fingerprint.
  • Enter or paste the SHA fingerprint, then click Save.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🔹 How to Generate SHA Fingerprint from Android Studio:

Firebase requires two types of SHA keys:

  • Debug SHA (for testing)
  • Release SHA (for production)

👉 Refer Android Studio tools or terminal commands to generate both.

📸 How to generate SHA in Android studio

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

🟩 5. Enable Firebase Notifications (Android & iOS)

This enables push notifications in the mobile app.

  1. Navigate to Project Overview → Project Settings → General
  2. Copy your Project ID from Firebase

🟩 6. Get Firebase Service Account JSON File

Obtain Firebase Service Account Json file

  1. Click on “Service accounts” in the project Settings.
  2. Click on Generate new Private key Button and Download the service Json file.

🟩 7. Configure Admin Panel with Firebase Details

  1. Login to your Admin Panel
  2. Go to: System → Settings → App Configuration Settings and Enable the Firebase Notification toggle
  3. Enter your Firebase Project ID and Upload the Service Account JSON file
  4. Click Submit button.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

⚠️ Trouble Uploading JSON File?

If upload fails due to permission issue:

  1. Open your backend project
  2. Go to this path: storage/app/
  3. Create a folder named: data
  4. Place your service-account JSON file inside this folder

SUCCESSFUL!!

Great! 🎉 You have now successfully configured Firebase with your KiviCare – Laravel mobile app. Authentication, push notifications, and cloud services are now connected and ready to use.