Skip to main content

Overview

Popup Ads are an ad format that appears on screen at specific moments. They can be displayed at desired timings such as app launch, content load completion, or specific event triggers. Users can close them by tapping the close button or selecting “Don’t show today.”

Features

  • Popup form displayed at center or bottom of screen
  • Image and video ad support
  • Close, dim (background) click, and “Don’t show today” options
  • Customizable background color and text colors
  • Non-intrusive yet effective ad experience
Use test unit IDs in development. See the Test Unit IDs section.

Implementation Steps

Implement popup ads in 4 steps:
  1. Initialize - Create AdropPopupAd instance
  2. Set Listeners - Set listeners to receive ad and close events
  3. Load Ad - Request and receive ad
  4. Show Ad - Display ad on screen

Basic Implementation

Basic Usage

Implementing Listeners


Customization

You can customize the appearance of popup ads.

Setting Background and Text Colors

Customization Options


Custom Click Handling

To handle ad clicks with custom processing instead of opening the default browser, use the useCustomClick property.

Ad Properties

The following properties are available on the popup ad object:
String
Ad unit ID
Boolean
Whether ad is loaded
String
Currently displayed ad creative ID
String
URL to navigate to when ad is clicked
String
Transaction ID (for ad impression tracking)
String
Campaign ID

Listener Methods

AdropPopupAdListener (Ad Events)

Required Methods

(AdropPopupAd) -> Unit
Called when ad is received successfully. You can call show() at this point to display the ad.
(AdropPopupAd, AdropErrorCode) -> Unit
Called when ad fails to load. The error code indicates the cause of failure.

Optional Methods

(AdropPopupAd) -> Unit
Called when ad impression is recorded.
(AdropPopupAd) -> Unit
Called when user clicks the ad.
(AdropPopupAd) -> Unit
Called just before popup ad is displayed.
(AdropPopupAd) -> Unit
Called just after popup ad is displayed on screen.
(AdropPopupAd) -> Unit
Called just before popup ad is closed.
(AdropPopupAd) -> Unit
Called just after popup ad is closed. This is a good time to preload the next ad.
(AdropPopupAd, AdropErrorCode) -> Unit
Called when ad fails to show. The error code indicates the cause of failure.
(AdropPopupAd) -> Unit
Called when video playback starts in a video popup ad.
(AdropPopupAd) -> Unit
Called when video playback ends in a video popup ad.

AdropPopupAdCloseListener (Close Events)

All methods are optional.
(AdropPopupAd) -> Unit
Called when user clicks the close button.
(AdropPopupAd) -> Unit
Called when user clicks outside the popup (dim area).
(AdropPopupAd) -> Unit
Called when user selects “Don’t show today.” You can save the date in this callback to not show ads for the day.

Implementing “Don’t Show Today”

Here’s how to properly handle when a user selects “Don’t show today.”

Implementation Using SharedPreferences

Usage Example


Popup ads are available in two types:
Popup type is configured when creating the ad unit in the Adrop console. No separate specification is needed in code.

Best Practices

1. Appropriate Display Timing

Popup ads are effective when displayed at these moments:

2. Respect “Don’t Show Today”

If a user selects “Don’t show today,” always honor it.

3. Frequency Limiting

Don’t show popup ads too frequently.

4. Preload Ads

Preload ads for better user experience.

5. Landscape Mode Handling

Popup ads are only supported in portrait mode. In landscape mode, onAdFailedToShowFullScreen is called.

Test Unit IDs

Use the following test unit IDs during development and testing.

Test Ad Usage Example

Be sure to use the actual unit ID created in the Adrop console for production deployment.

Complete Example


Troubleshooting

Ad Not Displaying

  • Verify SDK is initialized
  • Check if unit ID is correct
  • Check network connection status
  • Verify production setting during Adrop SDK initialization
  • Check error code to identify cause
  • Use test unit ID in test environment
  • Retry later if ad inventory is insufficient
  • ERROR_CODE_AD_HIDE_FOR_TODAY: “Don’t show today” is active
  • Verify show() is called after onAdReceived callback
  • Check if Activity is in valid state
  • Check isLoaded property to verify ad is loaded
  • Verify in portrait mode (landscape is not supported)
Popup ads are only supported in portrait mode. When show() is called in landscape mode, onAdFailedToShowFullScreen is called with ERROR_CODE_LANDSCAPE_UNSUPPORTED error code.

”Don’t Show Today” Not Working


Getting Started

SDK installation and initialization

Interstitial Ads

Implement interstitial ads

Rewarded Ads

Implement rewarded ads

Banner Ads

Implement banner ads