It may happen that some advertisers escape ad quality checks and end up compromising the user experience on the app by showcasing either an irrelevant, distasteful, or disrupting creative to the user. To combat such situations, you can retrieve the creativeID of the ad instance and report back to your InMobi point of contact with the encrypted creativeID. CreativeID is a property of IMBanner, IMInterstitial and IMNative object, which can be retrieved as follow:
public void onAdLoadSucceeded(@NonNull <inmobi_ad_object> ad, @NonNull AdMetaInfo info) { Log.d(TAG, “Creative ID for ad : “ + info.getCreativeID()); }
fun onAdLoadSucceeded(ad:<inmobi_ad_object> , info:AdMetaInfo ) {
Log.d(TAG, “Creative ID for ad : “ + info.getCreativeID())
}
You can start testing your integration by navigating to the Integration Tab on the InMobi Publisher Dashboard.
If you have Java and Python installed in your local system, click here and run the Library Detection Tool to ensure that all the mandatory libraries are needed for InMobi SDK integration [InMobi SDK, Picasso, browser, and RecyclerView] are available.
To set up a test device, you will need the corresponding device ID. The device id is the Google Play Advertising ID (GPID). To get the device ID, configure the SDK to print debug logs to the console.
You MUST turn off the test mode before going live or else your app will fail to monetize.
The device id is the Google Play Advertising ID (GPID). To get the device ID, configure the SDK to print debug logs to the console.
You can do so by adding the following line to your Activity where you are integrating InMobi ads.
InMobiSdk.setLogLevel(LogLevel.DEBUG);
InMobiSdk.setLogLevel(LogLevel.DEBUG)
The device ID will now be printed in debug logs in the DDMS console:
You will also get feedback on the diagnostics tab on the ad unit and ad request and this can be particularly helpful during integration.
Once you have enabled debug logs as mentioned in step 1, SDK will print key logs to the DDMS console that provide useful information about the initialization and ad load lifecycle.
The following tables capture these logs.
Scenario |
Log Level |
Log message |
Publisher passed a valid account id |
Debug |
InMobi SDK initialized with account id: |
Publisher passed an invalid account Id |
Debug |
Invalid account id passed to init. Please provide a valid account id. |
Publisher didn't grant the mandatory permissions |
Debug |
Please grant the mandatory permissions: INTERNET & ACCESS_NETWORK_STATE, SDK could not be initialized. |
Permissions granted to the SDK |
Debug |
Permissions granted to the SDK are : |
Newer version of SDK is available |
Debug |
A newer version (ver. 9.0.0) of the InMobi SDK is available! You are currently on an older version (ver. 5.3.1). Download the latest InMobi SDK from http://www.inmobi.com/products/sdk/#downloads |
Scenario |
Log Level |
Log message |
Ad requested when no network available |
Error LogLevel |
Network not reachable currently. Please try again. |
Ad requested when ad state is loading or available |
Error LogLevel |
An ad load is already in progress. Please wait for the load to complete before requesting for another ad (Placement id: |
Ad requested when ad is viewed by user |
Error LogLevel |
An ad is currently being viewed by the user. Please wait for the user to close the ad before requesting for another ad (Placement id: |
Publisher device Id |
Debug LogLevel |
Publisher device id is |
Requested ad being fetched from network |
|
Ad will be fetched from network for the Placement Id - |
Scenario |
Log Level |
Log message |
Publisher called load on a banner |
Debug |
Fetching a Banner ad for placement id: |
Successfully fetched ad |
Debug |
Banner ad successfully fetched for placement id: |
Failed to fetch the ad |
Debug |
Failed to fetch Banner ad for placement id: |
Started loading the banner in a webview |
Debug |
Started loading Banner ad markup in the webview for placement id: |
Banner successfully loaded in the webview |
Debug |
Successfully loaded Banner ad markup in the webview for placement id: |
Failed to load banner in the webview |
Debug |
NA |
Banner refresh is initiated |
Debug |
Initiating Banner refresh for placement id: |
invalid refresh interval |
Debug |
Refresh interval value supplied in XML layout is not valid. Falling back to default value. |
Null Context |
Error |
Context supplied as null, the ad unit can't be created. |
Layout params not set |
Error |
The layout params of the banner must be set before calling load |
Height or width set to WRAP_CONTENT |
Error |
The height or width of a Banner ad can't be WRAP_CONTENT |
Height or width not set |
Error |
The height or width of the banner cannot be determined |
Null listener |
Error |
Please pass a non-null listener to the banner. |
Scenario |
Log Level |
Log message |
Publisher called load on interstitial |
Debug |
Fetching an interstitial ad for placement id: |
Successfully fetched ad |
Debug |
Interstitial ad successfully fetched for placement id: |
Failed to fetch the ad |
Error |
Failed to fetch interstitial ad for placement id: |
Started loading the interstitial in a webview |
Debug |
Started loading interstitial ad markup in the webview for placement id: |
Interstitial successfully loaded in the webview |
Debug |
Successfully loaded interstitial ad markup in the webview for placement id: |
Failed to load interstitial in the webview |
Error |
Failed to load interstitial markup in the webview for placement id: |
Failed to load interstitial in the webview due to timeout |
Error |
Failed to load the Interstitial markup in the webview due to time out for placement id: |
Interstitial Ad displayed |
Debug |
Successfully displayed Interstitial for placement id: |
Interstitial Ad dismissed |
Debug |
Interstitial ad dismissed for placement id: |
No Listener specified Set Listener to null in constructor |
Error |
The Ad unit cannot be created as no event listener was supplied. Please attach a listener to proceed |
Null context Set Context to null in constructor |
Error |
Unable to create ad unit with NULL context object |
Ad show before ready Show ad before it's ready |
Error |
Ad Load is not complete. Please wait for the Ad to be in a ready state before calling show. |
Scenario |
Log Level |
Log message |
Publisher called load on interstitial |
Debug |
Fetching an interstitial ad for placement id: |
Successfully fetched ad |
Debug |
Interstitial ad successfully fetched for placement id: |
Failed to fetch the ad |
Error |
Failed to fetch interstitial ad for placement id: |
Started loading the interstitial in a webview |
Debug |
Started loading interstitial ad markup in the webview for placement id: |
Interstitial successfully loaded in the webview |
Debug |
Successfully loaded interstitial ad markup in the webview for placement id: |
Failed to load interstitial in the webview |
Error |
Failed to load interstitial markup in the webview for placement id: |
Failed to load interstitial in the webview due to timeout |
Error |
Failed to load interstitial markup in the webview due to timeout for placement id: |
Interstitial Ad displayed |
Debug |
Successfully displayed Interstitial for placement id: |
Interstitial Ad dismissed |
Debug |
Interstitial ad dismissed for placement id: |
No Listener specified Set Listener to null in constructor |
Error |
The Ad unit cannot be created as no event listener was supplied. Please attach a listener to proceed |
Null context Set Context to null in constructor |
Error |
Unable to create ad unit with NULL context object |
Ad show before ready Show ad before it's ready |
Error |
Ad Load is not complete. Please wait for the Ad to be in a ready state before calling show The supplied resource id with show for animations is invalid |
InMobiAdActivity not added |
Error |
Do not declare InMobiAdActivity in manifest file. |
Scenario |
Log Level |
Log Message |
Publisher supplied a null context |
Error |
Unable to create InMobiNative ad with null Activity object |
Publisher created a native ad without initializing the SDK |
Error |
Please initialize the SDK before creating a Native ad |
Publisher created a native ad with an invalid placement id |
Error |
NA |
Publisher supplies a null InMobiNativeAdListenerobject |
Error |
Listener supplied is null,the Native Ad cannot be created |
Publisher called load on a native |
Debug |
Fetching a Native ad for placement id: |
Ad is successfully fetched from server |
Debug |
Native ad successfully fetched for placement id: |
Failed to fetch the ad |
Error |
Failed to fetch Native ad for placement id : |
When AdView is inflated |
Debug |
Ad markup loaded into the container will be inflated into a View |
In addition to logs printed by the SDK, you can also get feedback on the diagnostics tab on the ad unit and ad request, which can be particularly helpful during integration.
By installing this SDK update, you agree that your Children Privacy Compliance setting remains accurate or that you will update that setting, whenever there is a change in your app's audience. You may update the app's Children Privacy Compliance settings at https://publisher.inmobi.com/my-inventory/app-and-placements.