How to update an Android 1.6 app with AdMob

Adrian Dibu

Member
Sep 10, 2015
12
0
0
Visit site
Hi,
I have an app METs. I made it for android 1.6 in 2009 and I unpublish it in 2009.
I want to republish now with AdMob. I added Google Play services and I wasn't able to solve the error message:
Could not find method android.view.Display.getRealMetrics, referenced from method com.google.android.gms.ads.internal.util.client.zza.zzT.
It appear at line AdRequest adRequest = new AdRequest.Builder().build(); If I change Project --> Properties - > Android --> Android 1.6 to Android 4.0 and android:configChanges="keyboard|keyboardHidden|orientation" to android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
Works perfect
Thanks


Thanks
 

Adrian Dibu

Member
Sep 10, 2015
12
0
0
Visit site
Hi,
I Googled for how to make an Android 1.6 with AdMob with Google Play services..
From August 2014 you will approve only apps with Google Play services.
I have an app METs.
I made it for android 1.6 in 2009 and I unpublish it in 2009.
I want to republish now with AdMob. I added Google Play services and I wasn't able to solve the error message:
Could not find method android.view.Display.getRealMetrics, referenced from method com.google.android.gms.ads.internal.util.client.zza.zzT.
It appear at line AdRequest adRequest = new AdRequest.Builder().build();
If I change Project-->Properties-->Android-->Android 1.6 to Android 4.0 and in Manifest
android:configChanges="keyboard|keyboardHidden|orientation" to android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
Works perfect.
It seams com.google.android.gms.ads.internal.util.client.zza.zzT ask for android.view.Display.getRealMetrics
and Android 1.6 not having it. How can I find android.view.Display.getRealMetrics and how I wrap it to be seen:
Thanks
 

Adrian Dibu

Member
Sep 10, 2015
12
0
0
Visit site
Hi,
To be more clear.
I want to add to an Android 1.6 AdMob.
I used
Project-->Properties-->Android-->Android 4.0 and in Manifest
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
Works perfect.

If I changed it to
Project-->Properties-->Android-->Android 1.6.and in Manifest
android:configChanges="keyboard|keyboardHidden|orientation"(I changed it to prevent error in xml)
and I I had error message:
Could not find method android.view.Display.getRealMetrics, referenced from method com.google.android.gms.ads.internal.util.client.zza.zzT.

It appear at line AdRequest adRequest = new AdRequest.Builder().build();

I am forced from August 2014 to be approved to use Google Play Services not SDK..
When I lunch AdRequest adRequest = new AdRequest.Builder().build();
Google Play Service method com.google.android.gms.ads.internal.util.client.zza.zzT.
are looking for an inexistent method
android.view.Display.getRealMetrics

How can I fix it.
 

Adrian Dibu

Member
Sep 10, 2015
12
0
0
Visit site
Hi,
It is clear that it is a bug in google-play-services_lib
When you try to add AdMob to an Android 1.6(Level4) you get the message
Could not find method android.view.Display.getRealMetrics, referenced from method com.google.android.gms.ads.internal.util.client.zza.zzT.

sdk 1.6 has not getRealMetrics method in android.view.Display
They suppose to detect the level and add the methods to be able to run:
AdRequest adRequest = new AdRequest.Builder().build();
Best regards
 

Adrian Dibu

Member
Sep 10, 2015
12
0
0
Visit site
My problem was to update with AdMob 1.6(API level 4 Donut). To be approved they forced me to use Google Play Services and rebuilt them with Android 2.3(API level 9 Gingerbread) Project-->Properties-->Android-->Android 2.3(Level 9) and in Manifest android:minSdkVersion="9" I have a error in xml Manifest related to android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize'".I changed it to android:configChanges="keyboard|keyboardHidden|orientation" to work but instead of banner I have an error that I must add android:configChanges.So I changed android:minSdkVersion="13"
and it works. I am very sad from Android level 4 I ended to level 13 it is a lot of missing phones.
To conclude Google Play Services works only if android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize'". android:minSdkVersion="13".not android:minSdkVersion="9" how they recomanded.
 

Members online

Forum statistics

Threads
943,144
Messages
6,917,506
Members
3,158,841
Latest member
kirk781