Package org.prebid.mobile
Class Util
- java.lang.Object
-
- org.prebid.mobile.Util
-
public class Util extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceUtil.Function1<R,T>static interfaceUtil.ResizeInBannerNativeListener
-
Field Summary
Fields Modifier and Type Field Description static intHTTP_CONNECTION_TIMEOUTstatic intHTTP_SOCKET_TIMEOUTstatic intNATIVE_AD_VISIBLE_PERIOD_MILLIS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringconvertMapToMoPubKeywords(java.util.Map<java.lang.String,java.lang.String> keywordMap)static java.lang.StringgenerateInstreamUriForGam(java.lang.String adUnit, java.util.HashSet<AdSize> sizes, java.util.Map<java.lang.String,java.lang.String> prebidKeywords)Generate ad tag url for Google's IMA SDK to fetch adsstatic voidloadImage(android.widget.ImageView image, java.lang.String url)static voidresizeInBannerNative(android.view.ViewGroup adView, android.view.ViewGroup.LayoutParams params, Util.ResizeInBannerNativeListener listener)This method resizes a view that contains prebid in banner native ad to the size you desired
-
-
-
Field Detail
-
HTTP_CONNECTION_TIMEOUT
public static final int HTTP_CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
-
HTTP_SOCKET_TIMEOUT
public static final int HTTP_SOCKET_TIMEOUT
- See Also:
- Constant Field Values
-
NATIVE_AD_VISIBLE_PERIOD_MILLIS
public static final int NATIVE_AD_VISIBLE_PERIOD_MILLIS
- See Also:
- Constant Field Values
-
-
Method Detail
-
resizeInBannerNative
public static void resizeInBannerNative(@NonNull android.view.ViewGroup adView, android.view.ViewGroup.LayoutParams params, @Nullable Util.ResizeInBannerNativeListener listener)This method resizes a view that contains prebid in banner native ad to the size you desired- Parameters:
adView- the adView to be resizedparams- the size to be resized to, note the view group has to be the adView's parent view group typelistener- the listener to be called when resize is done
-
convertMapToMoPubKeywords
@NonNull public static java.lang.String convertMapToMoPubKeywords(java.util.Map<java.lang.String,java.lang.String> keywordMap)
-
generateInstreamUriForGam
public static java.lang.String generateInstreamUriForGam(java.lang.String adUnit, java.util.HashSet<AdSize> sizes, java.util.Map<java.lang.String,java.lang.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
-
loadImage
public static void loadImage(android.widget.ImageView image, java.lang.String url)
-
-