How to Set Up Firebase Push Notifications for GrowHaz Web-to-App Converter

By GrowHaz Engineering Team —

Learn how to get both google-services.json and Firebase Admin Service Account Key JSON to enable reliable background push notifications in your converted Android APK.

How to Set Up Firebase Push Notifications for GrowHaz Web-to-App Converter

Why Push Notifications Need Firebase on Android

When converting a website into a mobile application, one of the biggest benefits is the ability to send push notifications directly to user devices.

However, standard web browsers and mobile apps handle push notifications very differently:

To deliver push notifications when the app is closed or backgrounded, Android requires Firebase Cloud Messaging (FCM) running at the native OS level. Android's built-in Google Play Services maintains a constant low-power connection to Google servers and wakes up your app's notification handler (MyFirebaseMessagingService) whenever a notification arrives.

---

The Two Files You Need

To enable native FCM push notifications in GrowHaz, you need to provide two JSON files from your free Firebase project:

1. google-services.json (Client Configuration)

2. Firebase Admin Service Account Private Key JSON (Server Key)

---

Step 1: Create a Free Firebase Project

1. Navigate to the Google Firebase Console.

2. Sign in with your Google account.

3. Click Add project (or select an existing project if you already have one).

4. Enter a project name (for example, My App Notifications) and click Continue.

5. You can disable or enable Google Analytics depending on your preference, then click Create project.

6. Wait 10 seconds for Firebase to prepare your workspace, then click Continue.

---

Step 2: Register Android App & Download google-services.json

1. On your Firebase Project Overview dashboard, click the Android icon (or click Add app > Android).

2. Crucial Step — Android Package Name:

3. (Optional) Enter an App nickname (e.g. My Website App).

4. Click Register app.

5. Click the blue Download google-services.json button.

6. Keep this file safe on your computer. You will upload this in GrowHaz!

7. You can skip the rest of the steps in the Firebase wizard since GrowHaz's automated builder configures the Gradle dependencies automatically.

---

Step 3: Generate Firebase Service Account Key JSON

Now, generate the server-side private key that allows the push server to dispatch messages:

1. In the Firebase Console, click the Gear icon (Project settings) next to *Project Overview* in the left sidebar.

2. In the top tabs, select Service accounts.

3. Under the Firebase Admin SDK section, confirm the language is selected as Node.js.

4. Click the blue button labeled Generate new private key.

5. A confirmation modal will appear warning you to keep this key confidential. Click Generate key.

6. A JSON file will download to your computer named your-project-firebase-adminsdk-xxxxx.json.

7. This is your Firebase service account key.

---

Step 4: Upload to GrowHaz & Build Your APK

1. Go to GrowHaz Web-to-App Converter.

2. Enter your Website URL and App Name.

3. Select the Advanced or Pro plan.

4. Toggle on Enable Push Notifications.

5. Upload your downloaded google-services.json into the first upload field.

6. Upload your your-project-firebase-adminsdk-*.json into the second upload field.

7. Click Build APK. GrowHaz will compile your native Android project with FCM integrated, register your app with the push server, and generate your download link!

---

What If You Want Minimal Changes / Zero Config?

If you do not need push notifications right away, you do not need Firebase at all!

---

How Push Notifications Work After Build

1. When a user installs and opens your APK, Android generates an FCM device token.

2. The APK automatically registers this token with the Push Notification Server.

3. When you want to send a notification (promotional announcement, user alert, new post), you trigger the push server's /api/push/broadcast endpoint with your message title, body, and URL.

4. Firebase delivers the notification immediately to all devices — whether the app is active, closed, or the user is using another app.