简体   繁体   English

(Android 企业政策 - 如何允许 gmail.com 或任何其他 Z0C83F57C786A0B4A39EFAB23Z371 被使用在 Play 商店中)

[英]Android enterprise policy - how to allow gmail.com or any other email account to be used in play store (which is managed)?

We are trying out Android Management API.我们正在试用 Android 管理 API。 and we are controlling apps by defining them in the policy.我们通过在策略中定义应用程序来控制它们。

Now for some reason, we need to allow the user to purchase the app or use an already purchased app (which will be the personal account ie gmail.com)现在由于某种原因,我们需要允许用户购买应用程序或使用已购买的应用程序(这将是个人帐户,即 gmail.com)

{
...

"applications": [
    {
      "packageName": <app_package_name>,
      "installType": "BLOCKED"
    },
    {
      "packageName": <app_package_name>,
      "installType": "AVAILABLE"
    }
  ]
}

But, the device enrolled in fully managed devices mode using Android Management API, the play store is managed and hence allows only {some_random_number}@android-for-work-gsearvices.com account to be used in play store.但是,使用 Android 管理 API 以完全托管设备模式注册的设备,Play 商店是托管的,因此只允许 {some_random_number}@android-for-work-gsearvices.Z4D236D9A2D102C505FE6AD1C50DA 帐户使用 BEC50DA 商店。 Other email accounts don't show up in the user selection of the play store, even after logging in from settings.即使从设置登录后,其他 email 帐户也不会显示在 Play 商店的用户选择中。

Please assist me to find the solution for the above thingy.请协助我找到上述问题的解决方案。

There are two ways to do this:有两种方法可以做到这一点:

1.) For personal use set up a company-owned device with a work profile this enables the device for both work and personal use to do this you need to allow personal usage in your enrollment token and add personalApplicationPolicy in your policy. 1.) 为个人使用设置公司拥有的设备和工作配置文件,这使设备既可用于工作也可用于个人使用,您需要在注册令牌中允许个人使用,并在您的策略中添加personalApplicationPolicy This will set up a separate work and personal profile in which you can use your own app.这将设置一个单独的工作和个人资料,您可以在其中使用自己的应用程序。

You can also check this https://developers.google.com/android/work/overview#company-owned-work-profile and https://developers.google.com/android/management/provision-device#company-owned_devices_for_work_and_personal_use to better understand how this works.您还可以查看此https://developers.google.com/android/work/overview#company-owned-work-profilehttps://developers.google.com/android/management/provision-device#company-owned_devices_for_work_and_personal以更好地了解这是如何工作的。

Sample Code:示例代码:

Enrollment token注册令牌

enrollment_token = androidmanagement.enterprises().enrollmentTokens().create(
    parent=enterprise_name,
    body={"policyName": policy_name,
          "allowPersonalUsage": "PERSONAL_USAGE_ALLOWED",
          "duration": "2592000 s"}
).execute()

In your policy在您的保单中

 "personalUsagePolicies": {
    "personalApplications": [
      {
        "packageName": [package name],
        "installType": "AVAILABLE"
      }
    ]
  }

2.) For work use you can work with the developer of the app to provide a license key that can be distributed to your users via a managed config for the specific application. 2.) 对于工作用途,您可以与应用程序的开发人员合作,提供可以通过特定应用程序的托管配置分发给您的用户的许可证密钥。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android 企业策略 - 如何在白名单模式下使用托管 Play 商店和大量应用程序? - Android enterprise policy - how to use managed play store in Whitelist mode with big number of apps? Android Management API - Managed Play Store 中如何使用集合? - How are collections used in the Android Management API - Managed Play Store? 如何获取与 Gmail 帐户相关的 Android Enterprise 详细信息 - How to get Android Enterprise details related to Gmail account 如何为 Gmail 等任何应用程序为每台设备修补托管配置 - How to patch managed configuration per device for any app like Gmail 企业应用程序的托管配置(Android 管理 API) - Managed Configurations for an enterprise app (Android Management API) 无法应用Android Enterprise政策 - Not able to apply Policy of Android Enterprise 如何使用Android管理API在同一企业下的部分设备(不是所有设备)上推送策略 - How to push policy on some devices(not on all devices) under same enterprise using Android management API 使用服务帐号创建企业 - Create a Enterprise using a service account 从 Play 商店中的不同帐户安装应用程序未被 Android 管理 API 阻止 - App installs from different account in Play Store not being blocked by Android Management API 如何在 Android 管理 API 中创建企业,无需客户交互以获得企业令牌? - How to create enterprise in Android Management API without customer interaction for getting enterprise token?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM