Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17081

SDKBOX Chartboost Reward Video issue

$
0
0

@damort wrote:

Chartboost in sdkbox is not updating the Reward Video ads image and text when updated on the Chartboost dashboard. After contacting chartboost, they tested the Reward Video with the updated Image and text and its working fine for them.

The problem is with sdkbox Chartboost locally. It seems to be an issue with the cache not being cleared? How do I clear the cache? or pull down the updated ads from Chartboost.

Default ads will play fine although they are the same ones over and over which is a bit odd. Again makes me think that the cache is holding an ad that it wont update from the Chartboost servers.

LOGCAT:

C:\projects\cocos2dx\shipwreck>adb logcat -s "Chartboost"
--------- beginning of system
--------- beginning of main
D/Chartboost(13611): Register Chartboost

AppDelegate.cpp

sdkbox::PluginChartboost::init();
sdkbox::PluginChartboost::setListener(new CBListener());
sdkbox::PluginChartboost::cache("Default"); // show interstitial on startup using callback
sdkbox::PluginChartboost::cache("Level Complete");

CBListener class

class CBListener : public sdkbox::ChartboostListener{
public:
	void onChartboostCached(const std::string& name)
	{
		if(name == "Default")
		{
			sdkbox::PluginChartboost::show("Default");
		}   		
	}
	bool onChartboostShouldDisplay(const std::string& name){}
	void onChartboostDisplay(const std::string& name){}
	void onChartboostDismiss(const std::string& name){}
	void onChartboostClose(const std::string& name){}
	void onChartboostClick(const std::string& name){}
	void onChartboostReward(const std::string& name, int reward){}
	void onChartboostFailedToLoad(const std::string& name, sdkbox::CB_LoadError e){}
	void onChartboostFailToRecordClick(const std::string& name, sdkbox::CB_ClickError e){}
	void onChartboostConfirmation(){}
	void onChartboostCompleteStore(){}
};

HelloWorld.cpp

// Calling ad on button press Start
sdkbox::PluginChartboost::show("Level Complete"); // Offer reward

And changing the name of the ad in .sdkbox_package.json from Level Complete to Level Started and updating the code where appropriate displays a normal Default ad, with logcat ouput:

LOGCAT:

C:\projects\cocos2dx\shipwreck>adb logcat -s "Chartboost"
--------- beginning of system
--------- beginning of main
D/Chartboost(18087): Register Chartboost
I/Chartboost(18087): Trying to find unknown ad: Level Started.
I/Chartboost(18087): Failed to find ad with name: Level Started showing Interstitial by default

I have updated SDKBOX with sdkbox update and it did give some failed to update errors. After a second attempt at updating sdkbox it gives:

C:\projects\cocos2dx\shipwreck>sdkbox update
  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2015 SDKBOX Inc. v1.0.0.9
 2.1.2.6 2.1.2.6
 failed to update package ios
 2.1.2.6 2.1.2.6
 2.1.2.6 2.1.2.6
 failed to update package android
 failed to update package Chartboost
 all packages are up to date.

Checking the .json config file it shows the version being used is 2.1.2.6.

"chartboost": {
    "engine": "3", 
    "name": "chartboost", 
    "args": {
        "patcherrors": 0, 
        "forcedownload": 0, 
        "noupdate": 0, 
        "days": 10, 
        "remote": 0, 
        "verbose": 0, 
        "forcecopy": 1, 
        "command": "update", 
        "nohelp": 0, 
        "server": "download.sdkbox.com/installer/v1/", 
        "manifest": "manifest.json", 
        "project": "./", 
        "china": 0, 
        "alwaysupdate": 0, 
        "installer": "C:/development/sdkbox_installer/sdkbox.pyc", 
        "nopatchingcpp": 0, 
        "local": 0, 
        "nopatching": 1, 
        "jsonapi": 0
    }, 
    "version": [
        2, 
        1, 
        2, 
        6
    ], 
    "result": "ok", 
    "message": "success", 
    "constants": {
        "ANDROID_STUDIO_JNI_DIR": "proj.android-studio/app/jni/", 
        "COCOS_BACKUP_DIR": "backup-2016-03-23-2/", 
        "COCOS_PROJECT_DIR": "./", 
        "COCOS_2DX_INSTALLATION_VERSION": "3.10.0", 
        "ANDROID_COCOS_PACKAGE_ROOT": "cocos2d/cocos/platform/android/java/", 
        "ANDROID_STUDIO_ACTIVITY_NAME": "AppActivity", 
        "SDKBOX_PLUGIN_NAME": "Chartboost", 
        "ANDROID_STUDIO_PROJECT_DIR": "proj.android-studio/", 
        "COCOS_PROJECT_HINT": "./", 
        "SDKBOX_DIR": "C:/Users/David/.sdkbox/", 
        "ANDROID_STUDIO_PROPERTIES": "proj.android-studio/app/project.properties", 
        "COCOS_ENGINE_TYPE": "unknown", 
        "ANDROID_PROJECT_DIR": "proj.android/", 
        "ANDROID_COCOS_SRC_DIR": "cocos2d/cocos/platform/android/java/src/org/cocos2dx/lib/", 
        "COCOS_CLASSES_DIR": "Classes/", 
        "XCODE_PROJECT": "proj.ios_mac/project.pbxproj/", 
        "ANDROID_STUDIO_ACTIVITY_PATH": "proj.android-studio/app/src/org/cocos2dx/cpp/", 
        "ANDROID_SDK_DIR": "C:/development/android/sdk/", 
        "COCOS_2DX_ROOT": "C:/development/cocos2d-x/cocos2d-x-3.10/", 
        "ANDROID_MANIFEST": "proj.android/AndroidManifest.xml", 
        "ANDROID_STUDIO_MANIFEST": "proj.android-studio/app/AndroidManifest.xml", 
        "ANDROID_JNI_DIR": "proj.android/jni/", 
        "ANDROID_ACTIVITY_NAME": "AppActivity", 
        "IOS_PROJECT_DIR": "proj.ios_mac/", 
        "ANDROID_STUDIO_MK": "proj.android-studio/app/jni/Android.mk", 
        "XCODE_PROJECT_DIR": "proj.ios_mac/", 
        "COCOS_2DX_VERSION": "3.10.0", 
        "ANDROID_PROPERTIES": "proj.android/project.properties", 
        "ANDROID_ACTIVITY_PATH": "proj.android/src/org/cocos2dx/cpp/", 
        "ANDROID_MK": "proj.android/jni/Android.mk", 
        "ANDROID_STUDIO_LIBS_DIR": "cocos2d/cocos/platform/android/libcocos2dx/libs/", 
        "ANDROID_LIBS_DIR": "cocos2d/cocos/platform/android/java/libs/", 
        "COCOS_RESOURCES_DIR": "Resources/", 
        "APPLICATION_MK": "proj.android/jni/Application.mk"
    }
},

Chartboost config, signature and id removed

"Chartboost": {
    "signature": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 
    "ads": {
        "Default": {
            "type": "interstitial"
        }, 
        "Level Started": {
            "type": "rewarded_video"
        }, 
        "MoreApp": {
            "type": "more_app"
        }
    }, 
    "id": "XXXXXXXXXXXXXXXXXXXXXXXXXX"
}

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17081

Trending Articles