SDKBox with UnityAds problems

  1. I am using sdkboxads. In sdkboxads, when i am testing with adcolony, my code is running the reward code block. but when i am using unityads with sdkboxads, reward code block is not running though video is playing.
  2. Also another problem is occurring while using unityads with sdkbox ads. Even though unity rewarded video is playing, but after closing the video, if i click on my recent apps button, there i can see two apps listed, both named after my game. one app is the scene from where i called unity ads, another app is unity ads video snapshot. Though testing with adcolony, this problem does not appear.

Cocos2dx - 3.17.1
NDK - 16b
Windows 10
Android Studio - 3.3
SDKBox - 2.4.3

@slackmoehrle

1 Like

Let’s ask @yinjimmy for advice.

here is no reward callback in sdkboxads for UnityAds reward video, because sdkboxads do not know which zone id is reward video.

onAdAction(const std::string& ad_unit_id,
                            const std::string& zone_location_place_you_name_it,
                            sdkbox::AdActionType action_type) {
    if (action_type == sdkbox::AdActionType::AD_ENDED) {
        if (zone_location_place_you_name_it == "_reward_video_name_" && ad_unit_id == "UnityAds") {
            // your code
        }
    }
}

your Android OS version?

android 7.1.1
api 25

I tried but for UnityAds , onAdAction is not getting called for any action. But for AdColony, it is showing Loaded, Reward Ended etc logs.

any updates @yinjimmy @htlxyz ?

   cocos2d-x debug info  D  onAdAction, ad_unit_id: UnityAds, zone_location_place_you_name_it: rewardedVideo, action_type: AD_STARTED
   cocos2d-x debug info  D  onAdAction, ad_unit_id: UnityAds, zone_location_place_you_name_it: rewardedVideo, action_type: AD_ENDED

   cocos2d-x debug info  D  onAdAction, ad_unit_id: UnityAds, zone_location_place_you_name_it: video, action_type: AD_STARTED
   cocos2d-x debug info  D  onAdAction, ad_unit_id: UnityAds, zone_location_place_you_name_it: video, action_type: AD_ENDED

plz remove sdkbox::PluginUnityAds::init from AppDelegate.cpp:

Thanks,

i tried with this https://github.com/sdkbox/sdkbox-sample-cpp317/tree/unityads, can’t reproduce.

can you tried with this. and show the detail steps?

Thanks. This one problem is solved.

I am using sdkboxads. I dont know whether it will reproduce with only unityads. :slight_smile:

I am facing the same problem as mentioned in point 2. How did you fixed it?

Its not yet fixed. Waiting for fix. They told they will try to find bug.

OK thanks for quick response and one thing how are you detecting if rewarded video was cancelled before completion for admob?

I am not using admob. sorry. But i think there are listeners for that.

Thanks. And I have solved admob problem myself. :slight_smile:

Great buddy.

Check your androidmanifest.xml

Remove android:taskAffinity=""

I hope it will solve the problem as it was solved for me… Thanks to @htlxyz

1 Like