Getting the user choice in alert dialog