My customer don’t want to publish their apps on Google Play Store, but he still needs to manage them on his Android Enterprise fleet. Do you have a solution?
Let’s face it: some customers have Android fleets but are reluctant to publish their Business App to the Google Play Store, for a various set of reasons.
The answer is Yes it’s possible!
This requires some extra steps compared to managing a Google Play Store app though. It also requires a Google Play developer account.
Restrictions on externally hosted apps
Externally hosted apps are subject to the following restrictions:
- Externally hosted apps can only be published to production. Closed releases for externally hosted apps aren’t supported.
- IT admins can’t remotely install externally hosted apps on devices with work profiles. Work profile users must install them manually from managed Play.
- Android Auto second-screen projection is disabled. This is because all Auto-targeted apps must go through a specific review to ensure that they’re not distracting to drivers.
Generate JSON metadata file
To publish an externally hosted app, you need to upload a JSON file containing the app’s metadata to the Play Console. This allows you to distribute your app to users in your organization through managed Google Play.
Google provides a Python script you can use to generate the file yourself. To use the script, the following must be installed on your machine and available on your system’s PATH:
- OpenSSL
- JDK
- Python 2.x
- Android Asset Packaging Tool
To generate the JSON file, execute the following command using your APK’s path and URL:
python externallyhosted.py ––apk=<path/to/apk.apk> ––
externallyHostedUrl=“<https://www.example.com/test.apk>” > filename.json
Below is an example of a JSON Definition File, for an application called Wizy Sample.
{
"icon_filename": "res/mipmap-anydpi-v26/ic_launcher.xml",
"file_sha256_base64": "ohyfxNmI7JLZy82anzzO6P6k9iBBCLv2GjIwIot88eE=",
"file_sha1_base64": "qv6aVOzEcgyUNjvzY3hgG/JQO+0=",
"package_name": "io.wizy.android.wizysample",
"application_label": "Wizy Sample",
"icon_base64": "AwAIAMABAAABABwAoAAAAAYAAAAAAAAAAAEAADQAAAAAAAAAAAAAAAsAAAAbAAAAJQAAADIAAAA/AAAACAhkcmF3YWJsZQANDWFkYXB0aXZlLWljb24ABwdhbmRyb2lkAAoKYmFja2dyb3VuZAAKCmZvcmVncm91bmQAKipodHRwOi8vc2NoZW1hcy5hbmRyb2lkLmNvbS9hcGsvcmVzL2FuZHJvaWQAgAEIAAwAAACZAQEBAAEQABgAAAACAAAA/////wIAAAAFAAAAAgEQACQAAAACAAAA//////////8BAAAAFAAUAAAAAAAAAAAAAgEQADgAAAADAAAA//////////8DAAAAFAAUAAEAAAAAAAAABQAAAAAAAAD/////CAAAAV8ABn8DARAAGAAAAAMAAAD//////////wMAAAACARAAOAAAAAQAAAD//////////wQAAAAUABQAAQAAAAAAAAAFAAAAAAAAAP////8IAAABYAAGfwMBEAAYAAAABAAAAP//////////BAAAAAMBEAAYAAAAAgAAAP//////////AQAAAAEBEAAYAAAAAgAAAP////8CAAAABQAAAA==",
"uses_feature": [
"android.hardware.faketouch"
],
"version_code": "1",
"file_size": 1993463,
"externally_hosted_url": "https://elisedupont.fr/wizysample.apk",
"version_name": "1.0' compileSdkVersion='29' compileSdkVersionCodename='10",
"minimum_sdk": "27",
"certificate_base64": ["..."]
}
Publish an externally hosted app in the Play Console
After generating your app’s JSON metadata file, you can use the Play Console to publish the app:
- Sign in to the Google Play Console with your WizyEMM master Gmail account.
If you haven’t already, you need to associate this WizyEMM master Gmail account with the Play Console (see Register for a Google Play Developer account for more details). - Create a private app by publishing to your own organization.
- Sign in to the Google Play Console.
- Click Add new application.
- Select a default language and add a title for the app. The name should be exactly how you want it to appear in managed Google Play.
- Go to Pricing & Distribution > User programs > Managed Google Play.
- Check the Turn on advanced managed Google Play features box.
- Check the Privately target this app to a list of organizations box.
- Click Choose Organizations.
- Enter your Organization ID. Your Organization ID is listed in the Admin Settings tab of your managed Google Play (login with your WizyEMM master Gmail account).
- Create a production release:
- Select I am uploading a configuration for an APK hosted outside of Google Play.
- Upload the app’s JSON metadata file.
Authenticate externally hosted APK download requests
When managed Play makes a request to download an APK from an external server, the request includes a cookie containing a JSON Web Token (JWT). We recommend decoding the JWT to authenticate the download. For more details, see Authenticating the download on the enterprise server.
How the app looks like in your Play Store
Once the app release is effective, you will find your privately-hosted application in your Play store in the WizyEMM console.
The application will appear as below:
Need some help for your business use case ? Contact us.