Object LevelPlay
-
- All Implemented Interfaces:
public class LevelPlayThis class is the new API for the LevelPlay SDK.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumLevelPlay.AdFormat
-
Method Summary
Modifier and Type Method Description final static Unitinit(Context context, LevelPlayInitRequest initRequest, LevelPlayInitListener listener)Initialize the LevelPlay SDK. final static BooleansetDynamicUserId(String dynamicUserId)Sets dynamic user id. final static UnitsetAdaptersDebug(Boolean enabled)Enables or disables adapters' debug mode. final static UnitaddImpressionDataListener(LevelPlayImpressionDataListener listener)Adds impression data listener. final static UnitremoveImpressionDataListener(LevelPlayImpressionDataListener listener)Removes impression data listener. final static StringgetSdkVersion()Returns the current SDK's version. final static UnitsetSegment(LevelPlaySegment segment)Sets a segment to start a session with. final static UnitsetMetaData(String key, String value)Sets the meta data with a key and value to the supporting ad networks final static UnitsetMetaData(String key, List<String> values)Sets the meta data with a key and values to the supporting ad networks final static UnitsetNetworkData(String networkKey, JSONObject networkData)Sets the network data according to the network key. final static UnitlaunchTestSuite(Context context)Launches the Test Suite. final static UnitvalidateIntegration(Context context)A tool to verify a successful integration of the IronSource SDK and any additional adapters. final static UnitsetConsent(Boolean consent)Sets the consent, boolean value that indicates whether the user has granted consent for the SDK to collect and share data. -
-
Method Detail
-
init
final static Unit init(Context context, LevelPlayInitRequest initRequest, LevelPlayInitListener listener)
Initialize the LevelPlay SDK.
-
setDynamicUserId
final static Boolean setDynamicUserId(String dynamicUserId)
Sets dynamic user id.
-
setAdaptersDebug
final static Unit setAdaptersDebug(Boolean enabled)
Enables or disables adapters' debug mode. Default is false. Should be called before initializing the SDK.
- Parameters:
enabled- true if you want to see debug logs from all adapters, false otherwise.
-
addImpressionDataListener
final static Unit addImpressionDataListener(LevelPlayImpressionDataListener listener)
Adds impression data listener.
- Parameters:
listener- your implementation of the ImpressionDataListener interface.
-
removeImpressionDataListener
final static Unit removeImpressionDataListener(LevelPlayImpressionDataListener listener)
Removes impression data listener.
- Parameters:
listener- your implementation of the ImpressionDataListener interface.
-
getSdkVersion
final static String getSdkVersion()
Returns the current SDK's version.
- Returns:
String - SDK's version.
-
setSegment
final static Unit setSegment(LevelPlaySegment segment)
Sets a segment to start a session with.
-
setMetaData
final static Unit setMetaData(String key, String value)
Sets the meta data with a key and value to the supporting ad networks
- Parameters:
key- The meta data keyvalue- The meta data value
-
setMetaData
final static Unit setMetaData(String key, List<String> values)
Sets the meta data with a key and values to the supporting ad networks
- Parameters:
key- The meta data keyvalues- The meta data values
-
setNetworkData
final static Unit setNetworkData(String networkKey, JSONObject networkData)
Sets the network data according to the network key.
- Parameters:
networkKey- Network identifier.networkData- JSON containing the information required by the network.
-
launchTestSuite
final static Unit launchTestSuite(Context context)
Launches the Test Suite. Mediation SDK must be initialized before calling this method.
- Parameters:
context- Application context which should be passed.
-
validateIntegration
final static Unit validateIntegration(Context context)
A tool to verify a successful integration of the IronSource SDK and any additional adapters. The Integration Helper tool verifies the compatibility between the SDK and adapter versions, and makes sure all required dependencies and frameworks were added for the various mediated ad networks.
- Parameters:
context- The application context to use for validation.
-
setConsent
@Deprecated(message = "use LevelPlayPrivacySettings.setGDPRConsents() for GDPR consent management.", replaceWith = @ReplaceWith(imports = {"com.unity3d.mediation.LevelPlayPrivacySettings"}, expression = "LevelPlayPrivacySettings.setGDPRConsents(networkConsents)"), level = DeprecationLevel.WARNING) final static Unit setConsent(Boolean consent)
Sets the consent, boolean value that indicates whether the user has granted consent for the SDK to collect and share data. Consent is used for GDPR compliance.
- Parameters:
consent- true if the user has granted consent, false otherwise.
-
-
-
-