Also if you call startActivityForResult() from your fragment, then onActivityResult() will be called in your fragment. And if you call startActivityForResult() from your activity, then onActivityResult() will be called in your activity. Basically where you call startActivityForResult() is where onActivityResult() will be called.
Another thing, in Android the prefered way to create dialogs is to extend the DialogFragment class.