1. Enable test mode

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

Appodeal.setTesting(true);

Should be called before the SDK initialization.

2. Enable logging

To enable debug logging, use the code below:

Appodeal.setLogLevel(Log.LogLevel.debug);
Logs will be written to logcat using the Appodeal tag.

Available parameters:

  • Log.LogLevel.none - logs off;
  • Log.LogLevel.debug - debug messages;
  • Log.LogLevel.verbose  - all SDK and ad network messages.

3. Disable networks

Appodeal.disableNetwork(this, AppodealNetworks.NETWORK);
You can find all available networks in AppodealNetworks.

Important

Should be called before the SDK initialization.

4. Disable networks for specific ad types

Appodeal.disableNetwork(this, AppodealNetworks.NETWORK, adTypes);
Example:
Appodeal.disableNetwork(this, AppodealNetworks.ADMOB, Appodeal.BANNER | Appodeal.INTERSTITIAL);
Should be called before the SDK initialization.

5. Request Android M permissions

To request "WRITE_EXTERNAL_STORAGE" and "ACCESS_COARSE_LOCATION" permissions on Android M and higher, call the following method:

Appodeal.requestAndroidMPermissions((Activity) this, new PermissionsHelper.AppodealPermissionCallbacks(){
  @Override
  public void writeExternalStorageResponse(int result) {
    if (result == PackageManager.PERMISSION_GRANTED) {
      Utils.showToast((Activity) MainActivity.this, "WRITE_EXTERNAL_STORAGE permission was granted");
    } else {
      Utils.showToast((Activity) MainActivity.this, "WRITE_EXTERNAL_STORAGE permission was NOT granted");
    }
  }

  @Override
  public void accessCoarseLocationResponse(int result) {
    if (result == PackageManager.PERMISSION_GRANTED) {
      Utils.showToast((Activity) MainActivity.this, "ACCESS_COARSE_LOCATION permission was granted");
    } else {
      Utils.showToast((Activity) MainActivity.this, "ACCESS_COARSE_LOCATION permission was NOT granted");
    }
  }
});

6. Disable location permission check

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

Appodeal.disableLocationPermissionCheck();

7. 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();

This method disables all networks that need this permission which may lead to low video fill rate.

8. Test third-party networks adapters integration

To start test activity for testing adapters integration, call:

Appodeal.startTestActivity((Activity) this);

9. Change GDPR consent status

Appodeal.updateConsent(true);
You can use this method to provide the GDPR user consent for ad networks in Appodeal SDK anywhere of your application. Appodeal SDK don't keep the GDPR user consent between session, that means you should provide consent every time, otherwise, Appodeal SDK uses default or server value. By default consent value is true.

You can read more info about GDPR here.

10. Disable data collection for kids apps

For purposes of the Children's Online Privacy Protection Act (COPPA), there is a setting in Appodeal SDK. As an app developer, you can indicate whether you want networks in Appodeal SDK to treat your content as child-directed when you make an ad request.The setting can be used with Appodeal SDK via:

Appodeal.setChildDirectedTreatment(@Nullable Boolean value);

Call setChildDirectedTreatment with true to indicate that you want your content treated as child-directed for purposes of COPPA
Call setChildDirectedTreatment with false to indicate that you don't want your content treated as child-directed for purposes of COPPA
Call setChildDirectedTreatment with null to indicate that you want to use the COPPA parameter from your application's settings on the appodeal.com

11. Check if ad type was initialized

Appodeal.isInitialized((Activity)this, adType);
Returns true, if the ad type was initialized.

12. Check if autocache is enabled for ad type

Appodeal.isAutoCacheEnabled((Activity)this, adType);
Returns true, if auto cache is enabled for this ad type.

13. Mute videos if call volume is muted

Appodeal.muteVideosIfCallsMuted(true);

14. Send extra data

You can send key-value data to Appodel. There is the predefined key ExtraData.APPSFLYER_ID.

public static void setExtraData(@NonNull String key, @NonNull String value)
public static void setExtraData(@NonNull String key, int value)
public static void setExtraData(@NonNull String key, double value)
public static void setExtraData(@NonNull String key, boolean value)
public static void setExtraData(@NonNull String key, @NonNull JSONObject value)

15. Get predicted eCPM by ad type

For all ad types excluding native ads:

public static double getPredictedEcpm(final int adTypes);
For native ad there is a method in NativeAd interface:
double getPredictedEcpm();