5 Replies Latest reply on Jan 8, 2018 10:06 AM by aagarwal-2 RSS
    aagarwal-2 Explorer

    Android Smartphones and Thingworx tutorial

    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

      • Re: Android Smartphones and Thingworx tutorial
        aanjan Heavyweight Champ

        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?

          • Re: Android Smartphones and Thingworx tutorial
            aagarwal-2 Explorer

            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?

              • Re: Android Smartphones and Thingworx tutorial
                aanjan Heavyweight Champ

                When you run the REST call, do you see any error message(s) on the Platform's Application log?

                  • Re: Android Smartphones and Thingworx tutorial
                    aagarwal-2 Explorer



                    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 &#x3a; 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 &#x3a; 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.





                      • Re: Android Smartphones and Thingworx tutorial
                        meghan Communicator



                        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.