Created
September 30, 2020 06:15
-
-
Save melikeeroglu/a26df2236b0ea8a498b257f565fabe9a to your computer and use it in GitHub Desktop.
Huawei Initialize Ads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initialize the HUAWEI Ads SDK. | |
HwAds.init(this); | |
// Call new BannerView(Context context) to create a BannerView class. | |
BannerView topBannerView = new BannerView(this); | |
topBannerView.setAdId(Constant.AD_ID); | |
topBannerView.setBannerAdSize(BannerAdSize.BANNER_SIZE_360_57); | |
topBannerView.loadAd(adParam); | |
ConstraintLayout rootView = findViewById(R.id.mainActivity); | |
rootView.addView(topBannerView); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment