locked
Azure IOT Hub (Device twin question for java sdk ) RRS feed

  • Question

  • Device twin does not return status, connectionState, lastActivityTime, statusUpdateTime in the java service sdk version  (iot-service-client : 1.13.2)

    source code:

    DeviceTwin twinClient = null;
                twinClient = DeviceTwin.createFromConnectionString(iotPlatformUrl);
                SqlQuery sqlQuery =SqlQuery.createSqlQuery("*", SqlQuery.FromType.DEVICES, null, null); 

    Tuesday, May 29, 2018 6:32 PM

All replies

  • Hello Jahnavi_A,

    This is not issue of Java SDK. It is by designed because the service client can retrieve only tags and desired and reported system properties. You can reference back-end operations in device twin document.

    About status, connectionState, lastActivityTime and statusUpdateTime, they belong to device identity properties. The service client can't access these properties.

    But RegistryManager can retrieve device identity properties. You can use registryManager.getDevice() API to do it.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 30, 2018 3:25 AM