0

I have a main activity in my project from which i am starting a secondary activity using an intent. On a separate thread, I want to get the handler of the second activity for send some control messages to the second activity. How can i receive the handler for the second activity which i have started using an intent?

Chanaka udaya
  • 5,134
  • 4
  • 27
  • 34

1 Answers1

0

I would begin sending messages to this second activity, when it has been already created. That means, I would create a Handler object in the onCreate() method of this second activity, and pass that handler to the thread you want to send the message from.

overbet13
  • 1,654
  • 1
  • 20
  • 36