Class POBSDKConfig

  • All Implemented Interfaces:

    
    public class POBSDKConfig
    
                        

    This class is used for setting configuration parameters for OpenWrap SDK level i.e state needs to be applied for all ads supported by SDK

    • Constructor Detail

    • Method Detail

      • getLocationDetectionDurationInMillis

         long getLocationDetectionDurationInMillis()

        Returns time interval used to get the two consecutive location

        Returns:

        time interval in milli second

      • setLocationDetectionDurationInMillis

         void setLocationDetectionDurationInMillis(long durationInMillis)

        Sets the duration for retrieving the location of user. Default value is 10 seconds.

        Parameters:
        durationInMillis - time in milli second
      • setUserInfo

         void setUserInfo(@Nullable() POBUserInfo userInfo)

        Sets the user's information. It would be useful in delivering user relevant ads

        Parameters:
        userInfo - value of POBUserInfo type
      • setApplicationInfo

         void setApplicationInfo(@Nullable() POBApplicationInfo applicationInfo)

        Sets the application information. It would be useful in delivering application relevant ads

        Parameters:
        applicationInfo - value of POBApplicationInfo type
      • isLocationAccessAllowed

         boolean isLocationAccessAllowed()

        Determines if location detection is enabled. If enabled, the SDK will use the location services of the device to determine the device's location ad add ad request parameters (lat/long) to the ad request. Location detection can be enabled with allowLocationAccess() or enableLocationDetection().

        Returns:

        true if location detection is enabled, false if not

      • allowLocationAccess

         void allowLocationAccess(boolean allow)

        Enables or disable SDK location detection. If enabled with this method the most battery optimized settings are used. This method is used to disable location detection for either method of enabling location detection. Default value is true.

        Permissions for coarse or fine location detection may be required.

        Parameters:
        allow - enable or disable auto location detection
      • isUseInternalBrowser

         boolean isUseInternalBrowser()

        Returns true if landing page for an ad would opened in internal browser else returns false

        Returns:

        State of internal browser

      • setCoppa

         void setCoppa(boolean coppaState)

        Sets COPPA state. It indicates whether the visitor is COPPA-specific or not. For COPPA (Children's Online Privacy Protection Act) compliance, if the visitor's age is below 13, then such visitors should not be served targeted ads. Possible options are: false - Indicates that the visitor is not COPPA-specific and can be served targeted ads. true - Indicates that the visitor is COPPA-specific and should be served only COPPA-compliant ads.

        Parameters:
        coppaState - Coppa state
      • allowAdvertisingId

         void allowAdvertisingId(boolean allow)

        Indicates whether Advertisement ID should be sent in the request. Possible values are: true : Advertisement id will be sent in the request. false : Android ID will be sent in the request instead of the Advertisement id. Default value is true

        Parameters:
        allow - state of advertisement id usage
      • getMeasurementProvider

        @Nullable() <T> T getMeasurementProvider(@NonNull() String className)

        Method to get OM measurement provider instance

        Parameters:
        className - name of measurement provider class
        Returns:

        reference of measurement provider T

      • addExternalUserId

         void addExternalUserId(@NonNull() POBExternalUserId userId)

        Adds the External user id /Data Partner ids which helps publisher in better user targeting

        Parameters:
        userId - instance of POBExternalUserId class
      • setUseInternalBrowser

         void setUseInternalBrowser(boolean internalBrowserState)

        Set to true if landing page for an ad should be opened in internal browser else set to false. Starting with SDK v2.7.0, default value is false. Prior, it was true.

        Parameters:
        internalBrowserState - value of boolean type
      • setRequestSecureCreative

         void setRequestSecureCreative(boolean requestSecureCreative)

        Requests secure ads from ad server using https protocol.

        Parameters:
        requestSecureCreative - true for enable secure creative mode.