Interface FriendlyAdObstructions
-
public interface FriendlyAdObstructions
Friendly obstructions are views such as video controls that are essential to the user’s experience but do not impact viewability. Once registered as such, these controls are excluded from ad viewability measurements. These controls must only be fully transparent overlays or small buttons. Any other non-control views must not be registered.
When ad viewability via the OMSDK is calculated, all views overlaying the media element are considered obstructions and reduce the viewability rate.
You may register:
- A transparent overlay used to capture user taps.
- Transient buttons such as:
- Pause
- Play
- Fullscreen
- Cast/AirPlay
- Collapse
- Progress/Seek
- Other playback relevant actions
You must NOT register:
- Watermarks
- Pop ups
- Dialogs
- Non-transient buttons
For more information, see Open Measurement SDK.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
add(android.view.View friendlyObstruction)
Deprecated.void
add(FriendlyAdObstruction friendlyObstruction)
Used to add FriendlyAdObstruction elements as friendly advertising obstructions.java.util.List<FriendlyAdObstruction>
getFriendlyAdObstructions()
Deprecated.java.util.List<android.view.View>
getList()
Deprecated.void
remove(android.view.View friendlyObstruction)
Deprecated.void
remove(FriendlyAdObstruction friendlyObstruction)
Used to remove FriendlyAdObstruction elements previously marked as friendly advertising obstructions.void
removeAll()
Used to remove all elements marked as friendly advertising obstructions.
-
-
-
Method Detail
-
add
@Deprecated void add(android.view.View friendlyObstruction)
Deprecated.Deprecated. Useadd(FriendlyAdObstruction)
instead.Used to add View elements as friendly advertising obstructions. Will use FriendlyAdObstruction.Purpose.OTHER by default.
- Parameters:
friendlyObstruction
- the View element appearing on top of the player's view during ad playback.
-
remove
@Deprecated void remove(android.view.View friendlyObstruction)
Deprecated.Deprecated. Useremove(FriendlyAdObstruction)
instead.Used to remove View elements previously marked as friendly advertising obstructions.
- Parameters:
friendlyObstruction
- the View element appearing on top of the player's view during ad playback.
-
removeAll
void removeAll()
Used to remove all elements marked as friendly advertising obstructions.Note: This will take effect in the next ad session.
-
getList
@Deprecated java.util.List<android.view.View> getList()
Deprecated.Deprecated. UsegetFriendlyAdObstructions()
instead.Used to retrieve all View elements registered as friendly advertising obstructions.
- Returns:
- the list of View elements registered as friendly advertising obstructions.
-
add
void add(@NonNull FriendlyAdObstruction friendlyObstruction)
Used to add FriendlyAdObstruction elements as friendly advertising obstructions.- Parameters:
friendlyObstruction
- the FriendlyAdObstruction element appearing on top of the player's view during ad playback.
-
remove
void remove(@NonNull FriendlyAdObstruction friendlyObstruction)
Used to remove FriendlyAdObstruction elements previously marked as friendly advertising obstructions.- Parameters:
friendlyObstruction
- the element you want to remove.
-
getFriendlyAdObstructions
java.util.List<FriendlyAdObstruction> getFriendlyAdObstructions()
Deprecated. UsegetFriendlyAdObstructions()
instead.Used to retrieve all FriendlyAdObstruction elements marked as friendly advertising obstructions.
- Returns:
- the list of FriendlyAdObstruction elements marked as friendly advertising obstructions.
-
-