Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Niels

Junior Member
Registered:
Posts: 7
Reply with quote  #1 

Hi everyone,

I have been reading this forum for a long time and I finally registered an account because I can use your help:

I am integrating Chartboost's Rewarded Videos but I am getting this error message:

"Failed to load Rewarded Video, no ad found !"

When test mode is enabled there is no confirmation image showing up. There is an active campaign for rewarded videos running. I am using the Chartboost's example code.

 

What am I doing wrong?

 

Thanks in advance,

 

Niels

0
NKY-Games

Avatar / Picture

Registered:
Posts: 208
Reply with quote  #2 
Hi Niels, Welcome to the forum,

The most typical scenario is normaly due to there not being any ads in your area.

Also try and cache the ad, give it like 15 seconds and then try to call the rewarded video.
You could use this function to know if that is true or not, before calling.

(void)didCacheRewardedVideo[frown]CBLocation)location {}

Good Luck!



__________________
Come visit me at @ http://www.nkygames.com
0
Niels

Junior Member
Registered:
Posts: 7
Reply with quote  #3 

Hi NKY-Games,

 

Thanks! It helped when I waited a little longer before calling the rewarded video.

I am now trying to cache the video first and than only show the 'earn free coins' button when there is indeed a rewarded video cached.

 

Thanks again!

0
NKY-Games

Avatar / Picture

Registered:
Posts: 208
Reply with quote  #4 
Cool, np, glad to help.
Just hook it up to a boolean and call the add if cached is true [tongue]
Good luck!

__________________
Come visit me at @ http://www.nkygames.com
0
Niels

Junior Member
Registered:
Posts: 7
Reply with quote  #5 

I want to do the following:

Cache rewarded video. If rewarded video is cached, show button. If button is pressed, show rewarded video. If rewarded video is watched completely, give +15 coins (in game currency).

-----

1. - (BOOL)application[frown]UIApplication )application didFinishLaunchingWithOptions[frown]NSDictionary )launchOptions{ [Chartboost startWithAppId:@"XXX" appSignature:@"XXX" delegate:self];

[Chartboost cacheRewardedVideo:CBLocationHomeScreen];}

2. - (void)didCacheRewardedVideo[frown]CBLocation)location {

if([Chartboost hasRewardedVideo:CBLocationHomeScreen]) {

showButton.hidden=NO;

}


}

3. -(IBAction)showVideo[frown]id)sender{


[Chartboost showRewardedVideo:CBLocationHomeScreen];


}

-----

I can't seem to get it working. This is the code I am using, what am I doing wrong?

 

Thanks!

0
NKY-Games

Avatar / Picture

Registered:
Posts: 208
Reply with quote  #6 

This widely depends on what device your aiming for and how you are going to programe the functions. But for an overall example I would about doing it like this I believe:

public void watch_Ad () 
{
#if UNITY_ANDROID
if(ChartboostAndroid.hasCachedRewardedVideo("Default") == true)
{
ChartboostAndroid.showRewardedVideo("Default");
}
#endif

#if UNITY_IPHONE
if(ChartboostBinding.hasCachedRewardedVideo("Default") == true)
{
ChartboostBinding.showRewardedVideo("Default");

}
#endif

}


public void Cache_Ad_Now () 
{
#if UNITY_IPHONE
ChartboostBinding.cacheRewardedVideo("Default");
#endif

#if UNITY_ANDROID
ChartboostAndroid.cacheRewardedVideo("Default");
#endif
}

public void watch_Ad_Now () 
{
#if UNITY_IPHONE
ChartboostBinding.showRewardedVideo("Default");
#endif

#if UNITY_ANDROID
ChartboostAndroid.showRewardedVideo("Default");
#endif
}



Just add sols else statements depending on what functionality you want to achieve.
I hope this helps.
Good luck.

__________________
Come visit me at @ http://www.nkygames.com
0
Niels

Junior Member
Registered:
Posts: 7
Reply with quote  #7 
Thanks again! I'm going to give this a try!
0
NKY-Games

Avatar / Picture

Registered:
Posts: 208
Reply with quote  #8 
your welcome [wink]
__________________
Come visit me at @ http://www.nkygames.com
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.