I wanted to create a device with initial position such as
c8y_position:{
“lat”:34.
“lon”:23,
“alt”:0
}
Code snippet is as follows
import c8y.Position;
ManagedObjectRepresentation managedObjectRepresentation = new ManagedObjectRepresentation();
managedObjectRepresentation.setName(device.getName());
managedObjectRepresentation.setType(device.getType());
managedObjectRepresentation.set(new IsDevice());
managedObjectRepresentation.set(new Agent());
managedObjectRepresentation.set(new Position[]);
As the Position array is not taking multiple values,what are the possible ways of doing it ?