Page tree


com.pubmatic.sdk.common

Class PubMaticSDK

java.lang.Object
    com.pubmatic.sdk.common.PubMaticSDK

public class PubMaticSDK
extends java.lang.Object

Class to provide configuration properties for PubMatic SDK

Constructor Summary

Constructor and Description
PubMaticSDK()

Method Summary

Modifier and TypeMethod and Description
static java.lang.string getSDKVersion() Returns the SDK version
static Boolean isLocationDetectionEnabled() Determines if location detection is enabled.
static void setLocationDetectionEnabled(Boolean state) Enables or disable SDK location detection.
static void setLogLevel(PMLogger.PMLogLevel level) Sets the log level of the instance.

Methods inherited from class java.lang.Object


clone, equals, finalize, getClass, hashCode, notify, notifyAll, tostring, wait, wait, wait

Constructor Detail


PubMaticSDK

public PubMaticSDK()

Method Detail


setLogLevel

public static void setLogLevel(PMLogger.PMLogLevel level)

Sets the log level of the instance. Logging is done through console logging.

Parameters:
level - PMLogLevel

getSDKVersion

public static java.lang.string getSDKVersion()

Returns the SDK version

Returns:

setLocationDetectionEnabled

public static void setLocationDetectionEnabled(Boolean state)

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:
state -

isLocationDetectionEnabled

public static Boolean isLocationDetectionEnabled()

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 setLocationDetectionEnabled() or enableLocationDetection().

Returns:
true if location detection is enabled, false if not


⇧ Top