Get Started with Glispa Connect

Overview

Examples

Android

Overview

- Native Ads

List/Feed

Custom

- Standard IAB Formats

Banner

Interstitial

Video

- Others

GDPR

Troubleshooting

Admob Android Adapter

Mopub Android Adapter

DFP Android Adapter

iOS

Overview

- Native Ads

List/Feed

Custom

- Standard IAB Formats

Banner

Interstitial

Video

- Others

GDPR

Troubleshooting

- Adapters

Admob iOS Adapter

Mopub iOS Adapter

DFP iOS Adapter

API Documentation

Reporting API

Help

GDPR FAQ

General

Earnings

Payments and Accounting

Integration

Reporting

Legal and Privacy

Updates

SDK Deprecation Schedule

SDK Change Log

Android Change Log

iOS Change Log

Troubleshooting

Updated 4 months ago by Chris

Overview

Enabling the Glispa Connect (formerly Avocarrot) Debug & Logger

The default log level is INFO. From the adb shell, you can change the log level to DEBUG, VERBOSE etc. using this command:

setprop log.tag.Avocarrot_SDK DEBUG
          

setprop log.tag.MRAID DEBUG
          

setprop log.tag.VAST DEBUG

If you want to log debug information, please install Avocarrot.setDebugMode(true) (false by default), then you will see the logs under Avocarrot_SDK tag. It is recommended that this option should be used for integration test purposes.

Eclipse Integration

