Send Streaming data from Thingworx Foundation to Android Application
- September 7, 2018
- 1 reply
- 1240 views
I am new to Thingworx. I have installed and run Thingworx Foundation Server 8.0.
My requirement is to develop an Android application to receive some sample streaming data from Thingworx and display in my Android App without any sensors.
I have referred these Guides
2. Thingworx android SDK Tutorial
I have downloaded the Thingworx-Android-SDK-1.1.2 and tried out some sample app called android-steam-thing and its working. In that example, I am connecting to a Thing SteamSensor1 which was available in the Thingworx-Android-SDK-1.1.2/samples/android-steam-thing/entity folder. In Android SDK, we are setting Random numbers in Temperature, Pressure, TotalFlow, InletValve, etc, from Android to Thingworx using setProperty method
double temperature = 400 + 40 * Math.random();
double pressure = 18 + 5 * Math.random();
totalFlow += Math.random();
boolean inletValveStatus = true;
setProperty("Temperature", temperature);
setProperty("Pressure", pressure);
setProperty("TotalFlow", totalFlow);
setProperty("InletValve", inletValveStatus);
Now what I need is I need to send this random data from Thingworx Composer to my Thingworx Android App.
And I can able to set a single value in a Thing property and get value in my App using getProperty() method.
But I need to send streaming data in a frequent interval from Composer to Android App. I don't have any sensors at present. But I need some streaming data set up on my foundation server. What should I do in my composer? I have no idea,
IS THIS POSSIBLE? Any help is appreciated.
Attaching my Things_SteamSensor1.xml
