If I have a database in which I write data step by step(during an interval of 5 minutes) and as soon I write a new data to the DB I have a client thread which takes it from there and sends it to a remote server.
The problem is that how could I do this:write data,let the client thread that I wrote new data…and to this until I finish writing data in DB?
The writing data in Db is done within onCreate() only the send part is done in a new thread.
Thx
how about usuing a queue:
BlockingQueue mQueue=new LinkedBlockingQueue();
Then in your worker thread (or ui thread) just pop stuff on the queue.