NativeAd

public abstract class NativeAd extends Object

This class is deprecated.
Use NativeAd.

An object returned for a native ad request.

Nested Class Summary

class NativeAd.AdChoicesInfo This class is deprecated. Use NativeAd.AdChoicesInfo.  
class NativeAd.Image This class is deprecated. Use NativeAd.Image.  

Constant Summary

String ASSET_ADCHOICES_CONTAINER_VIEW The ad choices asset ID.

Public Constructor Summary

Public Method Summary

abstract void
performClick(Bundle clickData)
This method is deprecated. Use UnifiedNativeAd.performClick(Bundle).
abstract boolean
recordImpression(Bundle impressionData)
This method is deprecated. Use UnifiedNativeAd.recordImpression(Bundle).
abstract void
reportTouchEvent(Bundle touchEventData)
This method is deprecated. Use UnifiedNativeAd.reportTouchEvent(Bundle).

Inherited Method Summary

Constants

public static final String ASSET_ADCHOICES_CONTAINER_VIEW

The ad choices asset ID.

Constant Value: "1098"

Public Constructors

public NativeAd ()

Public Methods

public abstract void performClick (Bundle clickData)

This method is deprecated.
Use UnifiedNativeAd.performClick(Bundle).

Call when the user has clicked on the ad. The ad unit must be in the allow list to be able to use this api.

Parameters
clickData bundle of the app environment when the click happens. For details to construct the click data Bundle, see NativeAdConstants.

public abstract boolean recordImpression (Bundle impressionData)

This method is deprecated.
Use UnifiedNativeAd.recordImpression(Bundle).

Call when the ad is first displayed. The ad unit must be in the allow list to be able to use this api.

Parameters
impressionData bundle of the app environment when the impression happens. For details to construct the click data Bundle, see NativeAdConstants.
Returns
  • true if the impression is recorded successfully

public abstract void reportTouchEvent (Bundle touchEventData)

This method is deprecated.
Use UnifiedNativeAd.reportTouchEvent(Bundle).

Call when a touch event happens on the ad. The ad unit must be in the allow list to be able to use this api. If you are interested in using this feature, reach out to your account manager.

Parameters
touchEventData bundle of touch event coordinates and duration.

Example JSON representation of touchEventData Bundle:

   {
     "x": "100",  // The x-coordinate of the touch event relative to the window.
     "y": "50",  // The y-coordinate of the touch event relative to the window.
     "duration_millis": "500",  // The amount of millisecond the user pressed on the asset.
   }