Remove All Ads from XDA
Honor 9 Lite

Use of threads with fragments

212 posts
Thanks Meter: 27
By aeroxr1, Senior Member on 26th August 2014, 12:21 PM
Post Reply Email Thread
Hi I have just started developping in android so I'am not an expert. My question is: I am creating an application with two fragments , both the fragments have to retrive data from a service in real-time. (In particular on fragment has to draw a plot using the data read and the other has to make move an avatar with the data read, all of this in real-time).My doubt is: do I have to use two threads, one for each fragments, or I can do this with just UI thread ?
To be more precise :
We are two guys that working on following project :
We have to receive data from a bluetooth 4.0 BLE sensor, and we have to send it to two diffent fragments In one we have to plot a 2d graph with AndroidPlot In the other we have to move a 3d rigged model using jpct-ae + bones.
We wanted to use a started service to handle bluetooth (by extending IntentService) , but we have a lot of doubts. If two fragments have to work in the same time we have to use two different threads ?

thanks for your answers and please let me know if my question is not clear.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes