简体   繁体   English

无法使用 Android 管理 API 重新启动设备

[英]Unable to REBOOT a device using Android Management API

I am trying to reboot a device using the enterprise ID and device ID.我正在尝试使用企业 ID 和设备 ID 重启设备。 Below is the request parameter下面是请求参数

Screenshot from Android Management API guide Try It feature截图来自 Android Management API guide Try It feature

Android Management API 指南的屏幕截图试用功能

I don't see any action on the device end.我在设备端看不到任何操作。 If there is any alternate approach or if anyone had a successful attempt in this process, please let me know the process you followed.如果有任何替代方法,或者如果有人在此过程中成功尝试,请告诉我您遵循的过程。

Thanks in advance for your assistance.提前感谢你的帮助。

Did you follow all the basic steps mentioned in the below link given by android management api?您是否遵循了 android management api 提供的以下链接中提到的所有基本步骤?

https://developers.google.com/android/management https://developers.google.com/android/management

If yes for above, check the below options, 1 Check your device internet connection.如果是,请检查以下选项,1 检查您的设备互联网连接。 It should be connected to a network 2 check is there any error after you submit 3 How did you enroll your device它应该连接到网络 2 提交后检查是否有任何错误 3 您是如何注册您的设备的

Tried this exact code and device reboots in seconds.尝试了这个确切的代码,设备会在几秒钟内重新启动。 Try checking the parameters of your request to make sure the device id is correct.尝试检查请求的参数以确保设备 ID 正确。 You can also set a longer duration to allow more time for the command to go through in case of delay or connectivity issues.您还可以设置更长的持续时间,以便在出现延迟或连接问题时有更多时间执行命令。

projectid = [Your-projectid-here] 
enterprises/LC03nfv2bi/devices/33395ba163dde778 
{
   "type": "REBOOT",
   "duration": "600s"
}

Based on this link https://developers.google.com/android/work/requirements#1-device-provisioning this feature is only available on android 7.0+.基于此链接https://developers.google.com/android/work/requirements#1-device-provisioning此功能仅适用于 android 7.0+。

android重启设备文档

Hope it will help you.希望它会帮助你。

You have to use the next URL with POST: https://androidmanagement.googleapis.com/v1/enterprises/LC00XXXXX/devices/32e2bXXXXXXXXX:issueCommand您必须使用下一个 URL 和 POST: https://androidmanagement.googleapis.com/v1/enterprises/LC00XXXXX/devices/32e2bXXXXXXXXX:issueCommand

And this json in the request body请求正文中的这个 json

{  "type": "REBOOT" }

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

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