I have multiple datasources/devices based on the mac address of ESP8266 containing 3 variables. Now i want to get the data from ubidots and show it in an android app. As i have multiple datasources i want to authenticate the user with datasource label to get the correct/relevant data. Please help me to solve this problem. i had already reviewed the Ubidots Android SDK tutorial but it is so simple and get the data from single data source by entering variable id.
Right now the Java library only supports to get data using the variable’s ID, if you want to use the variable’s label you should construct your request for your app according to our API structure.
Ok i got it… would you please tell me how i can authenticate the user from Device/Data source Label if it exists or not for user sign in? and if it exists get the values of that Datasource
Greetings sir, our API doesn’t support the authentication that you describe for sign in, right now we only provide an unique TOKEN to each user to send and retrieve data from our site. If you need a custom sign In way or you want to filter your devices to be available for certain users in an organization you should contact to our sales department for a business plan here.
OK… i want to get the last latest value from the server to android app please suggest me should i choose OkHttp or MQTT? Which on is flexible and easier to implement?
I think that HTTP has strong documentation and you will find many examples on the web to be implemented than MQTT in android, but anyone from them is a good option. You would use TCP as well following the structure described in this article.