How to communicate with the thread created by other activity

Put your problem here if it does not fit any of the other categories.

How to communicate with the thread created by other activity

Postby cabernet1976 » Thu Mar 13, 2008 12:36 am

Hi,

Could somebody help me about this issue described as below?

mainActivity create a thread (named thread1) which used to download files from web server.
And mainActivity start subActivity (maybe subActivity will create its sub activity then).
My question is: how subActivity (or subsubActivity ...) submit download request to thread1?

A solution I got is: make a queue in mainActivity, thread1 will always get request from this queue. But I don't think it is a good solution, for it is difficult to put requestion to the queue from subActivity.

Please tell me your good solution, or give me some comments.
Thank you very much.
Upload2Flickr's blog: http://upload2flickr.blogspot.com
cabernet1976
Senior Developer
Senior Developer
 
Posts: 154
Joined: Fri Nov 16, 2007 2:34 am
Location: China

Top

Postby cabernet1976 » Thu Mar 13, 2008 1:39 pm

Don't forget me, please.
:roll:
:roll:
:roll:
Upload2Flickr's blog: http://upload2flickr.blogspot.com
cabernet1976
Senior Developer
Senior Developer
 
Posts: 154
Joined: Fri Nov 16, 2007 2:34 am
Location: China

Postby cabernet1976 » Thu Mar 13, 2008 4:14 pm

If nobody reply here, I am going to use service to replace thread.
Those 3 service api samples give me some referrence.

Any comments about this topic are always welcomed.
Thank you.
Upload2Flickr's blog: http://upload2flickr.blogspot.com
cabernet1976
Senior Developer
Senior Developer
 
Posts: 154
Joined: Fri Nov 16, 2007 2:34 am
Location: China

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 22 guests