[SOLVED] Getting data from ubidots using android studio


#24

At this very moment the Java Library only let’s you get information from the Devices and Variables only using IDs.

I think a workaround for this would be that after you obtain the information using the library just make a filter for the Devices and Variables and return only what you need.

Here’s a link to StackOverflow where someone answered how to do that filtering in Java. If you’re using Android Studio 3.0, you don’t need to do anything extra to activate the Java 8 features, but if you’re not using Android Studio 3.0 then you have to activate the Jack toolchain, but remember that Jack is now being deprecated.


#25

I’m not getting that. I don’t know how to apply filter on Ubidots java library… Should i use REST API (HTTP request) to get the device and variables by their label?


#26

The filter would not be applied on top of the library but in its results, i.e. the array of Devices/Variables you receive.

You can use the HTTP API to get Variables by their label, there’s no way to get Devices by their label, yet.


#27

would you please suggest me an easy way to solve my problem… i have created multiple devices using the mac address and each have 3 variables i just want to get the data of particular device variables using device label so that the user with unique device label (mac address) can get his own data.


#28

I’m waiting for your reply


#29

i try that code but unfortunately close app . and data 0 .
i am new about android studio and the code.
Screenshot_41