private void setConfig(Config config)
{
try
{
JsonData data = new JsonData();
if ( config.CanUseIDFA != null )
{
data["useIDFA"] = config.CanUseIDFA;
}
if ( config.CanUseAndroidID != null )
{
data["useAndroidID"] = config.CanUseAndroidID;
}
string apiKey = "";
#if UNITY_ANDROID
apiKey = config.AndroidAPIKey;
#elif UNITY_IPHONE
apiKey = config.IOSAPIKey;
#endif
data["APIKey"] = apiKey;
bridge.Call("setConfig", JsonMapper.ToJson(data));
}
catch(Exception e)
{
Logger.Error(true, "setConfig", e);
}
}