# Android Build and Publish (Old)

#### 1. Build Android Release Version

To build a signed release version of your app:

**Generate Keystore File:**

You’ll need Java installed (JRE or JDK). Use the `keytool` command in terminal:

bash1keytool -genkey -v -keystore `my-release-key.keystore` -alias `alias_name` -keyalg RSA -keysize 2048 -validity 10000

Replace `my-release-key.keystore` and `alias_name` with your preferred values.

**You will be prompted to enter:**

* New Keystore password
* First and last name
* Organisation Unit
* Organisation
* City
* State Or Province
* Country code

{% hint style="info" %}
***Tip: :** Keep this keystore alias & password safe — it's required for future updates.*
{% endhint %}

**Upload to eMOBIQ:**

1. Go to **Build and Publish tab** > **New Build** > Select **Android**
2. Choose **Release** as build type and select the version
3. Upload your `.keystore` file and enter:
   * Keystore password
   * Key alias
   * Key password

Click **Build** and wait for the process to complete.

**Download Artifacts:**

* `.aab` file – used for deployment to Google Play Store
* `.apk` file – for direct installation on devices

***

#### 2. Initial Setup in Google Play Console

1. Visit [Google Play Console](https://play.google.com/console)
2. Sign in with your company email
3. Create a new app listing matching your eMOBIQ app
4. Complete declaration forms
5. Fill out store listing:
   * Description
   * Icon
   * Screenshots
   * Graphics
6. Set default language to **en-US**

***

#### 3. Manual Deployment to Google Play Store

**Upload to Closed Testing:**

1. Go to **Testing** > **Closed Testing**
2. Add testers and countries
3. Upload the `.aab` file
4. Wait for review

**Promote to Production:**

1. Once reviewed, promote the release to **Production**
2. Wait for final review
3. App becomes available on Google Play Store

> ⚠️ Available channels:

* Internal (email-invited users – immediate)
* Closed (email-invited users – requires review)
* Open (public opt-in users – early access)
* Production (public users)

***

#### 4. Configure Auto-Publishing via eMOBIQ

**Generate Service Account:**

1. Visit [Google Cloud Console](https://console.cloud.google.com/)
2. Go to **Service Accounts**
3. Create a service account and note its ID (an email address)
4. Add key and download JSON file

**Link with Google Play Console:**

1. In Google Play Console > **Users and permissions**
2. Invite the service account email with **Admin** access

**Upload to eMOBIQ:**

Go to **Settings > Android > Publish Settings** and upload:

* Service account JSON file
* App name
* Short description
* Full description

> ✅ Ensure these match what was entered in Google Play Console

**Enable Auto Publishing:**

1. Go to **Build & Publish > Publish tab**
2. Click **Publish** for the latest build
3. Confirm configurations
4. The system will deploy to **Closed Testing** , then automatically promote to **Production** after review

> 📌 Note: A manual upload must be completed before enabling auto-publishing


---

# 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.emobiq.com/emobiq-ai/readme/building-your-app/build-and-publish/android-build-and-publish-old.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.
