I am sure This has been asked a bunch of times. And I did look around
before posting here but could not find exactly an answer.

I have 2 threads running. One, the activity itself (UI thread), the
other is the networking logic implemented in C.
Second thread is also created in Java not with p_threads or anything.
So I create the second thread and call a C function which does the
networking and Loops and Loops and Loops.

During this loop in C " in case of an error"  I would like to
"callback" the java UI thread and pop up a dialog from C , the KEY is
C has to block and wait.
So if I create a thread and set up a handler in Java to show the
DIalog the the native C code won't block. I have also looked in to
Loopers Thinking that it could be helpful to block the C code.

Now of course I could be naive and write a while(wait) in c and as
soon as dialog is closed I can make a native call from java and set
the wait to false.
But that is just not cool.

Any help is appreciated.

Thanks



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to