2
0
Эх сурвалжийг харах

Fixed android admob for gms 17.1.1

Mark Sibly 6 жил өмнө
parent
commit
63813c5620

+ 9 - 2
modules/admob/README.TXT

@@ -61,10 +61,17 @@ Invoke when the user has sat through a rewarded video and therefore claimed thei
 
 To prepare an android studio project for use with admob, add the following line to your project's 'build.gradle (Module:app)' file inside the 'dependancies' block...
 
-    compile 'com.google.android.gms:play-services-ads:11.8.0'
-    
+    implement 'com.google.android.gms:play-services-ads:17.1.1'
+        
 You may need to change the version number depending on when you're reading this.
 
+If you are using a version >= 17.0.0 you will also need to add something like this to your app manifest...
+
+        <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
+            android:value="ca-app-pub-3940256099942544~3347511713"/>
+
+...inside the <application> block. The publisher id shown here allows you to test admob offline, you'll have to change it with your actual admob publisher id when you go 'live'.
+
 After this, you'll need to do a 'gradle sync'.
 
 If you get stuck, try looking at the 'import sdk' section here:

+ 5 - 0
modules/admob/native/Monkey2AdView.java

@@ -116,6 +116,11 @@ public class Monkey2AdView{
                 Log.i( TAG,"onRewardedVideoStarted" );
             }
 
+            public void onRewardedVideoCompleted(){
+
+                Log.i( TAG,"onRewardedVideoCompleted" );
+            }
+
             public void onRewardedVideoAdLeftApplication(){
 
                 Log.i( TAG,"onRewardedVideoAdLeftApplication" );

+ 1 - 1
products/android/Monkey2Game/app/build.gradle

@@ -5,7 +5,7 @@ android {
 
     defaultConfig {
         applicationId "${PACKAGE_NAME}"
-        minSdkVersion 14
+        minSdkVersion 16
         targetSdkVersion 27
         versionCode 1
         versionName "1.0"

+ 0 - 2
products/android/Monkey2Game/app/src/main/AndroidManifest.xml

@@ -4,8 +4,6 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     package="${PACKAGE_NAME}">
 
-    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="27" />
-
     <uses-feature android:glEsVersion="0x00020000" />
 
     <uses-permission android:name="android.permission.INTERNET" />