TSharedPtr<IAnalyticsProvider> FAnalyticsAndroidFlurry::CreateAnalyticsProvider(const FAnalyticsProviderConfigurationDelegate& GetConfigValue) const
{
	if (GetConfigValue.IsBound())
	{
		const FString Key = GetConfigValue.Execute(TEXT("FlurryApiKey"), true);
		return FAnalyticsProviderFlurry::Create(Key);
	}
	else
	{
		UE_LOG(LogAnalytics, Warning, TEXT("AndroidFlurry::CreateAnalyticsProvider called with an unbound config delegate"));
	}
	return nullptr;
}
TSharedPtr<IAnalyticsProvider> FAnalyticsMulticast::CreateAnalyticsProvider(const FAnalyticsProviderConfigurationDelegate& GetConfigValue) const
{
	if (GetConfigValue.IsBound())
	{
		Config ConfigValues;
		ConfigValues.ProviderModuleNames = GetConfigValue.Execute(Config::GetKeyNameForProviderModuleNames(), true);
		if (ConfigValues.ProviderModuleNames.IsEmpty())
		{
			UE_LOG(LogAnalytics, Warning, TEXT("CreateAnalyticsProvider delegate did not contain required parameter %s"), *Config::GetKeyNameForProviderModuleNames());
			return NULL;
		}
		return CreateAnalyticsProvider(ConfigValues, GetConfigValue);
	}
	else
	{
		UE_LOG(LogAnalytics, Warning, TEXT("CreateAnalyticsProvider called with an unbound delegate"));
	}
	return NULL;
}
/**
 * Perform any initialization.
 */
FAnalyticsProviderMulticast::FAnalyticsProviderMulticast(const FAnalyticsMulticast::Config& ConfigValues, const FAnalyticsProviderConfigurationDelegate& GetConfigValue)
{
	UE_LOG(LogAnalytics, Verbose, TEXT("Initializing Multicast Analytics provider"));

	if (GetConfigValue.IsBound())
	{
		TArray<FString> ModuleNamesArray;
		ConfigValues.ProviderModuleNames.ParseIntoArray(ModuleNamesArray, TEXT(","), true);
		for (TArray<FString>::TConstIterator it(ModuleNamesArray);it;++it)
		{
			TSharedPtr<IAnalyticsProvider> NewProvider = FAnalytics::Get().CreateAnalyticsProvider(FName(**it), GetConfigValue);
			if (NewProvider.IsValid())
			{
				Providers.Add(NewProvider);
				ProviderModules.Add(*it);
			}
		}
	}
}