I was able to interface one Spatialphidget with an Android tablet successfully. Now, I am trying to interface multiple (2 to begin with) Spatial Phidgets to the tablet through a hub and fetch the acceleration values from both of them at the same time. I would like to know how should I go about. I have tried the following ways but they don't seem to work.
1. I am using the Phidget Manager to get the list of the Phidgets attached and using a vector to store the serial numbers of each of the phidget.
I have created multiple Spatial Phidget objects, each having a separate data listeners. Then in the manager's attach listener I use the open(int serial number) method to open the phidget with the serial numbers which are stored in the vector.
This implementation gives only the acceleration readings of the recent phidget attached and doesn't consider the earlier phidget attached.
2.Secondly, I tried to call two separate threads in the manager attach listener and try to open them individually in their individual threads. Unfortunately, it gives the same result as above.
What is the ideal way to implement this functionality. Is there any sample/resources showing this implementation.