Debugging

Whilst developing your app, you can use our test activity to ensure your Tapdaq integration is successful.

Display the Debugger

Run this method after Tapdaq has been initialised.

Tapdaq.getInstance().startTestActivity(MainActivity.this);

Using the Debugger

Mediate Section

This page allows you to test your integration as it would normally be used.

This allows you to show any type of add you have set up, and it will automatically select a network for you.

Adapters Section

Here is a list of all the networks available and the state they are in, selecting any of them will allow you to directly interact with that network for testing.

  • Green - Ready
  • Red - Not Ready (Failed to initialise)

Adapter Page

Here you can directly test each network and see ads from them. Only the ad types appropriate for each network will be available.

  • Load button will request a new ad.
  • Show button will display an ad that has loaded (Load must be called first)

Tapdaq SDK, Adapter and Network SDK versions are also noted, the Tapdaq SDK & Adapter version MUST match.

Adapter Status
  • Ready: Network is Ready to use.
  • Not Integrated: Adapter is not integrated in the project.
  • Disabled: Adapter is integrated, but has not been initialised or is not enabled on the dashboard.
  • Failed: Failed to initialise for an unknown reason
  • Failed, Adapter version mismatch: Failed to initialised because the Adapter version does not match the Tapdaq SDK version.
  • Failed, Missing Activities in AndroidManifest.xml: Failed to initialised because necessary Activities have not been added to the AndroidManifest.xml
  • Failed, Missing Credentials: Failed to initialise because not all the required credentials have been added to the dashboard.
  • Timed out: Failed to initialise within the set timeframe (60 seconds)
  • Waiting: Adapter is currently initialising.

Logging

TLog class has 5 logging levels (Disabled, Info, Warning, Error and Debug), you can set your preferred level at any time using the following code.

TLog.setLoggingLevel(TLogLevel.DEBUG);

Adding test devices

Google AdMob and Facebook Audience Network ad services both allow developers to specify test devices, these will serve test ads before you have your account fully set up.

When creating the adapters and initialising Tapdaq, you should add your device IDs, like so:

TapdaqConfig config = new TapdaqConfig();
config.registerTestDevices(TMMediationNetworks.AD_MOB, Arrays.asList(""));
config.registerTestDevices(TMMediationNetworks.FACEBOOK, Arrays.asList(""));

Retrieving Test Device IDs

Use adb logcat or Android Studio's console to view the applications logs, devices ID's will be printed when loading an ad from AdMob and Facebook, they look like this:

// Android AdMob
I/Ads: Use AdRequest.Builder.addTestDevice("4D32C4G30407EPC0EBB847E0E2694ACE") to get test ads on this device.

// Android Facebook
D/AdSettings: Test mode device hash: 441g39532c1fy296e2840753c9c217b0

When testing Facebook Audience Network, the test device should have the Facebook app installed and logged in