GameADzone.InitializeSDK(this,"ANQSSXCMC0YSNI6");
If You are using Gameadzone mediation with admob
MobileAds.initialize(this, new OnInitializationCompleteListener() {
@Override
public void onInitializationComplete(InitializationStatus initializationStatus) {
}
});
//Add banner view into your current Layout
if(GameADzoneBanner.isLoaded())
{
GameADzoneBanner.showView()
}
Implement Listener that can notify about ad-related events
GameADzoneBannerAdListener.setBannerListener(new GameADzoneBannerAdListener.BannerListener() {
@Override
public void onBannerAdLoaded() {
}
@Override
public void onBannerFailedToLoad() {
}
});
//Currrently Gameadzone is not supporting Native ads,Using Following Method
You can Get admob and ad exchange(adx) id which can be used to customise ad in your app.. (link)
if(GameADzoneNativeAd.isAvailable())
{
String adunit = GameADzoneNativeAd.getAdUnitId();
}
if(GameADzoneInterstitialAd.isLoaded())
{
GameADzoneInterstitialAd.Show();
}
Implement Listener that can notify about ad-related events.
GameADzoneInterstitialAdListener.setInterstitialListener(new GameADzoneInterstitialAdListener.InterstitialListener() {
@Override
public void onInterstitialAdLoaded() {
Log.v("GameAdzoneInterstitial","onInterstitialAdLoaded");
}
@Override
public void onInterstitialFailedToLoad(int i) {
Log.v("GameAdzoneInterstitial","onInterstitialFailedToLoad");
}
@Override
public void onInterstitialAdOpened() {
Log.v("GameAdzoneInterstitial","onInterstitialAdOpened");
}
@Override
public void onInterstitialAdClosed() {
Log.v("GameAdzoneInterstitial","onInterstitialAdClosed");
}
});
GameADzoneMoreApp.Show();
//Add rectangle banner view into your current Layout
if(GameADzoneRectangle.isLoaded())
{
GameADzoneRectangle.showView()
}
if(GameAdzoneRewardedAd.isLoaded())
{
GameAdzoneRewardedAd.Show();
}
Implement Listener that can notify about ad-related events.
GameAdzoneRewardAdListener.setRewardVideoListener(new GameAdzoneRewardAdListener.RewardVideoListener() {
@Override
public void onRewardAdLoaded() {
Log.v("GameAdzoneReward","onRewardAdLoaded");
}
@Override
public void onRewardAdFailedToLoad(int i) {
Log.v("GameAdzoneReward","onRewardAdFailedToLoad");
}
@Override
public void onUserEarnedReward(RewardItem rewardItem) {
Log.v("GameAdzoneReward","onUserEarnedReward");
}
if(GameADzoneOverlayAd.isLoaded())
{
GameADzoneOverlayAd.Show();
}
//Add icon view into your current Layout
if(GameADzoneIconAd.isLoaded())
{
GameADzoneIconAd.loadView()
}
To show app open ads just activate from gameadzone portal. No code is needed Just activate/deactivate from gameadzone portal.
App open ad is automatically handled by sdk when application enters from background to foreground.
//To show app open ad on Application Launch
if(GameADzoneAppOpenAd.isLoaded())
{
GameADzoneAppOpenAd.show();
}