0
Chartboost ads加載活動暫停屏幕很長時間來加載interterestial.I想知道如何從chartboost中刪除這個加載場景,以便我可以進入我的應用程序內的其他活動ChartBoost廣告暫停屏幕
@Override
protected void onStart() {
super.onStart();
this.cb.showMoreApps();
this.cb.onStart(this); //By Rishi
// Notify the beginning of a user session. Must not be dependent on user
// actions or any prior network requests.
this.cb.startSession();
// Show an interstitial
this.cb.showInterstitial();
}
@Override
protected void onStop() {
super.onStop();
this.cb.onStop(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
this.cb.onDestroy(this);
}
public void onLoadButtonClick(View view) {
this.cb.showInterstitial();
String toastStr = "Loading Interstitial";
if (cb.hasCachedInterstitial())
toastStr = "Loading Interstitial From Cache";
Toast.makeText(this, toastStr, Toast.LENGTH_SHORT).show();
}
private ChartboostDelegate chartBoostDelegate = new ChartboostDelegate() {
public boolean shouldDisplayInterstitial(String location) {
Log.i("", "SHOULD DISPLAY INTERSTITIAL '" + location + "'?");
return true;
}
public boolean shouldRequestInterstitial(String location) {
Log.i("", "SHOULD REQUEST INSTERSTITIAL '" + location + "'?");
return true;
}
public void didCacheInterstitial(String location) {
Log.i("", "INTERSTITIAL '" + location + "' CACHED");
}
public void didFailToLoadInterstitial(String location) {
// Show a house ad or do something else when a chartboost
// interstitial fails to load
Log.i("", "INTERSTITIAL '" + location + "' REQUEST FAILED");
// Toast.makeText(FrozenBubble.this,
//"Interstitial '"+location+"' Load Failed";
// Toast.LENGTH_SHORT).show();
}
public void didDismissInterstitial(String location) {
// Immediately re-caches an interstitial
cb.cacheInterstitial(location);
Log.i("", "INTERSTITIAL '" + location + "' DISMISSED");
// Toast.makeText(FrozenBubble.this,
// "Dismissed Interstitial '"+location+"'",
// Toast.LENGTH_SHORT).show();
}
public void didCloseInterstitial(String location) {
Log.i("", "INSTERSTITIAL '" + location + "' CLOSED");
// Toast.makeText(FrozenBubble.this,
// "Closed Interstitial '"+location+"'",
// Toast.LENGTH_SHORT).show();
}
public void didClickInterstitial(String location) {
Log.i("", "DID CLICK INTERSTITIAL '" + location + "'");
// Toast.makeText(FrozenBubble.this,
// "Clicked Interstitial '"+location+"'",
// Toast.LENGTH_SHORT).show();
}
public void didShowInterstitial(String location) {
Log.i("", "INTERSTITIAL '" + location + "' SHOWN");
}
public void didFailToLoadUrl(String url) {
// Show a house ad or do something else when a chartboost
// interstitial fails to load
Log.i("", "URL '" + url + "' REQUEST FAILED");
// Toast.makeText(FrozenBubble.this, "URL '"+url+"' Load Failed",
// Toast.LENGTH_SHORT).show();
}
public boolean shouldDisplayLoadingViewForMoreApps() {
return true;
}
public boolean shouldRequestMoreApps() {
return true;
}
public boolean shouldDisplayMoreApps() {
Log.i("", "SHOULD DISPLAY MORE APPS?");
return true;
}
public void didFailToLoadMoreApps() {
Log.i("", "MORE APPS REQUEST FAILED");
//Toast.makeText(Menu.this, "More Apps Load Failed", Toast.LENGTH_SHORT).show();
}
public void didCacheMoreApps() {
Log.i("", "MORE APPS CACHED");
}
public void didDismissMoreApps() {
Log.i("", "MORE APPS DISMISSED");
//Toast.makeText(Menu.this, "Dismissed More Apps", Toast.LENGTH_SHORT) .show();
}
public void didCloseMoreApps() {
Log.i("", "MORE APPS CLOSED");
//Toast.makeText(Menu.this, "Closed More Apps", Toast.LENGTH_SHORT).show();
}
public void didClickMoreApps() {
Log.i("", "MORE APPS CLICKED");
//Toast.makeText(Menu.this, "Clicked More Apps", Toast.LENGTH_SHORT).show();
}
public void didShowMoreApps() {
Log.i("", "MORE APPS SHOWED");
}
public boolean shouldRequestInterstitialsInFirstSession() {
return true;
}
};
感謝埃德....給我你寶貴的時間 – rishiPlus