Realize the new feature(download confirm) of Tencent AD

Maodge

Member
Licensed User
Hello,
Because tencent released new aar adding a new feature : download confirm dialog, I need add this feature in my code.
Could someone help me out with this problem?
I can pay 10 $.


GDT_unionNormal_Android_SDK_4.333.1203.zip is tencent ad sdk and demo.
QQAD-2021-4-25.zip is b4a tencent ad project.

In the demo code SplashActivity.java file, new feature add as below
B4X:
@Override
  public void onADLoaded(long expireTimestamp) {
    Log.i("AD_DEMO", "SplashADFetch expireTimestamp: " + expireTimestamp
        + ", eCPMLevel = " + splashAD.getECPMLevel());

    if (DownloadConfirmHelper.USE_CUSTOM_DIALOG) {
      splashAD.setDownloadConfirmListener(DownloadConfirmHelper.DOWNLOAD_CONFIRM_LISTENER);
    } // new feature 

    if(loadAdOnly) {
      loadAdOnlyDisplayButton.setEnabled(true);
      long timeIntervalSec = (expireTimestamp-SystemClock.elapsedRealtime())/1000;
      long min = timeIntervalSec/60;
      long second = timeIntervalSec-(min*60);
      loadAdOnlyStatusTextView.setText("加载成功,广告将在:"+min+"分"+second+"秒后过期,请在此之前展示(showAd)");
    }
  }
 
Top