Когда я выполняю команду LOCK или REBOOT в Android API управления, ни один из них не выполняется на устройстве:
Command command = new Command();
command.Type = "LOCK";
var operation = svc.Enterprises.Devices.IssueCommand(command, "enterprises/LCxxxxxxxx/devices/3ded38daabec2df8").Execute();
//svc is equal to authenticated Google.Apis.AndroidManagement.v1.AndroidManagementService;
Ответ:
Operation.Metadata
Count = 5
[0]: {[@type, type.googleapis.com/google.android.devicemanagement.v1.Command]}
[1]: {[type, LOCK]}
[2]: {[createTime, 2020-01-15 9:59:15 PM]}
[3]: {[duration, 600s]}
[4]: {[userName, enterprises/LCxxxxxx/users/10763xxxxxxxxxxx]}
После этого здесь: https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand#commandtype
Уже успешно отправил политику на устройство и может получить данные и удалить их.
Спасибо