I am looking to use chartboost,vungle and adcolony with admob mediation.
I have successfully generated ads through vungle and adcolony.But not getting ads with chardboost.
vunglePub.init(getActivity(), "String");
AdColony.configure(getActivity(), "version", "String", "String");
MobileAds.initialize(getActivity(), "String");
mAd = MobileAds.getRewardedVideoAdInstance(getActivity());
FromRewardVideos();
Bundle bundle = new Bundle();
adRequest = new AdRequest.Builder()
.addNetworkExtrasBundle(VungleInterstitialAdapter.class, bundle)
.addNetworkExtrasBundle(AdColonyAdapter.class, bundle)
.addTestDevice("device_id")
.build();
And i am trying to implement ChartBoost like this -
Chartboost.startWithAppId(getActivity(),"id","signature");
DelegateMethod();
Chartboost.setDelegate(chartboostDelegate);
Chartboost.onCreate(getActivity());
private void AdLoad() {
if (Chartboost.hasRewardedVideo(CBLocation.LOCATION_DEFAULT)) {
Chartboost.showRewardedVideo(CBLocation.LOCATION_DEFAULT);
}
else {
// We don't have a cached video right now, but try to get one for next time
Chartboost.cacheRewardedVideo(CBLocation.LOCATION_DEFAULT);
}
}
private void DelegateMethod() {
chartboostDelegate = new ChartboostDelegate() {
@Override
public void didFailToLoadRewardedVideo(String location, CBError.CBImpressionError error) {
super.didFailToLoadRewardedVideo(location, error);
Chartboost.cacheRewardedVideo(CBLocation.LOCATION_DEFAULT);
}
};
}
And calling adbuilder like this
Bundle bundle = new Bundle();
adRequest = new AdRequest.Builder()
.addNetworkExtrasBundle(ChartboostAdapter.class, bundle)
.addTestDevice("device_id")
.build();
Thanks in advance