Class Util

  • All Implemented Interfaces:

    
    public class Util
    
                        

    Utils for original API reflection manipulations.

    • Constructor Detail

    • Method Detail

      • generateInstreamUriForGam

         static String generateInstreamUriForGam(String adUnit, HashSet<AdSize> sizes, Map<String, String> prebidKeywords)

        Generate ad tag url for Google's IMA SDK to fetch ads

        Parameters:
        adUnit - GAM ad unit id
        sizes - a set of ad sizes, only 640x480 and 400x300 are valid
        prebidKeywords - prebid keywords
        Returns:

        ad tag url

      • applyLocationPrecision

         static float applyLocationPrecision(float coordinate, Integer precision)

        Applies location decimal precision to a coordinate value.

        Parameters:
        coordinate - The coordinate value to round
        precision - The precision level (null for no limit, 0-6 for decimal places)
        Returns:

        The coordinate rounded to the specified precision, or original value if precision is null