-1

While loading Banner or Interstitial ad in Android app, I am getting this error:

An invalid ad request was sent and was rejected by the Ad Network. Please validate the ad request and try again

This error is coming from 25th May 2018. I have also changed the initialization process of InMobi SDK for GDPR.

JSONObject consentObject = new JSONObject();
try {
    // Provide correct consent value to sdk which is obtained by User
    consentObject.put(InMobiSdk.IM_GDPR_CONSENT_AVAILABLE, true);
    // Provide 0 if GDPR is not applicable and 1 if applicable
    consentObject.put("gdpr", "0")
} catch (JSONException e) {
    e.printStackTrace();
}

InMobiSdk.init(this, InMobiAccountId, consentObject);
InMobiSdk.setLogLevel(InMobiSdk.LogLevel.DEBUG);

But it's not working. Please provide me a solution to this problem.

Thanks in advance.

Avijit Karmakar
  • 8,890
  • 6
  • 44
  • 59

1 Answers1

0

this happened when you have updated the SDK. the ads will be displayed in production, so if you want to test it before production, you can enable test mode.