After you have integrated now.gg Rewarded Ads with your app; you can use the steps listed here to test integration for your apps on Unity and Native Android.
Before you start testing, you must enable the debug mode in your app.
We have provided a detailed illustration to enable debug mode for your apps on:
To enable debug mode for your Android app, add NowGGAds.enableDebugMode();
to the onCreate method of your app’s main activity, as illustrated below:
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); showAdButton = findViewById(R.id.showAd); /* IMPORTANT: Use this line to test integration on Bluestacks 5/now.gg Testing Environment and remove it from prod/release build */ NowGGAds.enableDebugMode(); NowGGAds.initialize(this, initializationStatus -> { Log.d(TAG, "onInitializationComplete: " + initializationStatus); if (initializationStatus.getState().equals(State.NOT_READY)) { Log.d(TAG, "onInitializationComplete: error"); // retry creating NowGGAds } });
enableDebugMode()
function should only be initialized for the testing environment.To enable debug mode for your app on Unity, call the EnableDebugMode()
function of the NowGGAdsManager
class before initializing the module, as illustrated below:
void Start() { NowGGAdsManager.Instance.OnInitSuccess += OnInitSuccess; NowGGAdsManager.Instance.OnInitFailed += OnInitFailed; NowGGAdsManager.Instance.OnNowGGRewardedAdDismissed += OnAdDismissed; NowGGAdsManager.Instance.OnNowGGRewardedAdFailedToLoad += OnAdFailedToLoad; NowGGAdsManager.Instance.OnNowGGRewardedAdShownToUser += OnAdShownToUser; NowGGAdsManager.Instance.OnUserEarnedReward += OnUserEarnedReward; /* IMPORTANT: Use this line to test integration on Bluestacks 5/now.gg Testing Environment and remove it from prod/release build */ NowGGAdsManager.Instance.EnableDebugMode(); NowGGAdsManager.Instance.Initialize(); }
EnableDebugMode()
function should only be initialized for the testing environment.Once you have the debug mode enabled on your app, follow the steps below to test your Rewarded Ads integration:
Note: The ads displayed within the testing environment on BlueStacks 5 are dummy ads. Actual Ads will only be displayed to the user after you publish your app to now.gg.
We have also included Demo projects for both Android Native and Unity, which you can find here. You can refer to it to understand now.gg Rewarded Ads flow.
Rewarded Ads Module
Rewarded Ads Module
Document Rev. 1.0