0

I am integrating my android app with inmobi sdk for ads. However, I always get NO_FILL error from the ad server even though my placement is set to test globally. I am using an emulator.

I double-check the account id and placement id but everything seems okay.

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", "1");
        } catch (JSONException e) {
            e.printStackTrace();
        }
        InMobiSdk.init(Mytoz.getInstance().getApplicationContext(), "MY_ACCOUNT_ID", consentObject);
        InMobiSdk.setLogLevel(InMobiSdk.LogLevel.DEBUG);

MY_ACCOUNT_ID being my real id, this the code that I am initializing the sdk.

InterstitialAdEventListener mInterstitialAdEventListener = new InterstitialAdEventListener() {
            // implementation for other events
            // onAdLoadSucceeded, onAdDisplayed, etc
            @Override
            public void onRewardsUnlocked(InMobiInterstitial inMobiInterstitial, Map<Object, Object> map) {
                Log.e(TAG, "Ad rewards unlocked!");
                interstitialAd.load();
            }

            @Override
            public void onAdLoadSucceeded(InMobiInterstitial inMobiInterstitial) {
                Log.e(TAG, "Ad can now be shown!");
                canShowAd = true;
            }

            @Override
            public void onAdLoadFailed(InMobiInterstitial ad, InMobiAdRequestStatus requestStatus) {
                Log.e(TAG, "onAdLoadFailed: " + requestStatus.getMessage() + " " + requestStatus.getStatusCode());
                canShowAd = false;
            }
        };

        interstitialAd = new InMobiInterstitial(MainActivity.this, MY_PLACEMENT_ID, mInterstitialAdEventListener);
        interstitialAd.load();

MY_PLACEMENT_ID being my real placement id

I am expecting to see a test ad but no, I am getting NO_FILL

1 Answers1

1

InMobi provides very few initial ads from emulator. After that on emulator it will start giving NO_FILL. You must use real device to test the ads.

Raj Suvariya
  • 1,592
  • 3
  • 14
  • 36