public class Networking
extends java.lang.Object
Constructor and Description |
---|
Networking() |
Modifier and Type | Method and Description |
---|---|
static void |
clearForTesting() |
static java.lang.String |
getBaseUrlScheme()
DSPs are currently not ready for full https creatives.
|
static java.lang.String |
getCachedUserAgent()
Gets the previously cached WebView user agent.
|
static com.mopub.volley.toolbox.ImageLoader |
getImageLoader(android.content.Context context) |
static MoPubRequestQueue |
getRequestQueue() |
static MoPubRequestQueue |
getRequestQueue(android.content.Context context) |
static java.lang.String |
getScheme()
Retrieve the scheme that should be used to communicate to the ad server.
|
static com.mopub.volley.toolbox.HurlStack.UrlRewriter |
getUrlRewriter(android.content.Context context) |
static java.lang.String |
getUserAgent(android.content.Context context)
Caches and returns the WebView user agent to be used across all SDK requests.
|
static void |
setImageLoaderForTesting(MaxWidthImageLoader imageLoader) |
static void |
setRequestQueueForTesting(MoPubRequestQueue queue) |
static void |
setUserAgentForTesting(java.lang.String userAgent) |
static boolean |
shouldUseHttps() |
static void |
useHttps(boolean useHttps)
Set whether to use HTTP or HTTPS for WebView base urls.
|
@Nullable public static MoPubRequestQueue getRequestQueue()
@NonNull public static com.mopub.volley.toolbox.HurlStack.UrlRewriter getUrlRewriter(@NonNull android.content.Context context)
@NonNull public static MoPubRequestQueue getRequestQueue(@NonNull android.content.Context context)
@NonNull public static com.mopub.volley.toolbox.ImageLoader getImageLoader(@NonNull android.content.Context context)
@NonNull public static java.lang.String getUserAgent(@NonNull android.content.Context context)
@NonNull public static java.lang.String getCachedUserAgent()
public static void clearForTesting()
public static void setRequestQueueForTesting(MoPubRequestQueue queue)
public static void setImageLoaderForTesting(MaxWidthImageLoader imageLoader)
public static void setUserAgentForTesting(java.lang.String userAgent)
public static void useHttps(boolean useHttps)
public static boolean shouldUseHttps()
public static java.lang.String getScheme()
public static java.lang.String getBaseUrlScheme()
shouldUseHttps()
is true; "http" otherwise.