Publish a private app

To publish a private app for an enterprise, call Accounts.customApps.create, passing the enterprise's developer account ID as a parameter. The only required fields in the request body are the title of the app and the app's default listing language. Make sure that any private app you publish also meets the following requirements:

  • The package name is unique to Google Play (not just unique to the developer account).
  • The title of the app is unique to the developer account.

Example

Path apkPath = Paths.get("PATH_TO_APK");
ByteArrayContent apk =
    new ByteArrayContent("application/octet-stream", Files.readAllBytes(apkPath));

CustomApp appMetadata = new CustomApp() .setTitle("APPLICATION TITLE") .setLanguageCode("en_US");

CustomApps.Create request = apiClient.accounts() // Playcustomapp apiClient .customApps() .create(DEV_ACCOUNT_ID, appMetadata, apk);

CustomApp response = request.execute(); System.out.println(response);

If successful, the app will appear in the developer account's list of published apps in the Play Console immediately. The app will be available for distribution to end users within five minutes.

Distributing private apps

Private apps are automatically approved when published, but aren't automatically available to a user unless an enterprise IT admin explicitly grants them access to all approved apps. You can enable this feature in your EMM Console using Users.setAvailableProductSet (set productSetBehavior to "allApproved").

You can also use the same call to enable IT admins to whitelist specific apps for a user (set productSetBehavior to "whitelist"). For more information about how to add apps to a user's managed Google Play store, see Create custom store layouts.

Updating a private app

To provide the best possible user experience for your enterprise customers, we recommend integrating private app publishing alongside the app and store listing update features available through the Google Play Publishing API. Doing so gives enterprise IT admins the ability to publish, edit, and update private apps directly from your EMM console or IDE. You can use the same service account that you created for private app publishing to authorize Google Play Publishing API requests.

You or your enterprise customer can also update private apps and their store listing details from the Play Console (for more information, see the Play Console help center).

Start coding with our client libraries

Client libraries for the Google Play Custom App Publishing API are available in Java, Python, .NET, and Ruby.

Learn more about Android in the enterprise

  • For more information about developing an EMM solution for Android, see Android EMM Developers.
  • For more information about integrating managed Google Play tasks into your EMM console, see the Google Play EMM API.
  • For information about best practices for developing Android apps for enterprise distribution, see Android in the enterprise.

Send feedback about...

Google Play Custom App Publishing API
Google Play Custom App Publishing API