title: How to implement a listener
body: <p>I have a design issue. I need to implement a listener. I saw the following SO question:
  <a href="https://stackoverflow.com/questions/994840/how-to-create-our-own-listener-interface-in-android">How to create our own Listener interface in android?</a></p>
  
  <p>But in the link it provides in the answer, author creates a listener which just extends the system-defined listener. E.g onClick, you would do some validation &amp; then call another method called "whenValidatedListener"</p>
  
  <p>I need to define listeners which are not linked to existing event listeners. Basically there would be some processing going on in native(C/C++) code &amp; in the Android code I need a listener to respond to certain messages from it.</p>
  
  <p>I think I could do this using handlers. But AsyncTask is the recommended approach for multithreading. </p>
  
  <p>Is there a way to implement a user-defined-listener using AsyncTask? </p>