Callback on AlertDialog
Indeed the recommended approach for this (or at least what I would recommend) is to use callback interfaces.

The most important aspect though is designing this interface. In this case you should be sure that you're passing everything you need. However, I think you can rename the method to onOK or okPressed or similar. You might also consider returning a boolean to determine whether or not the dialog should really be closed (the input might need to be validated before it is accepted?) (there are ways to stop an AlertDialog from closing, you can find more information in earlier StackOverflow questions).



Other comments:

You should use String resources properly, this will separate the code from the text neatly. Use the resource id's instead.

alert.setTitle(R.string.alertInputTitle);
alert.setMessage(R.string.alertInputMessage);


Some strings are actually included in Android by default, such as android.R.string.ok and android.R.string.cancel, use them when possible.

When you want the negative button to just close the dialog, you can actually pass null as the DialogInterface.OnClickListener.

alert.setNegativeButton(android.R.string.cancel, null);