How to handle onActivityResult in a custom dialog class
<p>I am trying to create a custom dialog class that inherits from Dialog that will allow the user to choose a contact. I can get the contact choose to show up just fine by using:</p>

<pre><code>this.getOwnerActivity().startActivityForResult(...);
</code></pre>

<p>The problem is that this calls the onActivityResult() on the dialog's parent activity when the user chooses a contact; I want to encapsulate the handling of the activity result in the dialog class, not the parent activity.</p>

<p><a href="http://stackoverflow.com/questions/7211971/inside-android-dialog-how-to-setup-onactivityresult-for-startactivityforresult">This chap asked the same question</a>, but did not receive a viable answer:</p>

<p><a href="http://stackoverflow.com/questions/7211971/inside-android-dialog-how-to-setup-onactivityresult-for-startactivityforresult">inside Android Dialog, how to setup onActivityResult for startActivityForResult?</a></p>

<p>Is this possible? Seems like a pretty basic thing to want to do, so I would think there is  way.</p>

<p>I could convert the dialog to a whole new activity, but the dialog works very nicely within the context of the app so I would rather not have to resort to that.</p>
