title: Intent does not work in case of if else
body: <p>Here is my sample code: </p>
  
  <pre><code>String checkin = imageUpload.getStatus();
  if (checkin.equals("1")) {
      Toast.makeText(FullImageActivity.this, name+" "+ "Checked In", Toast.LENGTH_LONG).show();
      Intent i = new Intent(FullImageActivity.this, MainActivity.class);
      startActivity(i);
      //openCamera.setText("CheckOut");
  } else if (checkin.equals("0")){
      Toast.makeText(getApplicationContext(), name + " " + "Checked Out", Toast.LENGTH_LONG).show();
      Intent intent = new Intent(getApplicationContext(), MainActivity.class);
      startActivity(intent);
  }
  </code></pre>
  
  <p>The first one if is working fine but the second was is not. No activity change in the second stage. Please give me idea here.</p>