io.adtrace.sdk.AdTraceThirdPartySharing Maven / Gradle / Ivy
package io.adtrace.sdk;
import java.util.HashMap;
import java.util.Map;
/**
* AdTrace android SDK (https://adtrace.io)
* Created by Nasser Amini (github.com/namini40) on April 2022.
* Notice: See LICENSE.txt for modification and distribution information
* Copyright © 2022.
*/
public class AdTraceThirdPartySharing {
Boolean isEnabled;
Map> granularOptions;
public AdTraceThirdPartySharing(final Boolean isEnabled) {
this.isEnabled = isEnabled;
granularOptions = new HashMap<>();
}
public void addGranularOption(final String partnerName,
final String key,
final String value)
{
if (partnerName == null || key == null || value == null) {
ILogger logger = AdTraceFactory.getLogger();
logger.error("Cannot add granular option with any null value");
return;
}
Map partnerOptions = granularOptions.get(partnerName);
if (partnerOptions == null) {
partnerOptions = new HashMap<>();
granularOptions.put(partnerName, partnerOptions);
}
partnerOptions.put(key, value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy