Class PrebidMobile


  • public class PrebidMobile
    extends java.lang.Object
    • Field Detail

      • isCoppaEnabled

        public static boolean isCoppaEnabled
      • useExternalBrowser

        public static boolean useExternalBrowser
      • sendMraidSupportParams

        public static boolean sendMraidSupportParams
        If true, the SDK sends "af=3,5", indicating support for MRAID
      • AUTO_REFRESH_DELAY_MIN

        public static final int AUTO_REFRESH_DELAY_MIN
        Minimum refresh interval allowed. 30 seconds
        See Also:
        Constant Field Values
      • AUTO_REFRESH_DELAY_MAX

        public static final int AUTO_REFRESH_DELAY_MAX
        Maximum refresh interval allowed. 120 seconds
        See Also:
        Constant Field Values
      • SDK_VERSION

        public static final java.lang.String SDK_VERSION
        SDK version
        See Also:
        Constant Field Values
      • MRAID_VERSION

        public static final java.lang.String MRAID_VERSION
        Currently implemented MRAID version.
        See Also:
        Constant Field Values
      • NATIVE_VERSION

        public static final java.lang.String NATIVE_VERSION
        Currently implemented Native Ads version.
        See Also:
        Constant Field Values
      • OMSDK_VERSION

        public static final java.lang.String OMSDK_VERSION
        Open measurement SDK version
        See Also:
        Constant Field Values
      • TESTED_GOOGLE_SDK_VERSION

        public static final java.lang.String TESTED_GOOGLE_SDK_VERSION
        Tested Google SDK version.
        See Also:
        Constant Field Values
    • Method Detail

      • isUseCacheForReportingWithRenderingApi

        public static boolean isUseCacheForReportingWithRenderingApi()
      • setUseCacheForReportingWithRenderingApi

        public static void setUseCacheForReportingWithRenderingApi​(boolean useCacheForReportingWithRenderingApi)
      • getTimeoutMillis

        public static int getTimeoutMillis()
      • setTimeoutMillis

        public static void setTimeoutMillis​(int timeoutMillis)
      • setPrebidServerAccountId

        public static void setPrebidServerAccountId​(java.lang.String accountId)
      • getPrebidServerAccountId

        public static java.lang.String getPrebidServerAccountId()
      • setPrebidServerHost

        public static void setPrebidServerHost​(Host host)
      • getPrebidServerHost

        public static Host getPrebidServerHost()
      • setShareGeoLocation

        public static void setShareGeoLocation​(boolean share)
      • isShareGeoLocation

        public static boolean isShareGeoLocation()
      • setExternalUserIds

        public static void setExternalUserIds​(java.util.List<ExternalUserId> externalUserIds)
        List containing objects that hold External User Id parameters for the current application user.
      • getExternalUserIds

        public static java.util.List<ExternalUserId> getExternalUserIds()
        Returns the List that hold External UserId parameters for the current application user
        Returns:
        externalUserIds as Array.
      • setCustomHeaders

        public static void setCustomHeaders​(java.util.HashMap<java.lang.String,​java.lang.String> customHeaders)
        HashMap containing a list of custom headers to add to requests
      • getCustomHeaders

        public static java.util.HashMap<java.lang.String,​java.lang.String> getCustomHeaders()
        Returns the HashMap containing a list of custom headers to add to requests
        Returns:
        externalUserIds as Array.
      • initializeSdk

        public static void initializeSdk​(android.content.Context context,
                                         SdkInitializationListener listener)
        Initializes the main SDK classes. Makes request to Prebid server to check its status. You have to set host url (setPrebidServerHost(Host)) before calling this method.
        Parameters:
        context - any context (must be not null)
        listener - initialization listener (can be null)
        See Also:
        GET /status
      • getApplicationContext

        public static android.content.Context getApplicationContext()
      • setStoredAuctionResponse

        public static void setStoredAuctionResponse​(java.lang.String storedAuctionResponse)
      • getStoredAuctionResponse

        public static java.lang.String getStoredAuctionResponse()
      • addStoredBidResponse

        public static void addStoredBidResponse​(java.lang.String bidder,
                                                java.lang.String responseId)
      • clearStoredBidResponses

        public static void clearStoredBidResponses()
      • getStoredBidResponses

        public static java.util.Map<java.lang.String,​java.lang.String> getStoredBidResponses()
      • getPbsDebug

        public static boolean getPbsDebug()
      • setPbsDebug

        public static void setPbsDebug​(boolean pbsDebug)
      • shouldAssignNativeAssetID

        public static boolean shouldAssignNativeAssetID()
        Returns:
        boolean that states if the ID will be set to the Asset array (in the Native Ad Request) This value can be set using the assignNativeAssetID(boolean)
      • assignNativeAssetID

        public static void assignNativeAssetID​(boolean assignNativeAssetID)
        For assigning ID to the Assets in the Asset array (in Native Ad Request)
      • isSdkInitialized

        public static boolean isSdkInitialized()
        Return 'true' if Prebid Rendering SDK is initialized completely
      • checkGoogleMobileAdsCompatibility

        public static void checkGoogleMobileAdsCompatibility​(java.lang.String googleAdsVersion)
        Check Google Mobile Ads compatibility for original API. Show logs if version is not compatible.
        Parameters:
        googleAdsVersion - - MobileAds.getVersion().toString()