Implementing an app where the user can log in I have the following situation: If the user is logged in perform the action else start the login activity for result and if the result is Activity.RESULT_OK do the action. My problem is that the action to perfom is to show a DialogFragment, but calling DialogFragment newFragment = MyDialogFragment.newInstance(mStackLevel); newFragment.show(ft, "dialog"