Skip to content

Commit

Permalink
Updating samples for Studio 3.0 and SDK 11.6.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBrogdon committed Nov 7, 2017
1 parent 06c6f7f commit 3f369e5
Show file tree
Hide file tree
Showing 150 changed files with 191 additions and 573 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ technical SDK support for our [Android developers](https://groups.google.com/for

## AdMob

* [Banner](https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/BannerExample)
* [Interstitial](https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/InterstitialExample)
* [Native Advanced](https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/NativeAdvancedExample)
* [Native Express](https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/NativeExpressExample)
* [Rewarded Video](https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/RewardedVideoExample)
* Banner: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/admob/BannerExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/admob/BannerExample)
* Interstitial: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/admob/InterstitialExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/admob/InterstitialExample)
* Rewarded Video: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/admob/RewardedVideoExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/admob/RewardedVideoExample)
* Native Advanced: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/admob/NativeAdvancedExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/admob/NativeAdvancedExample)
* Native Express: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/admob/NativeExpressExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/admob/NativeExpressExample)

## Advanced

* [API Demo](https://github.com/googleads/googleads-mobile-android-examples/tree/master/advanced/APIDemo) - Provides additional examples for both AdMob and DoubleClick to help improve your mobile app integration of the Google Mobile Ads SDK.
* [Native Express RecyclerView](https://github.com/googleads/googleads-mobile-android-examples/tree/master/advanced/NativeExpressRecyclerViewExample) - Provides an example for displaying ads from AdMob Native Ads Express in a RecyclerView widget.
* [Native ListView](https://github.com/googleads/googleads-mobile-android-examples/tree/master/advanced/NativeListViewExample) - Provides an example for displaying ads from DFP Custom Rendering in a ListView.
* API Demo: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/advanced/APIDemo), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/advanced/APIDemo) - Provides additional examples for both AdMob and DoubleClick to help improve your mobile app integration of the Google Mobile Ads SDK.
* Native Express RecyclerView: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/advanced/NativeExpressRecyclerViewExample) - Provides an example for displaying ads from AdMob Native Ads Express in a RecyclerView widget.
* Native ListView: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/advanced/NativeListViewExample) - Provides an example for displaying ads from DFP Custom Rendering in a ListView.

## DoubleClick

* [Banner](https://github.com/googleads/googleads-mobile-android-examples/tree/master/doubleclick/BannerExample)
* [Interstitial](https://github.com/googleads/googleads-mobile-android-examples/tree/master/doubleclick/InterstitialExample)
* [Custom Rendering](https://github.com/googleads/googleads-mobile-android-examples/tree/master/doubleclick/CustomRenderingExample)
* Banner: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/doubleclick/BannerExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/doubleclick/BannerExample)
* Interstitial: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/doubleclick/InterstitialExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/doubleclick/InterstitialExample)
* Custom Rendering: [Java](https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/doubleclick/CustomRenderingExample), [Kotlin](https://github.com/googleads/googleads-mobile-android-examples/tree/master/kotlin/doubleclick/CustomRenderingExample)

# Downloads

Expand Down
7 changes: 2 additions & 5 deletions java/admob/BannerExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"

buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.google.android.gms.example.bannerexample"
minSdkVersion 14
Expand All @@ -21,7 +20,5 @@ android {

dependencies {
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.google.firebase:firebase-ads:11.4.0'
compile 'com.google.android.gms:play-services-ads:11.6.0'
}

apply plugin: 'com.google.gms.google-services'
64 changes: 0 additions & 64 deletions java/admob/BannerExample/app/google-services.json

This file was deleted.

11 changes: 1 addition & 10 deletions java/admob/BannerExample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms.example.bannerexample" >
<!-- Include required permissions for Google Mobile Ads to run-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<!--This meta-data tag is required to use Google Play Services.-->
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
<activity
android:name=".MyActivity"
android:label="@string/app_name" >
Expand All @@ -21,10 +16,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--Include the AdActivity configChanges and theme. -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected void onCreate(Bundle savedInstanceState) {

// Gets the ad view defined in layout/ad_fragment.xml with ad unit ID set in
// values/strings.xml.
mAdView = (AdView) findViewById(R.id.ad_view);
mAdView = findViewById(R.id.ad_view);

// Create an ad request. Check your logcat output for the hashed device ID to
// get test ads on a physical device. e.g.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">BannerExample</string>
<string name="app_name">AdMob Banner Example</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>

Expand Down
8 changes: 3 additions & 5 deletions java/admob/BannerExample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.android.tools.build:gradle:3.0.0'
}
}

allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Feb 24 09:52:21 PST 2017
#Fri Oct 27 15:02:35 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.0.1-all.zip
distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip
7 changes: 2 additions & 5 deletions java/admob/InterstitialExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"

buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.google.android.gms.example.interstitialexample"
minSdkVersion 14
Expand All @@ -21,7 +20,5 @@ android {

dependencies {
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.google.firebase:firebase-ads:11.4.0'
compile 'com.google.android.gms:play-services-ads:11.6.0'
}

apply plugin: 'com.google.gms.google-services'
64 changes: 0 additions & 64 deletions java/admob/InterstitialExample/app/google-services.json

This file was deleted.

13 changes: 3 additions & 10 deletions java/admob/InterstitialExample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms.example.interstitialexample" >
<!-- Include required permissions for Google Mobile Ads to run. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<!--This meta-data tag is required to use Google Play Services. -->
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

<activity
android:name=".MyActivity"
android:label="@string/app_name" >
Expand All @@ -21,10 +18,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--Include the AdActivity configChanges and theme. -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void onAdClosed() {
});

// Create the "retry" button, which tries to show an interstitial between game plays.
mRetryButton = ((Button) findViewById(R.id.retry_button));
mRetryButton = findViewById(R.id.retry_button);
mRetryButton.setVisibility(View.INVISIBLE);
mRetryButton.setOnClickListener(new View.OnClickListener() {
@Override
Expand All @@ -81,7 +81,7 @@ private void createTimer(final long milliseconds) {
mCountDownTimer.cancel();
}

final TextView textView = ((TextView) findViewById(R.id.timer));
final TextView textView = findViewById(R.id.timer);

mCountDownTimer = new CountDownTimer(milliseconds, 50) {
@Override
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">InterstitialExample</string>
<string name="app_name">AdMob Interstitial Example</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="impossible_game">Impossible Game</string>
Expand Down
8 changes: 3 additions & 5 deletions java/admob/InterstitialExample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.android.tools.build:gradle:3.0.0'
}
}

allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Feb 24 11:31:32 PST 2017
#Fri Oct 27 15:15:04 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.0.1-all.zip
distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip
7 changes: 2 additions & 5 deletions java/admob/NativeAdvancedExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"

buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.google.example.gms.nativeadvancedexample"
minSdkVersion 14
Expand All @@ -21,7 +20,5 @@ android {

dependencies {
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.google.firebase:firebase-ads:11.4.0'
compile 'com.google.android.gms:play-services-ads:11.6.0'
}

apply plugin: 'com.google.gms.google-services'
Loading

0 comments on commit 3f369e5

Please sign in to comment.