Home » Android » android – How to find Google Play Services version from the constants?

android – How to find Google Play Services version from the constants?

Posted by: admin June 15, 2020 Leave a comment

Questions:

I just got an e-mail from Google saying that they are deprecating the version 6.4.1 of AdMob and I need to upgrade the library in order to use the Ads in the application:

...we are deprecating versions 6.4.1 and lower of the Android Google Mobile Ads SDK on September 15th, 2016.
In order to ensure that your ads continue to serve after September 15th, 2016, please upgrade to Google Mobile Ads SDK 7.0.0 or higher...

The problem is that I have lost the entire project (source code) and certificates, and I want to know the version of my AdMob. This is what I got from reverse-engineering:

public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = 6587000;

This is the constants value of: android:value="@integer/google_play_services_version"

Is this the version of the Google Play Services or the Admob? What version 6587000 represents (6.5.8)? I cannot find anything on the internet compared to the Google Play Services release notes.

How to&Answers:

Last version of Admob standalone SDK is 6.4.1. After that all new versions comes with Play Services. I could not find which version it was introduced but as far as I remember It was with Play Services 8.

But android:value=”@integer/google_play_services_version” comes with the Play Services 13. So if your app has integer/google_play_services_version then it is using new versions of Admob, so you will not have any problem with the depreciation.

Also consider this old note from Google; “On August 1, 2014, the Play Store will stop accepting new or updated apps that use the standalone Google AdMob SDK. The SDK does not use the Advertising ID, and will therefore be non-compliant with the Google Play Ad Policy on this date.”

Version 6.4.1 does not have Advertising ID. So if you updated your app after August 1, 2014, then your app will have newer versions of Admob.

Answer:

yes , eg play service version 4.1.00 has code 4100000 and version 6.5.87 has code 6587000.but you can not decide the ad sdk version (especially for android). In the mail they mentioned the ad sdk version. you can view some confusing version history for android here and here

if your app is published after August 1, 2014. you are not worry much about this email.

google play service introduce sdk 4.0 onwards release_notes.

note if your app has integer/google_play_services_version then that is not mean you are using new versions of Admob (after 6.4.1 introduce gps module in the ad).

Answer:

Email from Admob was very confusing to me.

Here is reply I found out on admob developer forum by Admob team. Hope this helps to clarify further

****”Hi Josue,
After talking with the rest of the team, the note you have gotten about the SDK needing to be higher than v6.4.1 refers to a legacy, standalone Mobile Ads SDK that was deprecated back in February 2014, and that had its own versioning system. That deprecation does NOT refer at all to the use of Google Play services. What that means is even if you are using Google Play services 4.0 which was released back in October 2013, you are still OK.
Vu Chau
Mobile Ads SDK Team
“****

Last line makes it very clear, if your google_play_services_version > 4 , you don’t need to make immediate update however it’s good practice to upgrade to latest versions of play services library

Date 9/9/2016 Updated link from Admob for further clarification- https://firebase.google.com/docs/admob/android-legacy-release-notes