If you pass a DiagnosticRequest to VehicleManager.send(...), it will wrap that in a CommandMessage and set the action field to ADD. If you want to cancel a diagnostic request, you have to build your own Command and set the action to CANCEL.
That seems OK, but then the API gets confused - if you pass a Command with a DiagnosticRequest inside to VehicleManager.request(...), it won't set up the correct listener. It'll be looking for a command response instead of a diagnostic response.
If you pass a
DiagnosticRequesttoVehicleManager.send(...), it will wrap that in aCommandMessageand set theactionfield toADD. If you want to cancel a diagnostic request, you have to build your ownCommandand set the action toCANCEL.That seems OK, but then the API gets confused - if you pass a
Commandwith aDiagnosticRequestinside toVehicleManager.request(...), it won't set up the correct listener. It'll be looking for a command response instead of a diagnostic response.