Android Firebase Credentials Documentation

Overview

To send push notifications to Android devices, you need to configure Firebase Cloud Messaging (FCM) credentials. This guide will walk you through obtaining your Firebase Service Account JSON file.

Step 1: Access Firebase Console

  1. Go to the Firebase Console
  2. Select your project or create a new one if you haven't already

Step 2: Navigate to Project Settings

  1. Click on the settings (gear) icon next to "Project Overview" in the left sidebar
  2. Select "Project settings" from the dropdown menu

Step 3: Access Service Accounts

  1. In the Project Settings page, click on the "Service accounts" tab
  2. You'll see information about your Firebase Admin SDK

Step 4: Generate Service Account Key

  1. Scroll down to find the "Firebase service account" section
  2. Click on "Generate new private key" button
  3. A dialog will appear warning you to keep this key confidential
  4. Click "Generate key" to download the JSON file
Important: Keep this JSON file secure and never commit it to version control. It contains sensitive credentials that grant access to your Firebase project.

Step 5: Verify JSON File Contents

Your downloaded JSON file should contain the following fields:

  • type: Should be "service_account"
  • project_id: Your Firebase project ID
  • private_key_id: Unique identifier for the private key
  • private_key: The actual private key (begins with "-----BEGIN PRIVATE KEY-----")
  • client_email: Service account email address
  • client_id: Client identifier
  • auth_uri: Authentication URI
  • token_uri: Token URI
  • auth_provider_x509_cert_url: Certificate URL
  • client_x509_cert_url: Client certificate URL

Step 6: Upload to notifySphere

Once you have your Service Account JSON file:

  1. Return to the notifySphere app configuration page
  2. Click on the "Service Account JSON" file upload field
  3. Select your downloaded JSON file
  4. The Firebase Project ID will be automatically extracted and displayed
  5. Click "Save & Continue" to proceed

Troubleshooting

Invalid JSON File Error

Make sure you're uploading the correct JSON file. The file should be named something likeyour-project-name-firebase-adminsdk-xxxxx.json

Missing Required Fields

If you receive an error about missing fields, try generating a new service account key from the Firebase Console.

Additional Resources