1. Enable test mode

Test mode allows you to show our test ads with 100% filtrate.

Appodeal.setTesting(true);

Should be called before the SDK initialization.

2. Enable logging

To enable debug logging use the code below:

Appodeal.setLogLevel(Appodeal.LogLevel.Debug);
Logs will be written to logcat using tag "Appodeal".

Available parameters:

  • Appodeal.LogLevel.None - logs off;
  • Appodeal.LogLevel.Debug - debug messages;
  • Appodeal.LogLevel.Verbose - all SDK and ad network messages.

3. Disable networks

To disable the networks you don’t want to get ads from, use the following method before the SDK initialization:

Appodeal.disableNetwork((string)network);
Use constants from AppodealAds.Unity.Api.AppodealNetworks to choose necessary network.

4. Disable networks for specific ad types

To disable networks for the specific ad formats use the following method before the SDK initialization:

Appodeal.disableNetwork((string)network, adTypes);

5. Disable location permission check

To disable toast message "ACCESS_COARSE_LOCATION permission is missing", use the following method before the SDK initialization:

Appodeal.disableLocationPermissionCheck();

6. Disable write external storage permission check

To disable toast-messages "WRITE_EXTERNAL_STORAGE permission is missing", use the following method before the SDK initialization:

Appodeal.disableWriteExternalStoragePermissionCheck();

Disabling of all the networks that need this permission may lead to low fill rate for the video ads.

7. Test the third-party networks adapters integration

To check integration of the third-party networks, you need to start a test screen by calling the following method. It is currently supported only for the Android:

Appodeal.showTestScreen();

8. Disable data collection for kids apps

Appodeal.setChildDirectedTreatment(true)
Use this method before initialization.

9. Request runtime permissions in Android Marshmallow (API 6.0+)

1. Extend your class with IPermissionGrantedListener:

YourClassName : IPermissionGrantedListener;
2. Call the following method within the Awake() method of the class that loads first:
Appodeal.requestAndroidMPermissions(this);
3. Now you can use the following callbacks to operate with answers on requesting WRITE_EXTERNAL_STORAGE and ACCESS_COARSE_LOCATION permissions in Android Marshmallow and higher:
public void writeExternalStorageResponse(int result) { 
  if(result == 0) {
    Debug.Log("WRITE_EXTERNAL_STORAGE permission granted"); 
  } else {
    Debug.Log("WRITE_EXTERNAL_STORAGE permission grant refused"); 
  }
}
public void accessCoarseLocationResponse(int result) { 
  if(result == 0) {
    Debug.Log("ACCESS_COARSE_LOCATION permission granted"); 
  } else {
    Debug.Log("ACCESS_COARSE_LOCATION permission grant refused"); 
  }
}

10. Mute video ads (Android only)

If calls are muted on a user’s device, you can also mute sound of video ads for them, using the following method:

Appodeal.muteVideosIfCallsMuted(true)

11. Send extra data

Appodeal.setExtraData(string key, bool value) ;
Appodeal.setExtraData(string key, int value) ;
Appodeal.setExtraData(string key, double value);
Appodeal.setExtraData(string key, string value) ;

12. Get predicted eCPM by ad type

For all ad types:

Appodeal.getPredictedEcpm(int adType);
Returns double.

13. Change GDPR consent status

Appodeal.updateConsent(true);

You can read more info about GDPR here.