Package org.prebid.mobile
Class Util
-
- All Implemented Interfaces:
public class UtilUtils for original API reflection manipulations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceUtil.Function1Internal interface.
-
Field Summary
Fields Modifier and Type Field Description public final static StringAPPLOVIN_MAX_RESPONSE_ID_KEYpublic final static StringAPPLOVIN_MAX_KEYWORDS_KEYpublic final static intHTTP_CONNECTION_TIMEOUTpublic final static intHTTP_SOCKET_TIMEOUTpublic final static intNATIVE_AD_VISIBLE_PERIOD_MILLIS
-
Method Summary
Modifier and Type Method Description static voidapply(HashMap<String, String> bids, Object adObj)static voidsaveCacheId(String cacheId, Object adObject)static StringgenerateInstreamUriForGam(String adUnit, HashSet<AdSize> sizes, Map<String, String> prebidKeywords)Generate ad tag url for Google's IMA SDK to fetch ads static floatapplyLocationPrecision(float coordinate, Integer precision)Applies location decimal precision to a coordinate value. -
-
Method Detail
-
saveCacheId
static void saveCacheId(String cacheId, Object adObject)
-
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 idsizes- a set of ad sizes, only 640x480 and 400x300 are validprebidKeywords- 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 roundprecision- 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
-
-
-
-