# Android upload key

> The card an Agent sends to ask which Google Play upload key signs an Android app: Upload Keystore, Create New Key, and the answered card.

Source: https://air.build/docs/cards/android-upload-key/

An Android upload key card is an Agent asking which key signs an Android app for Google Play. Google Play accepts an app's updates only when they're signed with the key the app already uses, so the card lets you upload that key, or create a new one for an app that has never been on Google Play. If nobody answers before the app's first Android build, AirBuild creates a key for it. You can replace that key later by uploading your own; the replaced key is kept.

> [!NOTE]
> Agents send this as the `android_upload_key` card.

## Who sends it and who answers

An Agent sends it into the chat it's working in when it needs to sign the Android app. Anyone in the Team who can see the chat can answer it. The card is answered once; everyone then sees the answered card.

## What's on the card

The Agent that asked is named above the card, as for any of its messages.

| Part | What it shows or does |
| --- | --- |
| "Choose the upload key for Google Play" | The card's heading. The same words show when the card is quoted or is a chat's last message. |
| Package name | The app's package name, for example `com.example.notes`, in bold. |
| "Google Play only accepts updates signed with the key this app already uses. Upload that keystore, or create a new key if the app has never been on Google Play." | What the choice means. Shown while the card waits. |
| Reason | The Agent's own line about why it asks, when it wrote one. |
| **Create New Key** | AirBuild creates a new upload key for the app, right away. The button shows a spinner until it's done. Choose it only for an app that has never been on Google Play. |
| **Upload Keystore** | Opens the **Upload Keystore** sheet, where you send the keystore the app already uses. See [Upload Keystore](https://air.build/docs/screens/chat/upload-keystore/). |

## Answer the card

- **The app is already on Google Play:** tap **Upload Keystore**, choose the keystore file, type its password and tap **Upload**. The card is answered only once AirBuild has checked and kept the key.
- **The app has never been on Google Play:** tap **Create New Key**.

## After it's answered

The buttons and the explanation go. A check mark and one line take their place:

| Line | Meaning |
| --- | --- |
| **Upload key added, SHA-256** followed by the start of the fingerprint, for example `3F:9A:0C:7E…` | This key signs the app now. Compare the fingerprint with the upload key certificate in Google Play Console. |
| **Upload key added** | Your keystore was added; the fingerprint wasn't sent with the answer. |
| **A new upload key signs this app** | A new key was created; the fingerprint wasn't sent with the answer. |

The Agent's reason stays on the answered card.

## What the Agent gets back

Whether a keystore was uploaded or a new key created, and the SHA-256 fingerprint of the certificate that signs the app now. The keystore and its password never go through the chat. Answering wakes the Agent that asked.

## Messages

Shown under the buttons after **Create New Key**. Both buttons come back so you can try again. For messages after **Upload**, see [Upload Keystore](https://air.build/docs/screens/chat/upload-keystore/#messages).

| Message | What it means | What to do |
| --- | --- | --- |
| "Unable to send to the agent. Check your connection and try again." | The answer didn't reach AirBuild. | Check your connection and tap again. |
| "This answer can't be sent. Update AirBuild and try again." | This version of AirBuild sends an answer AirBuild no longer takes. | Update AirBuild. |
| "You're signed out. Sign in and try again." | You're not signed in. | Sign in, then answer again. |
| "You don't have permission to do this. Ask the Team owner for help." | Your role in the Team doesn't allow it. | Ask the Team's owner. |

A card whose package name isn't a valid Android application ID can't be drawn and shows as a message saying "This message requires a newer version of AirBuild."
