Package com.tapjoy

# Interface TJPlacementListener

public interface TJPlacementListener
Interface for Tapjoy placement callbacks. Provides methods to notify the app about the status of a Tapjoy placement request, the state of the displayed content, and the outcome of any purchase or reward requests.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default void`
  `onClick(TJPlacement placement)`
  Deprecated.
  Deprecated since 14.2.0 Called when a click event has occurred
  `void`
  `onContentDismiss(TJPlacement placement)`
  Called when a content for the given placement is dismissed.
  `void`
  `onContentReady(TJPlacement placement)`
  Called when a content for the given placement is ready to show.
  `void`
  `onContentShow(TJPlacement placement)`
  Called when a content for the given placement is showing.
  `default void`
  `onPurchaseRequest(TJPlacement placement, TJActionRequest request, String productId)`
  Deprecated.
  Deprecated since 14.5.0 Called when a purchase has been requested.
  `void`
  `onRequestFailure(TJPlacement placement, TJError error)`
  Called when given placement request has failed.
  `void`
  `onRequestSuccess(TJPlacement placement)`
  Called when given placement request has succeeded.
  `default void`
  `onRewardRequest(TJPlacement placement, TJActionRequest request, String itemId, int quantity)`
  Deprecated.
  Deprecated since 14.5.0 Called when a reward unlock has been requested.

- ## Method Details

  - ### onRequestSuccess

    void onRequestSuccess(TJPlacement placement)
    Called when given placement request has succeeded.
    Parameters:
      `placement` - the placement that was requested.

  - ### onRequestFailure

    void onRequestFailure(TJPlacement placement, TJError error)
    Called when given placement request has failed.
    Parameters:
      `placement` - the placement that was requested.
      `error` - the error that occurred.

  - ### onContentReady

    void onContentReady(TJPlacement placement)
    Called when a content for the given placement is ready to show.
    Parameters:
      `placement` - the placement that was requested

  - ### onContentShow

    void onContentShow(TJPlacement placement)
    Called when a content for the given placement is showing.
    Parameters:
      `placement` - the placement that was requested

  - ### onContentDismiss

    void onContentDismiss(TJPlacement placement)
    Called when a content for the given placement is dismissed.
    Parameters:
      `placement` - the placement that was requested

  - ### onPurchaseRequest

    @Deprecated default void onPurchaseRequest(TJPlacement placement, TJActionRequest request, String productId)
    Deprecated.
    Deprecated since 14.5.0 Called when a purchase has been requested.
    Parameters:
      `placement` - the placement that was requested
      `request` - the action request
      `productId` - the product identifier

  - ### onRewardRequest

    @Deprecated default void onRewardRequest(TJPlacement placement, TJActionRequest request, String itemId, int quantity)
    Deprecated.
    Deprecated since 14.5.0 Called when a reward unlock has been requested.
    Parameters:
      `placement` - the placement that was requested
      `request` - the action request
      `itemId` - the name of the rewarded item
      `quantity` - the quantity of the rewarded item

  - ### onClick

    @Deprecated default void onClick(TJPlacement placement)
    Deprecated.
    Deprecated since 14.2.0 Called when a click event has occurred
    Parameters:
      `placement` - the placement that was requested