New Android Studio Admob tutorial

New Android Studio Admob tutorial
New Android Studio Admob tutorial
Title : New Android Studio Admob tutorial
Duration : 09:03
Channel : SpaceCityTutorials
Label : Android Studio, Admob, Google Play (API Provider)
New Android Studio Admob tutorial
New Android Studio Admob tutorial
New Android Studio Admob tutorial
New Android Studio Admob tutorial

Using Admob with Google Play Services. Code Snippets: I had to remove the brackets because Youtube would not let me post them for some reason. Just add the brackets into the code snippets as they are in the video and it will work fine :) Add to AndroidManafest.xml 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"/ uses-permission android:name="android.permission.INTERNET" uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.AdRequest; private AdView adView; private static final String AD_UNIT_ID = "ca-app-pub-2745542618420387/3215963553"; private static final String DEVICE_ID = "YOUR DEVICE HASH ID"; adView = (AdView) this.findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder() .addTestDevice(DEVICE_ID) .build(); adView.loadAd(adRequest); xmlns:ads="http://schemas.android.com/apk/res-auto" com.google.android.gms.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adUnitId="AD UNIT ID HERE" ads:adSize="BANNER"/



Share this

Related Posts

Previous
Next Post »