Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi
I'm new to Thingworx and I working with Android Edge SDK to send some data to Thingworx Platform.
Now I want to execute Services that I created on Thingworx platform but I don't know how to do it.
Thank you very much.
Hi Puntavut, is this service created on the platform or on the Edge SDK? In either case you will have to call this service and well there are several ways of doing so. The most common usage (keeping it simple) would be to create a Mashup and use any widget that can utilize the service you have created.
A simple scenario would be something like this
1. Create Mashup
2. Use couple of Value Display widgets and a button
3. Using the button call the service on Click event and display the output of the service
What you see below a example mashup just showing the kind of ThingTemplate i'm using for my Thing.
Here's just to give you an idea who it would look like :
In Mashup
Viewing the Mashup
You might want to check the ThingWorx Video Tutorials and the ThingWorx documentation from your own installation which you can access from Documentation
Hi Sushant,
The service I want to execute is on platform but I want to execute on an Edge SDK
Actually, I want to create Thing and binding their properties on platform automatically when Edge SDK connect to platform.
Thank you for answer me.
Hello Puntavut Lertpunyavuttikul
There is a document with examples named "ThingWorx Edge Android SDK Developer's Guide"
http://support.ptc.com/WCMS/files/170147/en/ThingWorx_Edge_Android_SDK_Developers_Guide.pdf
Do these information from this article help you?
Puntavut, could you clarify which Edge SDK you are using? Because you have the option to execute the services both on platform and also on the device running the Edge SDK. However i think it would be better if you can share some detail on your use case to streamline the answer to your question.
The ConnectedThingClient has a method called invokeService that you can call to invoke a server-side service from the edge.