I'm a new android and i'm working on my project. My project, calculate heart rate from camera phone, it gets frame from camera phone, and analyze data of frames into Red, Green, and Blue plane.Then, i perform these plane and get results, then i use these results to draw real time graph on my layout. You know, frames are always arrive continuously, it means that i should have 3 threads, thread 1 is used to get frames and analyze data, thread 2 gets input from ouput of thread 1 and performs its function, thread 3 gets input from thread 2 and draws a real time graph. I really am a new android and i tried to find out about "thread android" keyword but i still don't know how to apply my knowledge i got, how can threads communicate with each other, so i still deadlock.
Please give me advices, and if have example code is great. Thanks,