title: How to show Admob interstitial in extends Activity
body: <p>I˙m learning android development, so I buy source code and I`m trying to change UI and other elements. With UI I was not having any problems but in final stage when I want to ad Admob interstitial ads I have a problem. I want to show interstitial when user click on one of list items but this is not a problem. I dont know how to integarate Admob interstitials in Adapter.java file, this is begining of code of that file.</p>
  
  <pre><code>public class RingtonesActivity extends Activity {
  
  private ListView listView;
  private ListRingtonesAdapter adapter;
  private ArrayList&lt;SongInfo&gt; listSong = new ArrayList&lt;SongInfo&gt;();
  private Util util = new Util();
  private ProgressBar progressBarParent;
  private LinearLayout linearLayout_contentProgress;
  
  private static final int PREFERENCES = Menu.FIRST;
  private static final int QUIT = Menu.FIRST + 1;
  
  
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.ringtonelist);
      listView = (ListView) findViewById(R.id.list);
      progressBarParent = (ProgressBar)findViewById(R.id.progressBarParent);
      Resources res = getResources();
      progressBarParent.setProgressDrawable(res.getDrawable(R.drawable.progressbarstyle));
      linearLayout_contentProgress = (LinearLayout)findViewById(R.id.LL_contentProgressBarParent);
      refreshList();
  
  }
  
  public static class Admob extends Activity {
      InterstitialAd mInterstitialAd;
  
      public void onCreate() {
          mInterstitialAd = new InterstitialAd(this);
          mInterstitialAd.setAdUnitId("ca-app-pub-3940256099942544/1033173712");
          requestNewInterstitial();
          if (mInterstitialAd.isLoaded()) {
              mInterstitialAd.show();
          }
      };
  
      public void requestNewInterstitial() {
          AdRequest adRequest = new AdRequest.Builder()
                    .addTestDevice("YOUR_DEVICE_HASH")
                    .build();
  
          mInterstitialAd.loadAd(adRequest);
      }
  
  }
  </code></pre>
  
  <p>There is no onCreate method to include Admob code, and when I˙m trying to create onCreate method and adding admob code I got errors. </p>
  
  <p>Guys, any help is very very welcome! :) 
  Thanks,
  Anna </p>
  
  <p>After I use suggestion from @SafwanHijazi I got this error </p>
  
  <pre><code>FATAL EXCEPTION: main
  Process: ringtones.codebhak, PID: 20938
  java.lang.NullPointerException
  at  ringtones.codebhak.RingtonesActivity.nativeDisplayAd(RingtonesActivity.java:73)
  at ringtones.codebhak.ListRingtonesAdapter.getView(ListRingtonesAdapter.java:175)
  at android.widget.AbsListView.obtainView(AbsListView.java:2715)
  at android.widget.ListView.makeAndAddView(ListView.java:1801)
  at android.widget.ListView.fillDown(ListView.java:697)
  at android.widget.ListView.fillFromTop(ListView.java:763)
  at android.widget.ListView.layoutChildren(ListView.java:1627)
  at android.widget.AbsListView.onLayout(AbsListView.java:2528)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
  at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
  at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
  at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
  at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
  at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  at android.view.View.layout(View.java:15655)
  at android.view.ViewGroup.layout(ViewGroup.java:4856)
  at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2284)
  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2004)
  at android.view.ViewRootImpl.doTrave
  </code></pre>