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
- Go to the Firebase Console
- Select your project or create a new one if you haven't already
Step 2: Navigate to Project Settings
- Click on the settings (gear) icon next to "Project Overview" in the left sidebar
- Select "Project settings" from the dropdown menu
Step 3: Access Service Accounts
- In the Project Settings page, click on the "Service accounts" tab
- You'll see information about your Firebase Admin SDK
Step 4: Generate Service Account Key
- Scroll down to find the "Firebase service account" section
- Click on "Generate new private key" button
- A dialog will appear warning you to keep this key confidential
- 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 IDprivate_key_id: Unique identifier for the private keyprivate_key: The actual private key (begins with "-----BEGIN PRIVATE KEY-----")client_email: Service account email addressclient_id: Client identifierauth_uri: Authentication URItoken_uri: Token URIauth_provider_x509_cert_url: Certificate URLclient_x509_cert_url: Client certificate URL
Step 6: Upload to notifySphere
Once you have your Service Account JSON file:
- Return to the notifySphere app configuration page
- Click on the "Service Account JSON" file upload field
- Select your downloaded JSON file
- The Firebase Project ID will be automatically extracted and displayed
- 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.