本文整理匯總了Java中com.google.android.gms.ads.InterstitialAd.show方法的典型用法代碼示例。如果您正苦於以下問題:Java InterstitialAd.show方法的具體用法?Java InterstitialAd.show怎麽用?Java InterstitialAd.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.android.gms.ads.InterstitialAd
的用法示例。
在下文中一共展示了InterstitialAd.show方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onGotIt
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
public void onGotIt(View button) {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor prefEditor = settings.edit();
prefEditor.putBoolean("gotIt", true);
prefEditor.apply();
Intent i = new Intent(this, SettingsActivity.class);
startActivity(i);
//mInterstitialAd.show();
InterstitialAd ad1 = AdManager.getAd1();
if (ad1.isLoaded()) {
ad1.show();
}
//interventie 2
Log.d("ADS_REACH","Reached ad code");
finish();
//aici era interstitial initial
}
示例2: showIntersitialAdOnNextLevel
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
boolean showIntersitialAdOnNextLevel(InterstitialAd intersitialAdOnNextLevel, int actualLevel) {
if (actualLevel % 2 == 0) {
if (intersitialAdOnNextLevel.isLoaded()) {
intersitialAdOnNextLevel.show();
return true;
} else {
return false;
}
}else{
return false;
}
}
示例3: showTabInterstitials
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
private void showTabInterstitials() {
if (interstitialsTabAd != null) {
for (InterstitialAd interstitialAd : interstitialsTabAd) {
if (interstitialIsReady(interstitialAd)) {
interstitialAd.show();
return;
}
}
}
}
示例4: showSettingsInterstitials
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
private void showSettingsInterstitials() {
if (interstitialsSettingsAd != null) {
for (InterstitialAd interstitialAd : interstitialsSettingsAd) {
if (interstitialIsReady(interstitialAd)) {
interstitialAd.show();
return;
}
}
startActivity(new Intent(this, SettingsActivity.class));
}
}
示例5: showInstallInterstitials
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
private void showInstallInterstitials() {
if (interstitialsInstallAd != null) {
for (InterstitialAd interstitialAd : interstitialsInstallAd) {
if (interstitialIsReady(interstitialAd)) {
interstitialAd.show();
Analytics.newEvent("interstitial_ad").put("id", interstitialAd.getAdUnitId()).log();
return;
}
}
}
}
示例6: loadAds
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
private void loadAds() {
InterstitialAd mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-5257007452683157/9157734222");
AdRequest.Builder adRequestBuilder = new AdRequest.Builder();
adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
mInterstitialAd.loadAd(adRequestBuilder.build());
mInterstitialAd.show();
}
示例7: showIntersitialAdOnClose
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
boolean showIntersitialAdOnClose(InterstitialAd intersitialAdOnClose, int actualLevel){
if(actualLevel % 2 == 0) {
if (intersitialAdOnClose.isLoaded()) {
intersitialAdOnClose.show();
return true;
} else {
return false;
}
}else{
return false;
}
}
示例8: showIntersitialAdOnClose
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
boolean showIntersitialAdOnClose(InterstitialAd intersitialAdOnClose, boolean isShowInterstialOnClose){
if(isShowInterstialOnClose) {
if (intersitialAdOnClose.isLoaded()) {
intersitialAdOnClose.show();
return true;
} else {
return false;
}
}else {
return false;
}
}
示例9: showIntersitialAdOnNextLevel
import com.google.android.gms.ads.InterstitialAd; //導入方法依賴的package包/類
boolean showIntersitialAdOnNextLevel(InterstitialAd intersitialAdOnClose){
if (intersitialAdOnClose.isLoaded()) {
intersitialAdOnClose.show();
return true;
} else {
return false;
}
}