Steps to get remote config based on conversion data from MMP
Setup
Add the Remote Config service using the Add Remote Config button in CCServices.
Call Function
In the onConversionDataSuccess function returned from Appsflyer, call:
CCRemoteConfig.instance?.OnConversionDataSuccess(Dictionary<string, object>)
public void onConversionDataSuccess(string conversionData) {
Dictionary<string, object> convDataDict = AppsFlyer.CallbackStringToDictionary(conversionData);
CCRemoteConfig.instance?.OnConversionDataSuccess(convDataDict);
}Retrieve data from remote config using:
GetStringValue(string key)
GetBooleanValue(string key)
GetLongValue(string key)
GetDoubleValue(string key)
Where key is the parameter key from the remote config.
void FetchNoAdTime() {
long dayCount = CCRemoteConfig.instance.GetLongValue("NoAdTime");
// Do something
}
Listener (Optional)
Listen to the event after fetching the remote config (second time) to customize UI
void OnEnable() {
CCRemoteConfig.OnFetchRemoteConfig += OnReFetchRemoteConfig;
}
void OnDisable() {
CCRemoteConfig.OnFetchRemoteConfig -= OnReFetchRemoteConfig;
}
void OnReFetchRemoteConfig(bool success) {
Debug.Log(success == true ? "Fetched successfully" : "Fetched failed");
}

