AdColony's OnVideoFinished not call in Android

487 views Asked by At

I have a problem with AdColony-UnitySDK. When AdColony's video is finish playing, OnVideoFinished() method don't be called. In this case, the following sources work well in iOS. And also, the server receive the success callback both device. So, only Android device that is not work.

Here is the source code, where AdColony is implemented:

    public void initializeAdColony(){
    try {
        //Delegates
        AdColony.OnVideoFinished += (adshown)=>{
            if (adshown) {
                AdColonyLog("OnVideoFinished", "Completed");
                GameBGM.Instance.PlayWaiting();
                CallAdColonySuccessCallback("Success", v4vcSuccess,v4vcFail);
            } else {
                AdColonyLog("OnVideoFinished", "Failed");
                CallAdColonyFailureCallback("Fail", v4vcSuccess,v4vcFail);
            }
        };
        AdColony.OnV4VCResult += (videoSuccessCallbacks,name,amount)=>{
            if(videoSuccessCallbacks)
            {
                AdColonyLog("OnV4VCResult","V4VC SUCCESS: name = " + name + ", amount = " + amount);
                returnReward = name;
            }
            else
            {
                AdColonyLog("OnV4VCResult","V4VC FAILED!");
                CallAdColonyFailureCallback("Fail", v4vcSuccess,v4vcFail);
            }
        };

        //customID
        AdColony.SetCustomID(LoginInfo.Instance.id);

        //configure
        AdColony.Configure( 
                           CurrentBundleVersion.version, 
                           AdColonyData.appID(), 
                           AdColonyData.zoneIDs[AdColonyData.Zone1], 
                           AdColonyData.zoneIDs[AdColonyData.Zone2],
                           AdColonyData.zoneIDs[AdColonyData.Zone3],
                           AdColonyData.zoneIDs[AdColonyData.Zone4],
                           AdColonyData.zoneIDs[AdColonyData.Zone5]
                           );
        //FinishInit
        AdColonyIsInit = true;
        AdColonyLog("Initiallize", "Complete");
    } catch (Exception e){
        //Error
        AdColonyLog("Initiallize", e.Message);
    }
}

And here is the method where AdColony's video show:

    public void ShowAdColonyVideo(System.Action successCallback, System.Action failureCallback){
    //InitAdColony
    if (!AdColonyIsInit) {
        initializeAdColony();
    }

    //Setup CallbackAction;
    shownVideo = false;
    v4vcSuccess = successCallback;
    v4vcFail = failureCallback;

    //Check
    foreach (string key in AdColonyData.services) {
        AdColonyLog("LoadKey", key + ":"+ AdColonyData.zoneIDs[key]);
        if (shownVideo) {
            break;
        }

        if (AdColony.IsV4VCAvailable (AdColonyData.zoneIDs [key])) {
            AdColonyLog ("ShowAdColonyVideo", "Video available");
            GameBGM.Instance.StopMusic ();
            shownVideo = true;
            AdColony.ShowV4VC (false, AdColonyData.zoneIDs [key]);
            break;
        } else {
            AdColonyLog ("ShowAdColonyVideo", "Video unavailable");
        }
    }

    if (!shownVideo) {
        failureCallback ();
    }
}

Do you please suggest me how to solve this issue? Thank you.

1

There are 1 answers

2
AdColony Support On BEST ANSWER

This is a known issue at AdColony and we will be releasing a fix in a pending release.

We will update this post once it has been released at: https://github.com/AdColony/AdColony-Unity-SDK