Hi All This query is regarding android UI & Worker threads.
I am writing an application in which I have 1.An Activity with a button in it. On clicking this button, i need to start a new thread which would do some graphics rendering by calling native C calls.(these are loaded in the form of a shared object.) This rendering screen inturn has some menus like pause/stop etc. 2.Now on seleting any of these menus, i want to call the respective native C functions.(All that needs to call the native C fucntions should be done in a child thread.) For example, when the rendering is going on(Worker thread), if the user clicks on pause button on that screen, the Main thread should pick this event and send a msg to Worker thread saying a pause event has come and based on this msg, child thread will cal its own native C pause function to pause the animation.( I donot want to do any animation related stuffs in my main thread for better performance & I have all native pause/run/stop/et all been implemented too.) 3. In total,i need to handle all native C related acivities in a child thread and all the notification related to UI in a main thread. Is there any good way of doing this? The APIs in Handler make child to post a message to the main thread after its execution. But what i want is, any UI event shud be notified to Main first which would then tell child to act accordingly. This looks like a typical scenario in almost all mobile games. Hope there is a good solution!! Please do suggest. Any ideas in this regard are highly appreciable Thanks Latha --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---