Since Google [deprecated] (https://developer.android.com/studio/tools/sdk/eclipse-adt.html) the Eclipse support, we recommend to use Android Studio for the SDK integration.

Avoiding the 65K Limit

If you receive a dex error while adding third party network SDKs and adapters, you may need to enable multidexing in your build.gradle file.

defaultConfig { … multiDexEnabled true … }

Then in your manifest add the MultiDexApplication class from the multidex support library to the application element.:

<application
            ...
            android:name="android.support.multidex.MultiDexApplication">
            ...
          </application>
          

Please see the Android documentation here .

Enabling the test mode (development mode)

During the development phase, it is highly recommended to set testMode to YES to avoid generating false impressions and clicks tracking. The default setting is NO.

// To Set Test mode, false by default
          Avocarrot.setTestMode(true); 
          // To check current status of test mode
          Avocarrot.isTestMode();
          

Common Issues

Why are my in-feed ads loading slowly?

If you are using in-feed native ads, you can leverage our ad caching to avoid ad latency issues when your users are scrolling through your app feed.

Glispa Connect SDK has a cache system for in-feed ads with specific sizes (deviates according to platforms). When you initialise in-feed ads, they will start loading and our SDK caches the in-feed ads when loading has completed. After this, they can be inserted into your feed without any delays. The ad must be shown to the user before it can load a new ad into the cache system.

See “How do I reduce ad latency?” more information on ad latency.

AND

Below is a quick guide on how to use in-feed caching. It explains how to load your ads before showing them to improve the display in your in-feed.

Step 1:

Initialize your in-feed with StreamAdBaseAdapter using the dummy data anywhere in the app before showing your feed (( Before users go to your ListView (ad placement))

i.e. you can put any dummy adapter instead of your ListView adapter in the following line

  .setAdapter(new MainAdapter(this))

or instead of ViewBuilder, you can also use any dummy builder.

.setViewBuilder(FeedCardNativeAdView.BUILDER)

Step 2:

Call

.loadAd()

Ads will start to load into the cache, so that they are ready to be shown.

Step 3:

When users view your ListView, you can create another StreamAdBaseAdapter with the same ad unit ID in your ListView.

Step 4:

Call

.loadAd()

The same ads will be displayed from the cache since these ads have not yet been shown.

Note: If you are planning to load the ads in the same activity as your listview, you can simply reuse the same StreamAdAdapter and set the values accordingly to your listview. 

Native ad render view being null in In-feed

Please check if you integrate in-feed ads using our StreamAdBaseAdapter instead of using NativeAd. For in-feed or Listview, our SDK provides a StreamAdBaseAdapter to build the native ad.

Add the following code to your activity:

StreamAdBaseAdapter adAdapter = new StreamAdAdapter.Builder()
            .setAdapter(new MainAdapter(this))
            .setAdUnitId("YOUR_NATIVE_AD_UNIT_ID")
            .setViewBuilder(FeedCardNativeAdView.BUILDER)
            .setEventCallback(this)
            .build(this);
          listView.setAdapter(adAdapter);
          adAdapter.loadAd();

Why are my ads taking a while to load?

An ad can take some time to load due to the ad latency. This is the total time it takes for a server to receive and process a request. If our SDK integration was installed correctly, then the ad should serve without any lag time. But remember, ad latency can still depend on various external factors. The more layers (services or operations) you add to the integration, the greater the possibility for latency to occur.

Some external factors that affect latency include:

  • Ad networks and their 3rd party integrations
  • Countries
  • Platforms
  • Internet connection
  • Device version
  • Ad units
  • Configuration of the app


For further information on how to reduce latency, please refer to our recommendations here.

How do I reduce ad latency?

Our recommendations to minimize latency would be the following:

1. Consider implementing pre-loaded ads since it’s considered best practice and helps reduce overall ad latency. As a publisher, you have full control to separate the events to “showing and loading”. We recommend you to implement this method.

Go through our detailed steps to pre-load Banner ad before showing it. 

Step 1: Set the adview “INVISIBLE”.

The ad view needs to be INVISIBLE before requesting an ad. you can either do it in their layout .xml, or You can add codes like below in the code.

e.g.

bannerView.setVisibility(View.INVISIBLE);

Step 2: Load an ad.

After calling the loadAd(); method, the downloading of banner starts.

e.g.

BannerAd bannerAd = BannerAdPool.load(this, "YOUR_BANNER_AD_UNIT_ID", adView, BannerSize.BANNER_SIZE_320x50, bannerAdListener);
          bannerAd.loadAd();

Step 3: Set the adview “VISIBLE” and Show ad.

When users go to the ad placement, you can show the pre-loaded ad.

Please make sure that the adview for banner must be VISIBLE when you call showAd(); method. It will then trigger an impression event.

e.g.

bannerView.setVisibility(View.VISIBLE);
          bannerAd.showAd();

See “Why are my in-feed ads loading slowly?” for instruction on how to pre-load In-feed ads.

I’ve integrated the SDK but don’t see any impressions. What do I do?

There are two possible reasons you might not be seeing any impressions: Integration or Configuration.

1: Integration
Ideally, you can use the Demo app and enter your Ad Unit ID. This can be found in your dashboard under each ad placement as “Click to copy Ad Unit ID”.

Now, insert this Ad Unit ID in the Demo App. If the ad is served in the demo app, but not within YOUR app, then there is an integration issue.
If this is the case, please reach out to us and we will happily assist you!
You will be required to provide the following information:
– The Glispa Connect SDK integration code
– Set the app on the debug mode
– Logs for ad request

2: Configuration
If you entered the Ad Unit ID in the demo app and still did not see any ads served, then there is a configuration mistake. To resolve the issue, you will have to re-check the configuration and make sure all the ad placement IDs are correct.

For any additional information, please refer to our guidelines HERE:
Android: https://github.com/ampiri/ampiri-android-sdk/blob/master/HOWTO.md

The banner and native ads show they are loaded but nothing is displayed on the screen. What do I do?

The issue have to do with the activity events, onResume etc. Please add the codes below into your app and try again. 

 @Override
public void onResume() {
super.onResume();
if (standardAd != null) {
standardAd.onActivityResumed();
if (autoUpdateView != null) {
autoUpdateView.setChecked(standardAd.isAutoRefreshEnable());
}
}
}@Override
public void onPause() {
super.onPause();
if (standardAd != null) {
standardAd.onActivityPaused();
}  



Log : Cause it's not ready. State is INITIAL

As the error message 'Cause it's not ready. State is INITIAL' could be shown when the impression was not registered properly OR you are trying to display ad before the ad is not fully loaded. To resolve this issue, please make sure your ad view has visibility and show it only when the ad is completely loaded.


You can find more details on our github page! If you still experience this error, please send the full logs to us.


Was this article useful?