Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I am having issues running the Android tutorial outlined in Android Smartphones and Thingworx - ThingWorx : ThingWorx. Can someone please confirm that it works in Composer 7.1.1
Solved! Go to Solution.
Anurag,
A quick test, try going to the PlatformSubsystem Subsystem, click on the Configuration menu option, locate the "Allow Request Method Switch" option and check that, and then uncheck the "Filter Content Type" option.
Try running your request again and see if the property value changes.
Meghan
Anurag, please do post some information on where you're running issues into. Is it the connectivity side or is it something on the platform?
Hello Ravi,
I am using the 120 day trial server and have gone through all the steps as per the tutorial. I do not see any data reflected in the mashup for the specific Thing. The url being used in the android app to update the properties is shown below -
URL url = new URL("http://" + ipAddress
+ "/Thingworx"
+ "/Things/AndroidDevice_" + thing
+ "/Properties/" + property
+ "?method=put"
+ "&value=" + value
+ "&appKey=" + appKey);
Is this correct?
When you run the REST call, do you see any error message(s) on the Platform's Application log?
Hi,
URL -
http://<IP>/Thingworx/Things/AndroidDevice_354994059405056/Properties/cpuUsage?method=put&value=75&appKey=<App Key>
The response is -
<HTML><HEAD><TITLE>Property Value For AndroidDevice_354994059405056 : cpuUsage</TITLE><LINK rel='Stylesheet' href='/Thingworx/css/thingworxapi.css' type='text/css'></LINK><META http-equiv='Content-Type' content='text/html'></META><META http-equiv='cache-control' content='no-cache, no-store'></META><META http-equiv='expires' content='-1'></META><META http-equiv='pragma' content='no-cache, no-store'></META><script type="text/javascript" src="http://gc.kis.scr.kaspersky-labs.com/42C8AA17-0B2E-684A-844D-ACE027904012/main.js" charset="UTF-8"></script></HEAD><BODY><IMG SRC="/Thingworx/images/ThingworxLogo.png"/><BR/><H1>Property Value For AndroidDevice_354994059405056 : cpuUsage</H1><TABLE><TR><TH>cpuUsage</TH></TR><TR><TD></TD></TR></TABLE></BODY></HTML>
As you can see, no value us returned for cpuUsage, indicating that it is not updated.
Thanks
Anurag
Anurag,
A quick test, try going to the PlatformSubsystem Subsystem, click on the Configuration menu option, locate the "Allow Request Method Switch" option and check that, and then uncheck the "Filter Content Type" option.
Try running your request again and see if the property value changes.
Meghan