[code lang=”js”]
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
[/code]
[code lang=”js”]
<include
android:id="@+id/ad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/include1"
layout="@layout/banner_adview" />
[/code]
[code lang=”js”]
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.InterstitialAd;
public InterstitialAd interstitial;
//** Admob Code */
AdView adView = (AdView) this.findViewById(R.id.adView);
AdRequest request = new AdRequest.Builder().build();
adView.loadAd(request);
interstitial = new InterstitialAd(getBaseContext());
interstitial.setAdUnitId(getResources().getString(
R.string.interstitial_id));
interstitial.loadAd(request);
[/code]
if it’s present
[code lang=”js”]
@Override
public void onBackPressed() {
if (interstitial.isLoaded()) {
interstitial.show();
}
super.onBackPressed();
}
[/code]
Tags: Admob
Warning: _() expects exactly 1 parameter, 2 given in /home2/mobilemeri7/public_html/wp-content/themes/mobilemerit/comments.php on line 28