Build & deploy the Android app
Build first Android binary 🕐 / 📱
- Select the proper build type - You need to decide if you want to build an app that will be shared with Google Play Store or if it will be sent directly to final users. - If it will be deployed to the store you should build an app-bundle (.aab) file otherwise an apk (.apk) file. - Configure buildType in eas.json as follows: - {
 // ...
 "build": {
 "production": {
 "android": {
 "buildType": "app-bundle" // you can choose here between apk and app-bundle
 // ...
 }
 },
 "staging": {
 "android": {
 "buildType": "app-bundle" // you can choose here between apk and app-bundle
 // ...
 }
 },
 "qa": {
 "android": {
 "buildType": "apk" // you can choose here between apk and app-bundle
 // ...
 }
 }
 }
 }
- In the terminal run the build command (choose the proper environment (qa/staging/production) - yarn build:[qa/staging/production]:android
- ⚠️ You will be asked to generate a new Android Keystore. ⚠️ - If your app already exists (perhaps the app has already been deployed to the store) and you have the Keystore file press n and follow the steps. - If you do not have the Keystore file yet press y. - CONGRATULATION !! 🥳🥳 You just started the first Android build of your app! 
Deploy the first version of the Android app for tests in Google Play Store. (internal testing) 🕐 / 📱
The first submission to Google Play Store needs to be done manually.
Step 1 - Log in to Play Developer Console.
Step 2 - Choose your developer account (if you have more than one):

Step 3 - Create new app
- Press Create App button on the right  
- Fill out the form for creating about new App.  - Fields description: - 
Add your app name. Depending on the type of your app, you are creating: - 
your app name (qa) 
- 
your app name (staging) 
- 
your app name 
 
- 
- 
Choose your primary language (English, Polish, or some other). 
- 
Confirm Developer Programme Polices and US export laws 
 
- 
- Press Create app button in the right bottom corner (picture in the previous step). - You should create a new app for each environment you need to use (e.g. qa, staging, production). 
Step 4 - Download your build file (apk or app-bundle) from the expo dev console.
- Log in to the expo dev console.
- Choose your organization from the dropdown in the top left corner.
- Choose your project from the left sidebar.
- Choose Builds tab from the left sidebar.  
- Pick a build you want to release for testing  - Sometimes if you do not see the build which you want to download, you may need to refresh the page (there is some heavy caching on the Expo site). 
- Download the build binary file.  - If you downloaded an apk file, you can share this file directly with your end users (could be sent via slack, diawi, google drive, etc.). - If you downloaded an app-bundle file, it will be used in the next step. 
Step 5 - Prepare the internal test.
- Go to the Internal testing tab from the menu on the left (ensure you are working on the proper app - the app name is visible in the right top corner)  
- Press Create new release button.  
- Upload the binary file (downloaded in the previous step app-bundle file - .aab) and fill out the release form.  - Fields description: - 1)Button to upload binary file (upload binary download in the previous step (7.d). - 2)Release name - will be automatically filled based on your build number and app version. You could change it to any other name. - 3)Release notes - notes visible for users in the Play Store talking about changes in the current version of the app. 
- Press Review release button  
- Rollout new release - If your app does not have any issues (there will be shown no errors) it means that is ready to go public. - Press Start roll-out internal testing button  - If you meet any errors, you need to resolve them before releasing an app for internal testing. 
- Confirm roll-out operation modal - Press the Rollout button.  - CONGRATULATION !! 🥳🥳 You just released the first version of the app for internal testing. 
Step 6 - Invite testers to test your app.
- Go to the internal testing tab (7.e.i)
- Enter Testers tab  
- Add testers. - You can add testers in two different ways.  - 1)Select an already define (if you have such) list of testers for example Binarapps - 2)Create a new list of testers. You will need to add names and testers' emails to the list. - To apply any changes press Save changes button in the bottom right corner. 
- Send invitation link to testers. - 1.Press Copy link button  - 2.Send copied link to testers. - Testers should enter the link in web browser (ideally on a mobile device) when they are logged in to the email address provided on the testers list. Otherwise, the link could be opened in incognito mode - login is required to the proper Google Account. - 3.Testers should accept invitation by pressing Accept invite button.  - 4.Testers are now able to download an app from Google Play Store - press the button download it on Google Play. - The link needs to be opened on an Android device, otherwise, the installation will not be possible.  - CONGRATULATION !! 🥳🥳 You just invited the first tester of the app for internal testing. 
Build and deploy the next versions of the app to the Google Play Store. 🌈 / 🕐 / 📱
To run this step, ensure that you already have built and deployed the first version of the app (it means, that you need to go through steps 6 and 7 for qa / staging / production version of the app depending of your needs)
Only the first submission of the Android app needs to be done manually. Every next submission could be automated 🥳.
To make it possible, Google Service Account key file needs to be provided.
- Generate Google Service Account key → follow the instruction. - To generate the above you will need to contact with account owner of your project. 
- Put generated Google Service Account key in the root dir of your project. 
- Add Google Service Account key to .gitignore file. - your_google_service_account_key.json
- Configure eas.json to use the Google Account Service key, and to send a new app version for the internal testing path. - "submit": {
 "production": {
 "android": {
 "serviceAccountKeyPath": "path_to_your_google_service_account_key",
 "track":"internal"
 }
 },
 "staging": {
 "android": {
 "serviceAccountKeyPath": "path_to_your_google_service_account_key",
 "track":"internal"
 }
 },
 "qa": {
 "android": {
 "serviceAccountKeyPath": "path_to_your_google_service_account_key",
 "track":"internal"
 }
 }
 }
- Build and deploy a new version of the app - In project dir terminal run: - yarn deploy:[qa/staging/production]:android- Choose the proper app version depending on the environment for which you want to create a build. - CONGRATULATION !! 🥳🥳 You have just automated the build and deployment process for Android!