Class ExposureMetrics
-
- All Implemented Interfaces:
public final class ExposureMetricsData class to hold exposure metrics as per MRAID 3.0. See - MRIAD 3.0 Doc
neelabh.parui
-
-
Field Summary
Fields Modifier and Type Field Description private final FloatexposedPercentageprivate final ExposureRectanglevisibleRectangleprivate final <Error class: unknown class><ExposureRectangle>occlusionRectangles
-
Constructor Summary
Constructors Constructor Description ExposureMetrics(Float exposedPercentage, ExposureRectangle visibleRectangle, <Error class: unknown class><ExposureRectangle> occlusionRectangles)
-
Method Summary
Modifier and Type Method Description final FloatgetExposedPercentage()percentage of ad that is visible on screen, a floating-point number between 0.0 and 100.0, or 0. final ExposureRectanglegetVisibleRectangle()the visible portion of the ad container, or null if not visible. final <Error class: unknown class><ExposureRectangle>getOcclusionRectangles()an array of rectangles describing the sections of the visibleRectangle that are not visible, or null if occlusion detection is not used or relevant. -
-
Constructor Detail
-
ExposureMetrics
ExposureMetrics(Float exposedPercentage, ExposureRectangle visibleRectangle, <Error class: unknown class><ExposureRectangle> occlusionRectangles)
-
-
Method Detail
-
getExposedPercentage
final Float getExposedPercentage()
percentage of ad that is visible on screen, a floating-point number between 0.0 and 100.0, or 0.0 if not visible
-
getVisibleRectangle
final ExposureRectangle getVisibleRectangle()
the visible portion of the ad container, or null if not visible. It has the fields {x, y, width, height}, where x and y are the position of the upper-left corner of the visible area, relative of the upper-left corner of the ad container's current extent, and width and height are size of the visible area. If the visible area is non-rectangular, then this parameter is the bounding box of the visible portion, and the occlusionRectangles parameter describes the non-visible areas within the bounding box
-
getOcclusionRectangles
final <Error class: unknown class><ExposureRectangle> getOcclusionRectangles()
an array of rectangles describing the sections of the visibleRectangle that are not visible, or null if occlusion detection is not used or relevant. Each element of the array is has the fields {x, y, width, height}, where x and y are the position of the upper-left corner of the occluded area, relative of the upper-left corner of the ad container's current extent, and width and height are size of the occluded area. The rectangles must not overlap, and they must be sorted from largest area to smallest area. In common scenarios, the visible area is rectangular, and this parameter is null. If the implementation can detect non-rectangular exposures, then this parameter will be set.
-
-
-
-