How to connect to "events" endpoint from android? RRS feed

  • Question

  • Hello.

    I have a board that sends jsons with telemetry to IoT hub (using http). I want to read telemetry data from my android device. I looked some examples of reading messages from IoT hub for android, but I found only how to read them from "Cloud to device feedback" endpoint. So now my application looks like:

    json from the board  ---->  "Events" endpoint   ---> Function application that resending json to "Cloud to device feedback" endpoint  ----->   "Cloud to device feedback" endpoint  ----> Android device.

    I'm a beginner in Azure, so I'm sure that exists smarter way to do that. (json from the board  ---->  "Events" endpoint   ---> Android device). I did it on my desktop, but looks like android doesn't work with some libraries from desktop project.

    Does anybody know how can I do it? (maybe some guides or lessons)

    Friday, May 25, 2018 8:37 AM

All replies

  • Hello Jørgen s Larsen,

    You can see this document.It shows how to read the telemetry from you IoT Hub with Java.

    In the ReadDeviceToCloudMessages.java sample, it connects to the service-side Events endpoint on your IoT Hub and receives the device-to-cloud messages.

    BTW, you can get the eventHubsCompatibleEndpoint, eventHubsCompatiblePath and iotHubSasKey from Azure Portal simply. The eventHubsCompatibleEndpoint is in this format: 


    Best Regards,


    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.

    Monday, May 28, 2018 6:06 AM
  • Hello Jørgen s Larsen,

    Have you tested the sample in my last reply? Or is there any other question about this issue?

    Please feel free and let me know.

    Best Regards,


    Thursday, May 31, 2018 2:14 AM