-
- All Implemented Interfaces:
-
com.hyprmx.android.sdk.core.HyprMXMediation
public interface HyprMXIf implements HyprMXMediation
This represents the interface to interact with the HyprMX SDK
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceHyprMXIf.HyprMXInitializationListenerThe initialization listener.
When provided, HyprMX will callback to onInitialized when initialization has finished. If there was a problem initializing, check the logs for more details on the failure.
public interfaceHyprMXIf.HyprMXAudioAdListenerThe Audio Ad listener.
When provided, HyprMX will callback to onAdAudioStart when an Audio ad has requested the audio stream. HyprMX will callback to onAdAudioEnd when the audio ad has completed audio.
The application listening to these event should pause their MEDIA stream on onAdAudioStart and resume on onAdAudioEnd
-
Method Summary
Modifier and Type Method Description Unitinitialize(Context context, String distributorId, Function1<InitResult, Unit> listener)context The context distributorId The distribution id provided to you by HyprMX. abstract Unitinitialize(Context context, String distributorId, HyprMXIf.HyprMXInitializationListener listener)context The context distributorId The distribution id provided to you by HyprMX. abstract InitResultinitialize(Context context, String distributorId)context The context distributorId The distribution id provided to you by HyprMX. abstract UnitsetAgeRestrictedUser(Boolean enabled)Sets the user's age restriction. abstract PlacementgetPlacement(String placementName)Gets the placement for the given name. abstract HyprMXStategetInitializationState()Gets the HyprMX initialization state. abstract UnitsetConsentStatus(ConsentStatus consentStatus)Sets the GDPR consent status. abstract UnitenableTestMode()Enables test inventory for the current application session. abstract Set<Placement>getPlacements()Gets list of all available placements. abstract StringsessionToken()Retrieves the bidding session token. abstract UnitsetAudioAdListener(HyprMXIf.HyprMXAudioAdListener listener)listener Set the HyprMX Audio Ad Listener. abstract UnitsetUserExtras(String key, String value)Extra data about the user. -
-
Method Detail
-
initialize
Unit initialize(Context context, String distributorId, Function1<InitResult, Unit> listener)
context The context distributorId The distribution id provided to you by HyprMX. listener The HyprMX Initialization Listener. HyprMX will callback to this when initialization is complete
-
initialize
abstract Unit initialize(Context context, String distributorId, HyprMXIf.HyprMXInitializationListener listener)
context The context distributorId The distribution id provided to you by HyprMX. listener The HyprMX Initialization Listener. HyprMX will callback to this when initialization is complete
-
initialize
abstract InitResult initialize(Context context, String distributorId)
context The context distributorId The distribution id provided to you by HyprMX.
-
setAgeRestrictedUser
abstract Unit setAgeRestrictedUser(Boolean enabled)
Sets the user's age restriction.
enabled Indicates if the user should be handled as Age Restricted.
-
getPlacement
abstract Placement getPlacement(String placementName)
Gets the placement for the given name.
-
getInitializationState
abstract HyprMXState getInitializationState()
Gets the HyprMX initialization state.
-
setConsentStatus
abstract Unit setConsentStatus(ConsentStatus consentStatus)
Sets the GDPR consent status.
-
enableTestMode
abstract Unit enableTestMode()
Enables test inventory for the current application session. This needs to be set BEFORE initialization in order to ensure inventory
-
getPlacements
abstract Set<Placement> getPlacements()
Gets list of all available placements.
-
sessionToken
abstract String sessionToken()
Retrieves the bidding session token. May return null if HyprMX is not initialized
-
setAudioAdListener
abstract Unit setAudioAdListener(HyprMXIf.HyprMXAudioAdListener listener)
listener Set the HyprMX Audio Ad Listener. HyprMX will callback to this anytime the Audio Ad state changes
-
setUserExtras
abstract Unit setUserExtras(String key, String value)
Extra data about the user.
- Parameters:
key- The keyvalue- The value of the key
-
-
-
-