private String createEnterprise(AndroidManagement androidManagementClient)
throws IOException {
SignupUrl signupUrl =
androidManagementClient
.signupUrls()
.create()
.setProjectId("myProject")
.setCallbackUrl("https://example.com/myEmmConsole")
.execute();
String enterpriseToken = displayUrlToAdmin(signupUrl.getUrl());
Enterprise enterprise =
androidManagementClient
.enterprises()
.create(new Enterprise())
.setProjectId("myProject")
.setSignupUrlName(signupUrl.getName())
.setEnterpriseToken(enterpriseToken)
.execute();
return enterprise.getName();
}
/**
* Displays the signup URL to the admin and returns the enterprise token which
* is generated after the admin goes through the signup flow. This functionality
* must be implemented by your management console.
*/
private String displayUrlToAdmin(String url) {
...
}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-09-11 (世界標準時間)。"],[[["An Enterprise resource in Android Management binds an organization to your EMM solution, enabling management of devices and policies."],["EMM partners must utilize the Google Play EMM API to establish this enterprise binding for organizations."],["Creating an enterprise binding involves a three-step process: retrieving a signup URL, having the IT admin complete signup, and finally, using the API to create the binding with specific settings like color and logo."],["Multiple enterprise bindings can be created for a single organization to accommodate different departments or regions, offering flexibility in management."]]],["EMM partners managing devices via the Google Play EMM API must use it to create enterprise bindings. This process involves: 1) Retrieving a sign-up URL using `signupUrls.create`, specifying a `callbackUrl` and `projectId`. 2) An IT admin uses the URL to sign up, receiving an `enterpriseToken`. 3) Calling `enterprises.create` to bind, setting display options like `primaryColor`, `enterpriseDisplayName`, and `logo`, using the generated `enterpriseToken` and `SignupUrlName`. Multiple bindings per organization are allowed.\n"]]