title: getActivity() in adapter
body: <p>I'm loading ads in <code>onClick</code> of <code>RecyclerView</code>'s adapter.</p>
  
  <p>In fragment it is perfectly working in this code:
  <code>interstitialAd.loadAd(GDPR.getAdRequest(getActivity()));</code></p>
  
  <p>But in adapter it is not working in these method I tried:
  <code>mInterstitialAd.loadAd(GDPR.getAdRequest(context));</code></p>
  
  <p>I also tried this but it is not working:
  <code>mInterstitialAd.loadAd(GDPR.getAdRequest(this));</code></p>
  
  <p><code>GDPR.getAdRequest</code>'s code is:</p>
  
  <pre><code>public static AdRequest getAdRequest(Activity activity) {
      return new AdRequest.Builder()
          .addNetworkExtrasBundle(AdMobAdapter.class, GDPR.getBundleAd(activity))
          .build();
  }
  </code></pre>
  
  <p>this is adapter's code:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class VideosAdapter extends RecyclerView.Adapter&lt;VideosAdapter.VideosViewHolder&gt; {
      private Context context;
      private Video[] data;
      private int layout;
      private InterstitialAd mInterstitialAd;
  
      public VideosAdapter(Context context, Video[] data, int layout) {
          this.context = context;
          this.data = data;
          this.layout = layout;
      }
  
      @NonNull
      @Override
      public VideosViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
          LayoutInflater inflater = LayoutInflater.from(parent.getContext());
          View view = inflater.inflate(layout,null);
          return new VideosViewHolder(view);
      }
  
      @Override
      public void onBindViewHolder(@NonNull VideosViewHolder holder, final int position) {
          final Video selectedItem = data[position];
          holder.videoTitle.setText(selectedItem.getVideoTitle());
          holder.videoCategoryTitle.setText(selectedItem.getCategoryName());
          if (selectedItem.getVideoType().equals("0")){
              String thumbImg = Constants.SERVER_IMG_FIRST + selectedItem.getVideoThumb();
              Glide.with(context).load(Uri.parse(thumbImg)).into(holder.videoThumb);
          }else {
              // Get V and display img
              Uri uri = Uri.parse(selectedItem.getVideoUrl());
              String videoId = uri.getQueryParameter("v");
              String thumbYtImg = Constants.YOUTUBE_IMG_FIRST + videoId + Constants.YOUTUBE_IMG_BACK;
              Glide.with(context).load(Uri.parse(thumbYtImg)).into(holder.videoThumb);
          }
          String thumbCat = Constants.SERVER_IMG_FIRST + selectedItem.getCategoryThumb();
          Glide.with(context).load(Uri.parse(thumbCat)).into(holder.videoCategoryThumb);
          holder.videoInfoBtn.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  if (Constants.SETTINGS.getAdmob().equals("1")){
                      Constants.ADS_COUNT++;
                      if (Constants.ADS_COUNT&gt;=Integer.valueOf(Constants.SETTINGS.getAdmobIntrestitialAdDisplayAfter())){
                          Constants.ADS_COUNT = 0;
                          mInterstitialAd = new InterstitialAd(context);
                          mInterstitialAd.setAdUnitId(Constants.SETTINGS.getAdmobIntrestitialId());
                          mInterstitialAd.loadAd(GDPR.getAdRequest(context));
  
                          mInterstitialAd.setAdListener(new AdListener() {
                              @Override
                              public void onAdLoaded() {
                                  super.onAdLoaded();
                                  if(mInterstitialAd.isLoaded()){
                                      mInterstitialAd.show();
                                  }
                              }
  
                              @Override
                              public void onAdFailedToLoad(int errorCode) {
                                  // Code to be executed when an ad request fails.
                                  toDoOnInfoBtnClicked(position,data);
                              }
  
                              @Override
                              public void onAdClosed() {
                                  // Code to be executed when the interstitial ad is closed.
                                  toDoOnInfoBtnClicked(position,data);
                              }
                          });
  
  
                      }else{
                          toDoOnInfoBtnClicked(position,data);
                      }
  
                  }else{
                      toDoOnInfoBtnClicked(position,data);
                  }
  
              }
          });
      }
  
      @Override
      public int getItemCount() {
          return data.length;
      }
  
      public class VideosViewHolder extends RecyclerView.ViewHolder {
          TextView videoTitle,videoCategoryTitle;
          public VideosViewHolder(@NonNull View itemView) {
              super(itemView);
              videoTitle = itemView.findViewById(R.id.video_title);
              videoCategoryTitle = itemView.findViewById(R.id.video_category_title);
  
          }
  }
  }
  </code></pre>