How can I silently push an apk and get it installed by android device policy using android management api?

给你一囗甜甜゛ 提交于 2019-12-13 01:29:32

问题


I am trying to push an APK to the device and get it installed by Android device policy (Device owner) rather than pushing application from play store.

I am able to push applications that are available on play store using device policy


{
  "packageName": string,
  "installType": enum(InstallType),
  "lockTaskAllowed": boolean,
  "defaultPermissionPolicy": enum(PermissionPolicy),
  "permissionGrants": [
    {
      object(PermissionGrant)
    }
  ],
  "managedConfiguration": {
    object
  },
  "disabled": boolean,
  "minimumVersionCode": number,
  "delegatedScopes": [
    enum(DelegatedScope)
  ],
  "managedConfigurationTemplate": {
    object(ManagedConfigurationTemplate)
  }
}

Is there any way I can push an APK to the device and get it installed by android device policy ?


回答1:


It's not possible to use the Android Management API to install an APK that is not in Play.

However you can publish your app in Play and restrict it to one or more enterprises, this way your app won't be visible publicly. This is also explained here in the documentation of the Android Management API.



来源:https://stackoverflow.com/questions/56287961/how-can-i-silently-push-an-apk-and-get-it-installed-by-android-device-policy-usi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!