Friday, April 26, 2013

[android help] activity is gone and the created handler is still in use

android - activity is gone and the created handler is still in use - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















An Activity created a handler in a method and passed it on to a singleton. Singleton holds this handler so that it can send the message back to activity. Activity handles the message in that local method by implementing the handleMessage(Message mesg) methond.


What happens if the activity gets destroyed and singleton tries to send the message via the handler.


























Once handler starts it does not stop.


Try AsyncTask it may be canceled or interrupted.




















default






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...