I created a class and I want it's methods to be available to call only from one specific thread, for instance, the ui-thread. It's exactly the opposite from what happens in the android networking api... it throws an exception when it is called from the ui-thread. How can I do that in android? thanx
Forcing class methods to be called from ui thread
90 views Asked by Sebastian Breit At
3
This behavior is how MFC works:
An MFC Window class has many methods that DO NOT perform what is expected from them, instead they send or post a message to a queue that the GUI/main thread listens on.
So you need to either use an existing cross thread messaging mechanism or create your own.