In this article you’ll read about how to quickly and securely share versions with testers and developers using the Google Play Store.
I’ll also cover improvements we made such as accessing historical releases or being able to upload debuggable builds with Internal App Sharing.
But first, some background information
Distributing an APK to your testers is as simple as attaching it to an email or uploading it to a file storage server. Testers could then download and install the APK on their phones. And so could anyone else that got a hold of the file.
Then came Android App Bundles (AAB). It is the application publishing format for Android. It makes it easy to ship only the required resources to users through split apk without any additional work required from developers. AAB is a publishing format, which means Google Play will generate a set of APKs to be delivered on end-user devices. This can make it challenging to test the exact artifacts that are installed by end-users, especially if you take into account more advanced features such as dynamic delivery and in-app updates.
When working with a larger team, multiple stakeholders or external testers you most likely are looking for a way to share installable artifacts with them directly. Asking them to install the developer tools and run commands may just not be feasible. And even if you can use
bundletool to convert an Android App Bundle to APK and install it on a device, you won’t be able to test in-app updates or your
onDemand delivery implementation with it.
Not to fret, the Play Store has you covered here.
Testing your App with limited testers
Google’s Play Store provides several ways for you to share an app with a limited set of people. Access can be limited either through an Opt-In URL, membership to a specific mailing list or on an individual level using email addresses associated with a Google Play user account.
You can utilize multiple tracks which will not be accessible by the general public. This means you can decide exactly who is able to access your app at which stage of development. Here are the most important differences:
Internal Test Track
- Limited to 100 testers per app
- Ideal for wider teams that should test a release candidate.
- Available immediately
- Invite individual users or whole groups
- Ideal for organizational wide testing before opening up to the public.
- Review before publication
- Public users can opt in directly
- Ideal to test with a large group of users before shipping to production.
- Review before publication
Some general notes on these tracks
Only a single version can be propagated all the way through to production from any one of these tracks.
Artifacts published to the testing tracks are accessible to users who opt-in the testing programs in the Play Store.
On each track you can upload either an Android App Bundle or an APK.
A closer look at Internal App Sharing
Next to the above tracks the Play Store offers a special developer tool, Internal App Sharing.
The most important characteristic of Internal App Sharing is that uploading an APK or AAB here does not have any effect on releases published in the Play Console. This means that it will never be possible to propagate directly from Internal App Sharing to a testing track or production.
Also, apps uploaded to Internal App Sharing can be debuggable. That means you can attach a debugger to a build that you will be able to install from the Play Store.
And you don’t need to increment version codes to upload a new version, so you don’t have to reserve version code spaces for development or worry about running out of version codes. You can independently test versions without them overriding one another by sharing a unique link for each upload.
You can authorize uploaders from your dev team to only enable access to Internal App Sharing, without having to give them access to any other part of the Play Console.
To authorize downloaders visit “Development tools > Internal app sharing” on the Play Developer Console. You can whitelist users by using an emails list of opt in for link-sharing which will allow anyone that has the link to download the test build to their device.
Note: We are aware of current limitations with multiple accounts on a device.
To work around this you can either enable all accounts to have access to Internal App Sharing, or allow testers outside of email lists to download in the Play Console.
Testing advanced features with Internal App Sharing
With Internal App Sharing you can test onDemand installation of Dynamic Feature Modules in the same environment as a real user in the wild. By uploading a debuggable version you can even attach a debugger in Android Studio to check if you’re hitting all the right code.
Also in-app updates can be tested by uploading a version with an older version code to Internal App Sharing. To get started follow this flow:
- Upload two versions with different
versionCodeattributes to Internal App Sharing.
- Install the one with the lower version through the Internal App Sharing URL.
- Open the link with the higher version, but do not install it.
- Open the installed version again.
- You now see that an update is available.
Wouldn’t it be nice if you could easily access old versions of your app and share it with others right away? Spoilers…
Introducing Historical Releases
Historical Releases enable quick and deterministic access to older versions of your application.
Users that have access to Internal App Sharing also can access any version uploaded to a production track. And all you need to know for that is the release’s version code and package name.
Equipped with this information you can install historical versions of your app by following this URL scheme:
https://play.google.com/apps/test/<package name>/<version code>
But you can also find the version code and links to manage authorized testers in the Bundle Explorer. In the “Internal app sharing” section you will find all the info needed to install a specific version. Once you have everything set up you can install historical AAB and APK releases using the URL.
Further reading & next steps
Wojtek Kaliciński gives you the run down on local development and testing with on-demand modules.
Further, you can learn about other features enabled through Android App Bundles these two recorded sessions from Google I/O and Android Dev Summit 2019.