简体   繁体   English

更新处于 KIOSK 模式的托管 Google Play 应用

[英]Update Managed Google Play app that is in KIOSK mode

For a client a I have created an simple app that is used by the clients employees and the clients customers.对于客户 a,我创建了一个简单的应用程序,供客户员工和客户客户使用。 All phones are Samsung A70 phones running Android 9.所有手机均为运行 Android 9 的三星 A70 手机。

The app has been setup to run in KIOSK mode so that only the app can be run (dedicated device).该应用程序已设置为在 KIOSK 模式下运行,因此只能运行该应用程序(专用设备)。 It is a managed app so that only the devices that the client owns can install the app via the clients enterprise.它是一个托管应用程序,因此只有客户拥有的设备才能通过客户企业安装该应用程序。 The app is installed via the Google Management API using a policy.该应用程序是使用策略通过 Google Management API 安装的。

I just use the https://developers.google.com/android/management/quickstart to create a policy and use the QR code to install the phones from scratch.我只是使用https://developers.google.com/android/management/quickstart创建策略并使用二维码从头开始安装手机。

So far all good.到目前为止一切都很好。 The problem is that I cannot get the phones to update to newer verions of the kiosk app.问题是我无法让手机更新到更新版本的自助服务终端应用程序。

I understand that when apps are in Kiosk mode, they cannot simply be updated and that you have to set a time interval where the app is allowed to exit KIOSK mode and update itself.我知道当应用程序处于 Kiosk 模式时,它们不能简单地更新,您必须设置允许应用程序退出 KIOSK 模式并自行更新的时间间隔。 But even though I set the time interval in the policy, it does not update.但是即使我在策略中设置了时间间隔,它也不会更新。 Even tried to allow the time interval to be the whole day.甚至试图让时间间隔是一整天。

I also tried forcing updates using the minimumVersionCode policy, but updates are still ignored.我还尝试使用 minimumVersionCode 策略强制更新,但仍然忽略更新。

I have checked that the managed app has been uploaded and approved (it has been actually over a month since the last version was uploaded), so I'm pretty sure it doesn't have anything to do with cache.我已经检查过托管应用程序是否已上传并获得批准(自上一个版本上传以来实际上已经有一个多月了),所以我很确定它与缓存没有任何关系。 It says that the app is version 11.它说该应用程序是版本 11。

Production

Release:
0.0.11
Full roll-out.
1 app bundle, version code:
11

The policy the phones are using is following.手机使用的政策如下。 (As per my clients request I have removed the full package url) (根据我的客户要求,我已经删除了完整的包 url)

import json

#policy_name = enterprise_name + '/policies/internalUsers'

policy_name = enterprise_name + '/policies/developer'



policy_json = '''
{
  "applications": [
    {
      "packageName": "[package_url].itemrepair",
      "installType": "KIOSK",
      "defaultPermissionPolicy": "GRANT",
      "minimumVersionCode": 11
    }
  ],
  "safeBootDisabled": true,
  "factoryResetDisabled": false,
  "debuggingFeaturesAllowed": true,
  "appAutoUpdatePolicy": "ALWAYS",
  "systemUpdate":
    {
      "type": "WINDOWED",
      "startMinutes": 0,
      "endMinutes": 1439
    }

}
'''

androidmanagement.enterprises().policies().patch(
    name=policy_name,
    body=json.loads(policy_json)
).execute()

I'm sure that the phones are using the correct policy as I can see the devices have synced the policies when I list all the devices in the enterprise.我确定电话使用了正确的策略,因为当我列出企业中的所有设备时,我可以看到设备已同步策略。 Also they are all online so I can also reboot a device using the reboot command.此外,它们都在线,所以我也可以使用重启命令重启设备。

full = 'enterprises/[enterprise_id]/devices/[device_id]'
androidmanagement.enterprises().devices().issueCommand(name=full,body={'type':'REBOOT'}).execute()

But the app is still not updated.但是应用程序仍然没有更新。 So I'm hoping that someone has some ideas as to what I am missing.所以我希望有人对我缺少的东西有一些想法。

1. I may be wrong but I had the same problem and it got fixed after I manually updated the app. 1.我可能错了,但我遇到了同样的问题,在我手动更新应用程序后它得到了修复。 So in my case I added "appAutoUpdatePolicy": "ALWAYS", AFTER I made the update, which ended up in my dedicated device not updating my Kiosk App.因此,在我的情况下,我"appAutoUpdatePolicy": "ALWAYS",更新后添加了"appAutoUpdatePolicy": "ALWAYS",结果在我的专用设备中没有更新我的 Kiosk 应用程序。 If you reinstall or manually update your app and then publish any new update AFTER you made the change to your policy, it should work.如果您重新安装或手动更新您的应用程序,然后在您对策略进行更改后发布任何新更新,它应该可以工作。

2. 2.

I understand that when apps are in Kiosk mode, they cannot simply be updated and that you have to set a time interval where the app is allowed to exit KIOSK mode and update itself.我知道当应用程序处于 Kiosk 模式时,它们不能简单地更新,您必须设置允许应用程序退出 KIOSK 模式并自行更新的时间间隔。 But even though I set the time interval in the policy, it does not update.但是即使我在策略中设置了时间间隔,它也不会更新。 Even tried to allow the time interval to be the whole day.甚至试图让时间间隔是一整天。

If you are refering to:如果您指的是:

  "systemUpdate":
    {
      "type": "WINDOWED",
      "startMinutes": 0,
      "endMinutes": 1439
    }

Afaik this is about android system updates and not your Kiosk App. Afaik 这是关于 android 系统更新而不是您的 Kiosk 应用程序。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM