# Android build configuration

### How to configure your Android build for push notification?

Send push notifications from within your app dashboard. To send notifications for your app, it is mandatory to configure your app build. Here’s a step-by-step guide on how to set it up for Android:

{% embed url="<https://scribehow.com/shared/Android_build_configuration__r9pURJ1KSEqnUOFIU9NLIg>" %}

#### **Step 1: Enable notification settings**

* Navigate to the [**Notification Build Settings**](https://app.appmysite.com/app/notifications/build-settings) screen in your AppMySite dashboard.
* Turn on the toggle for the type of notifications you want to configure:
  * Basic notifications
  * Advanced notifications
  * Both
* Click on Generate in the SHA-1 key field.

{% hint style="warning" %}
If you’re configuring basic notifications, you do not need to generate an SHA-1 key.
{% endhint %}

#### Step 2: Set up Google Firebase

* Navigate to [**Google Firebase** ](https://docs.appmysite.com/)and create a new project if you haven’t already set one up during the iOS build configuration.

{% hint style="danger" %}
If you have already set up a Firebase project for iOS notifications, you must use the same project for Android.
{% endhint %}

Refer to the guide to learn how to create a Firebase project.

{% content-ref url="/pages/6SLKJlgk39WUqYLvDldm" %}
[Create Firebase project](/app/notifications/basic-notifications/create-firebase-project.md)
{% endcontent-ref %}

* On the Project Overview screen, click on Add app and select Android.&#x20;
* Next, you’re required to enter your app package name. Navigate back to your AppMySite app dashboard and copy your Android app’s package name.&#x20;
* After adding your package name, enter a nickname for your app.&#x20;
* Paste the SHA-1 key you generated earlier on the Build Settings screen on AppMySite.&#x20;
* After proceeding to the next step, download the google-services.json file. Click on next again to complete the process.&#x20;
* Next, click on the gear icon next to Project Overview and select Project settings.&#x20;
* Navigate to the “Service accounts” tab.&#x20;
* Click on Generate new private key. Make sure node.js is selected. The key would be downloaded as a json file.

{% hint style="danger" %}
Your google-services.json file is essential for Firebase integration. Keep it safe, as you will need it for the next step.
{% endhint %}

#### **Step 3: Upload Firebase configuration files**

* Return to the Notification Build Settings screen in your AppMySite account.
* In the Google Firebase Configuration field, upload the google-services.json file.
* In the Google Firebase Service Account field, upload the .json key file.
* Click Save to complete the setup.

{% hint style="warning" %}
Make sure you upload the correct Firebase configuration files to avoid connectivity issues.
{% endhint %}

#### **Step 4: Generate a new Android app build**

* Once the configuration is complete, create a new build of your Android app.

{% hint style="warning" %}
If you are enabling only basic notifications, you do not need to generate the SHA-1 key.
{% endhint %}

* Download and install the new build on a test device to verify that push notifications work correctly.

{% hint style="warning" %}
Important notes

* Once your new build is live, notifications will start working automatically.
* If you face any issues, verify that you have uploaded the correct Firebase configuration files.
* You must rebuild and submit a new version of your app every time you modify notification settings.
  {% endhint %}

This setup ensures that your app is configured to send push notifications efficiently using Firebase.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmysite.com/app/notifications/notification-configuration/android-build-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
