title: Admob Interstitial Ads on Multiple Button Click
body: <p>I have an activity with 10 buttons, each one goes to a different activity. When I added the interstitial ads on button click, it works fine, but when the user closes the ad, it always takes him to activity (topic_ten). No matter what button he clicks, it always takes him to activity (topic_ten).</p>
  
  <p>What I want is, when the user clicks the button for activity (topic_one), it takes him to activity (topic_one) and so on. </p>
  
  <pre><code>private InterstitialAd interstitialAd;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_topics_list);
  
      interstitialAd = new InterstitialAd(this);
      interstitialAd.setAdUnitId("ca-app-pub-1164579427694627/2090370128");
      interstitialAd.loadAd(new AdRequest.Builder().build());
  
  
  
      bt2 = (Button) findViewById(R.id.button2);
  
      bt2.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              if (interstitialAd.isLoaded()){
  
                  interstitialAd.show();
              }
  
              else {
  
                  startActivity(new Intent(topics_list.this, topic_one.class));
  
              }
          }
      });
      interstitialAd.setAdListener(new AdListener(){
  
          @Override
          public void onAdClosed() {
              startActivity(new Intent(topics_list.this, topic_two.class));
              interstitialAd.loadAd(new AdRequest.Builder().build());
          }
      });
      bt3 = (Button) findViewById(R.id.button3);
  
      bt3.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              if (interstitialAd.isLoaded()){
  
                  interstitialAd.show();
              }
  
              else {
  
                  startActivity(new Intent(topics_list.this, topic_two.class));
  
              }
          }
      });
      interstitialAd.setAdListener(new AdListener(){
  
          @Override
          public void onAdClosed() {
              startActivity(new Intent(topics_list.this, topic_three.class));
              interstitialAd.loadAd(new AdRequest.Builder().build());
          }
      });
  </code></pre>