本文整理汇总了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;
}
}