title: android: what is the value of intent when nothing is put on?
body: <p>I have a dialog pop up in the middle of the program and the user has to</p>
  
  <p>specify between two options then click confirm</p>
  
  <p>problem arises when the user selects nothing then click the confirm button</p>
  
  <p>so i need a way to notice that user hasnt selected anything </p>
  
  <p>and add that check inside confrim button's click listener</p>
  
  <p>im thinking of </p>
  
  <pre><code>....
  .setPositiveButton("confirm", new DialogInterface.OnClickListener() {
  
  @Override
  public void onClick(DialogInterface dialog, int which) {
  
     if (intent == null)
       { //do nothing or tell the user to select on something }
     else
       { getTargetFragment().onActivityResult(getTargetRequestCode(), Activity.RESULT_OK, i);}}
  </code></pre>
  
  <p>of course intent == null doesnt work, so what code should I use?</p>