發布私人應用程式
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
透過 Google Play Custom App Publishing API 發布的應用程式
已設為公開。需要進行重量驗證
因此可以將發布時間縮短至五分鐘
(相較於透過 Play 管理中心使用超過 2 小時)。
如要為企業發布私人應用程式,請呼叫
Accounts.customApps.create
、
並以參數的形式傳送企業的開發人員帳戶 ID。當中的
要求主體是應用程式的標題,以及應用程式的預設資訊
語言。確認你發布的所有私人應用程式也符合下列規範
規定:
- 套件名稱僅供 Google Play 使用 (並非開發人員帳戶專屬名稱)。
- 應用程式名稱是開發人員帳戶的專屬名稱。
範例
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")
.setOrganizations(
List.of(
new CustomAppOrganization()
.setOrganizationId("C0123wxyz")
.setOrganizationName("My organization")));
CustomApps.Create request =
apiClient.accounts() // Playcustomapp apiClient
.customApps()
.create(DEV_ACCOUNT_ID, appMetadata, apk);
CustomApp response = request.execute();
System.out.println(response);
如果成功,應用程式就會顯示在開發人員帳戶的已發布清單中
開始更新應用程式。應用程式將開放發行
並在 5 分鐘內向使用者
根據預設,已發布的私人應用程式僅供機構使用
連結至開發人員帳戶。設定要為哪些機構
應開放私人應用程式使用;請將機構 ID 新增至
organizations
屬性。
發布私人應用程式
私人應用程式會在發布後自動通過核准,但不會自動獲得核准
使用者無法使用,除非企業 IT 管理員明確授予存取權
或所有核准的應用程式。如要啟用這項功能,請在 EMM 控制台中使用
Users.setAvailableProductSet
(將 productSetBehavior
設為 "allApproved"
)。
您也能使用相同通話讓 IT 管理員將特定應用程式加入許可清單
(將 productSetBehavior
設為 "whitelist"
)。
如要進一步瞭解如何將應用程式新增至使用者的 Google Play 管理版商店,
請參閱「建立自訂商店版面配置」一文。
更新私人應用程式
為了讓企業客戶享有最佳使用者體驗,
建議您將私人應用程式發布功能與應用程式商店和商店整合
可透過 Google Play Publishing API 取得的更新功能。
如此一來,IT 管理員就能發布、編輯及更新私人應用程式
即可直接存取 EMM 控制台或 IDE您可以使用
您專為私人應用程式發布而建立,用於授權 Google Play Publishing API
要求。
您或企業客戶也可以更新私人應用程式和商店
查看 Play 管理中心的詳細資料 (詳情請參閱 Play 管理中心的說明中心)。
開始運用 Google 用戶端程式庫編寫程式碼
Google Play Custom App Publishing API 提供下列用戶端程式庫:
Java、
Python、
.NET、
和 Ruby
進一步瞭解 Android 企業
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eThe Google Play Custom App Publishing API enables publishing private apps for enterprises, subject to a lighter verification process compared to public apps.\u003c/p\u003e\n"],["\u003cp\u003ePrivate apps are automatically approved upon publishing but require explicit IT admin authorization for user access via an EMM console.\u003c/p\u003e\n"],["\u003cp\u003ePrivate apps can be updated programmatically through the API or manually via the Google Play Console by developers or enterprise customers.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries for the API are available in Java, Python, .NET, and Ruby for streamlined integration into existing workflows.\u003c/p\u003e\n"]]],[],null,["# Publish a private app\n\nApps published through the Google Play Custom App Publishing API can never be\nmade public. They're subject to a lighter weight verification process than\npublic apps as a result, reducing publishing time to as little as five minutes\n(compared to over two hours via the Play Console).\n\nTo publish a private app for an enterprise, call\n[`Accounts.customApps.create`](/android/work/play/custom-app-api/v1/accounts/customApps/create),\npassing the enterprise's developer account ID as a parameter. The only required fields in\nthe request body are the title of the app and the app's default listing\nlanguage. Make sure that any private app you publish also meets the following\nrequirements:\n\n- The package name is unique to Google Play (not just unique to the developer account).\n- The title of the app is unique to the developer account.\n\nExample\n-------\n\n Path apkPath = Paths.get(\"PATH_TO_APK\");\n ByteArrayContent apk =\n new ByteArrayContent(\"application/octet-stream\", Files.readAllBytes(apkPath));\n\n CustomApp appMetadata =\n new CustomApp()\n .setTitle(\"APPLICATION TITLE\")\n .setLanguageCode(\"en_US\")\n .setOrganizations(\n List.of(\n new CustomAppOrganization()\n .setOrganizationId(\"C0123wxyz\")\n .setOrganizationName(\"My organization\")));\n\n CustomApps.Create request =\n apiClient.accounts() // Playcustomapp apiClient\n .customApps()\n .create(DEV_ACCOUNT_ID, appMetadata, apk);\n\n CustomApp response = request.execute();\n System.out.println(response);\n\nIf successful, the app will appear in the developer account's list of published\napps in the Play Console immediately. The app will be available for distribution\nto end users within five minutes.\n\nBy default, the published private app is only available to the organization\nlinked to the developer account. To set the organizations to which the\nprivate app should be made available, add the organization IDs to the\n`organizations` property.\n\n### Distributing private apps\n\n| **Note:** You must be a member of the [Android EMM Developer\n| Community](https://emm.androidenterprise.dev/) to use the Google Play EMM API to enable private app distribution. For more information, see the [EMM developer's\n| overview](/android/work/overview).\n\nPrivate apps are automatically approved when published, but aren't automatically\navailable to a user unless an enterprise IT admin explicitly grants them access\nto all approved apps. You can enable this feature in your EMM Console using\n[Users.setAvailableProductSet](/android/work/play/emm-api/v1/users/setAvailableProductSet)\n(set `productSetBehavior` to `\"allApproved\"`).\n\nYou can also use the same call to enable IT admins to allowlist specific apps\nfor a user (set `productSetBehavior` to `\"whitelist\"`).\nFor more information about how to add apps to a user's managed Google Play store,\nsee [Create custom store layouts](/android/work/play/emm-api/store-layout).\n\nUpdating a private app\n----------------------\n\nTo provide the best possible user experience for your enterprise customers,\nwe recommend integrating private app publishing alongside the app and store\nlisting update features available through the [Google Play Publishing API](https://developers.google.com/android-publisher/).\nDoing so gives IT admins the ability to publish, edit, and update private apps\ndirectly from your EMM console or IDE. You can use the same service account that\nyou created for private app publishing to authorize Google Play Publishing API\nrequests.\n\nYou or your enterprise customer can also update private apps and their store\nlisting details from the Play Console (for more information, see the [Play Console help center](https://support.google.com/googleplay/android-developer/)).\n\nStart coding with our client libraries\n--------------------------------------\n\nClient libraries for the Google Play Custom App Publishing API are available in\n[Java](https://developers.google.com/api-client-library/java/apis/playcustomapp/v1),\n[Python](https://developers.google.com/api-client-library/python/apis/playcustomapp/v1),\n[.NET](https://developers.google.com/api-client-library/dotnet/apis/playcustomapp/v1),\nand [Ruby](https://developers.google.com/api-client-library/ruby/apis/playcustomapp/v1).\n\nLearn more about Android Enterprise\n-----------------------------------\n\n- For more information about developing an EMM solution for Android, see [Android Enterprise](https://developers.google.com/android/work/).\n- For information about best practices for developing Android apps for enterprise distribution, see [Android for\n enterprise](https://developer.android.com/work/)."]]