This post will explain how to build an Ionic app and release it Ad Hoc for Android devices. This mode of release is primarily used for Android Beta testing.
Requirements:
- Computer
- Android Studio & SDK Tools
- Google Play Developer Console Account
Variables
- APP_NAME, found in package.json, e.g. “name”: “MyApp”
Ionic Build
$ cordova platform add android --save
$ ionic cordova build android --prod --release
- Open the Android Studio project, found in platforms > android
Android Studio Build With Signing
- Build > Generate Signed APK
- Module: android
- Next
- Create New
- Key store path: path-to-user/directory-to-store-key/key-name.jks
- Password / Confirm: password for key
- Alias: a name to identify the key
- Password / Confirm: password for key
- Certificate: fill in your name, organisation, location
- Ok > Next
- APK Destination Folder: path-to-project/project-name/platforms/android
- Build Type: Release
- Finish
- Wait for Android Studio to build the project
- The APK will be located at path-to-project/project-name/platforms/android/android-release.apk
- You can rename the file
Google Play Console
- Log on to the Google Play Store Developer Console
Optional: create list of testers
- Settings > Manage Testers
- Create List
- List name: used to identify the list
- Add email addresses: email addresses for user Google Play accounts
- Create List > Save
Create the application on Google Play Console
- Settings > All applications
- Create a an application (or click on existing one)
- Create Application
- Title: name of your application
- Create
- Complete the store listing
- App Releases > Internal test track > Manage
- Manage testers
- Choose a testing method: Internal
- Users: select the list of users
- Save
- Create Release
- App signing by Google Play
- Continue
- Read and accept the Terms of Service
- Android App Bundles and APKs to add
- Browse Files
- Find the APK file from earlier
- Upload
- Release name
- Enter a name to identify the app in the Play Console
- What’s new in this release?
- Enter some information about the app functionality
- Save > Review
- Review summary
- Errors: you must resolve these before continuing
- Warning: it is suggested that you resolve these
- Complete outstanding sections
- Content rating > *
- Pricing & distribution > *
- Internal test track > Edit Release > Review > Start Rollout to Internal Test
- Wait wile Google approve the app, this may take a few days…
- Release Management > App release > Internal test track > Manage
- Manage testers > Opt-in URL
- https://play.google.com/apps/internaltest/0000000000
- Send the Opt-in URL to your testers
- Tester must log in with their tester account and visit the url