Build and Internal testing
By the end of this page you have a pd AAB in Internal testing, already tried by testers on real devices. An AAB (Android App Bundle) is the .aab file Google Play requires instead of an APK. You need before you start: the account from Google Play account, a project set up as in Set up the Expo project, and a backend already running pd as in Backend and demo account.
1. Set the Android values in app.json
Section titled “1. Set the Android values in app.json”The developer adds the Android values to app.json. Shared values such as version, icon and android.package were already set in Set up the Expo project.
{ "expo": { "android": { "package": "th.co.ricesense.app", "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#FFFFFF" } } }}| Value | RiceSense | Reason |
|---|---|---|
android.adaptiveIcon.foregroundImage |
./assets/adaptive-icon.png |
An adaptive icon is one Android crops into a circle or rounded square depending on the device. Use a 1024×1024 PNG with a transparent background and the logo inside the central circle (about 66%) so the edges are not cut off |
android.adaptiveIcon.backgroundColor |
#FFFFFF |
The background color behind the logo |
2. Add a config plugin that makes the portrait feature optional
Section titled “2. Add a config plugin that makes the portrait feature optional”Do this before the first build. An app locked to portrait ("orientation": "portrait") gets a required android.hardware.screen.portrait feature in its manifest. Play then treats the feature as mandatory, so some tablets, Chromebooks and Android XR cannot install the app, and the quick checks before sending for review report it as an issue. The developer creates this file. The app stays locked to portrait as before.
const { withAndroidManifest } = require('expo/config-plugins');
const FEATURE = 'android.hardware.screen.portrait';
module.exports = function withOptionalPortraitFeature(config) { return withAndroidManifest(config, (mod) => { const manifest = mod.modResults.manifest; manifest.$['xmlns:tools'] = manifest.$['xmlns:tools'] || 'http://schemas.android.com/tools'; const features = (manifest['uses-feature'] = manifest['uses-feature'] || []); const existing = features.find((f) => f.$['android:name'] === FEATURE); if (existing) { existing.$['android:required'] = 'false'; existing.$['tools:replace'] = 'android:required'; } else { features.push({ $: { 'android:name': FEATURE, 'android:required': 'false', 'tools:replace': 'android:required' }, }); } return mod; });};Then add the plugin to app.json.
{ "expo": { "plugins": ["./plugins/withOptionalPortraitFeature"] }}If plugins already has other entries, append this line to the existing list.
3. Build the AAB
Section titled “3. Build the AAB”The Expo project owner runs this command, because it needs an EAS (Expo Application Services, Expo’s build service) login with the owner’s account.
eas build --profile pd --platform android- The
pdprofile does not setbuildType, so it produces an.aabfile and points at the production API autoIncrement: truemakes EAS bump the versionCode (Android’s build number, which Play never accepts twice) on every build- On the first Android build, EAS asks whether to create a keystore (the key file used to sign the app). Answer Yes so EAS creates and stores it
- When the build finishes, download the
.aabfile from the project’s build page on expo.dev. You use it in step 7
4. Back up the keystore
Section titled “4. Back up the keystore”The Expo project owner runs eas credentials -p android → picks the pd build profile → picks the keystore → Download existing keystore, then stores the file in the company’s secret store. Never keep it in the repo. This keystore acts as Play’s upload key. If it is lost, you cannot upload a new version until you ask Google for a reset.
5. Check the account name in Play Console
Section titled “5. Check the account name in Play Console”The Google Play account owner goes to play.google.com/console and checks the account name at the top of Home every time before clicking Create app.
Developer account name
The account that will own the app. People with access to several accounts see an account picker when they open Play Console
We enteredricesense · Organization account
WhyA package name used in one account cannot be used in another. If the name shown is not the company's account, switch accounts first
Create app
Opens the form that creates a new app in this account
6. Fill in the Create app form
Section titled “6. Fill in the Create app form”The Google Play account owner clicks Create app and fills in two sections: App details and Declarations.
App name
The name users see on Google Play, up to 30 characters
We enteredRiceSense
WhyUse the same name as in app.json. You can change it later on the Main store listing page
Package name
The app's identity on Android. Must match android.package of the pd build. The form checks that the name is still available
We enteredth.co.ricesense.app
WhyCannot be changed once set. Never use one with a .dv or .te suffix
Default language
The main language of the store page. Users whose language has no translation of ours see the text in this language
WhyAll users are in Thailand. Change it to Thai before creating the app, because the default is English
App or game
The app type, which decides whether it is listed under Apps or Games in the store
WhyCan be changed later in Store settings
Free or paid
Whether the app is a free download or must be bought
WhyThe app is only for farmers in the program. It is not sold and has no in-app purchases
Automatic protection
Play adds an installer check to the app's code. If a user got the app from another source, they are told to install it from Google Play
WhyDoes not affect the dv and te builds, because they use different package names and are not on Play
Developer Program Policies
Confirms the app follows the Google Play developer policies
WhyRequired. Read the policies on user data and app permissions first, because they are the most common reason apps get suspended
Play App Signing
Accepts that Google keeps the app signing key and signs the app for distribution, which is mandatory for AAB files
WhyThe keystore backed up in step 4 is the upload key. The app signing key stays with Google
US export laws
Certifies that the app complies with US export law, including rules on software that uses encryption
WhyRequired. The app only uses standard HTTPS encryption
Click Create app to reach the app’s Dashboard. The remaining tasks are under the Show more link.
7. Upload the first AAB to Internal testing
Section titled “7. Upload the first AAB to Internal testing”The Google Play account owner goes to Test and release → Testing → Internal testing → Create new release and drags in the .aab file from step 3. The app’s first file must be uploaded in the web page, because the Google Play API does not know an app that has never had a bundle, so eas submit cannot be used the first time. Internal testing is a track (release channel) for the internal team, up to 100 people, with no review wait.
Upload app bundles
Where the .aab file goes. Drag the file into the box, or click Upload and pick the file
WhyThis is the app's first file, so the library is empty
App bundle row
The result after upload: versionCode and versionName, API levels, Target SDK and the number of Required features
We entered3 (1.0.0) · API 24+ · Target SDK 36
WhyCheck the numbers match the build you meant to send. If Play says the version code is already used, build again and EAS bumps the number
Scroll down to Release details and enter release notes inside the store page’s language tag. Use <th>, not <th-TH>. With the wrong tag, Play shows Unsupported language translation and the Next button cannot be clicked.
Release name
The release name, shown only in Play Console, not to users. Play fills it in from the file's version
We entered3 (1.0.0)
WhyKeep the filled-in value, since it already shows both versionCode and versionName
Release notes
The "What's new" text testers see, written inside a language tag, up to 500 characters per language
We entered<th> รุ่นทดสอบภายในแรกของ RiceSense: ภารกิจวันนี้ ระดับน้ำ บันทึกกิจกรรม ประวัติ และผู้ช่วย AI </th>
WhyThe text says "First internal test build of RiceSense: today's tasks, water level, activity log, history and AI assistant". The opening and closing tags sit on separate lines from the text. Below the field it must say Release notes provided for 1 language. The correct language code is shown in the language picker on the Main store listing page, for example Thai – th
Click Save as draft.
8. Add testers
Section titled “8. Add testers”The Google Play account owner goes to the Testers tab of Internal testing → Create email list → names the list, adds the emails, then clicks Save changes.
List name
The tester list name. The list can be reused for every app in the account
We enteredRiceSense internal testers
WhyName it so it is clear which app and which track it is for
Add email addresses
Type emails separated by commas and press Enter, or upload a CSV file
WhyThey must be the Google accounts testers use to sign in to the Play Store on their phones
Email addresses added
Emails already in the list
We enteredadmin@futureofgoodlife.com, kiwt07@gmail.com
WhyInclude at least one system owner and one developer
Back on the Testers tab, tick the list you created and click Save.
9. Release to Internal testing
Section titled “9. Release to Internal testing”The Google Play account owner goes back to the draft release → clicks Next → the Preview and confirm page → clicks Save and publish.
Errors, warnings and messages
Results of the file check. An Error must be fixed before you can continue. A Warning lets you continue
We entered1 Warning: There is no deobfuscation file associated with this App Bundle
WhyThis Warning means there is no R8/proguard mapping file. It does not block the release; it only makes crash stack traces in Play Console harder to read
Save and publish
Publishes this release to Internal testing
WhyInternal testing has no review wait. The bottom bar says Changes made will be published to Google Play immediately
A confirmation dialog appears. Click Save and publish again.
Once published, the track is Active and the release shows Available to internal testers.
Available to internal testers
Testers on the list can now install this release
We entered3 (1.0.0)
th.co.ricesense.app (unreviewed)
The temporary app name testers see before the app passes its first review
WhyNo need to fix it. The real name appears once the app details are complete and the app passes review
10. Test on real devices
Section titled “10. Test on real devices”The Google Play account owner copies the opt-in link from the Testers tab and sends it to testers. Each tester opens the link on an Android phone signed in with an email on the list → joins → installs from the Play Store and tries every main screen. This build is pd, so it talks to the production API. Sign in with the demo account prepared in Backend and demo account. If you find a bug, the developer fixes it, then the Expo project owner repeats step 3 and the Google Play account owner uploads as in step 7. The bundle that passes this testing is the one released to Production.
Check before moving on
Section titled “Check before moving on”app.jsonhasandroid.adaptiveIconand the./plugins/withOptionalPortraitFeatureplugin- The keystore is backed up in the company’s secret store
- The app was created in the
ricesenseaccount with package nameth.co.ricesense.appand Default language Thai - Internal testing is Active and testers can install from the Play Store
- Testers have tried every main screen on the pd build, and the versionCode of the bundle that passed is written down
Next: Play Console and review