Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you really need to check for Google Play services to use AdMob?

Google's instructions here say that if you want to use AdMob in your Android app via Google Play services you must ensure the user's device has the Google Play services APK installed. However, I'm having terrible trouble trying to get this working; and I've noticed that even if I uninstall the Google Play services updates on my phone (and don't bother checking if the services is available) my app is still perfectly able to retrieve and display ads! This is despite errors in LogCat like the following:

W/GooglePlayServicesUtil(26558): Google Play services out of date.  Requires 4132500 but found 3159130

Presumably my phone still has the original version of Google Play services installed when it came out the factory. I'm just wondering whether I really need to check for Google Play services being available to use AdMob successfully. Right now it appears not. Please can someone tell me why I should bother having to make this check. Is it to handle case 4 at that Google link I gave above...?

The Google Play services APK is missing or disabled on the device, which might happen if the user explicitly uninstalls or disables it.

like image 684
snark Avatar asked Feb 02 '14 15:02

snark


People also ask

Is Google Play Services necessary?

Google Play services helps to ensure the security and reliability of an Android device, and keep devices updated with the latest security features. This includes: Google Play Protect, which can warn users if an app contains known malware.

What permissions does Google Play Services actually need?

Google Play services automatically obtains all permissions it needs to support its APIs. However, your app should still check and request runtime permissions as necessary and appropriately handle errors in cases where a user has denied Google Play services a permission required for an API your app uses.

Does AdMob require approval?

When you set up a new app in AdMob, your app must be reviewed and approved before it can fully serve ads. This helps us create a clean and safe ads ecosystem for you and your advertisers. It also provides you with a unified, at-a-glance view of all your apps and their approval status with actionable feedback.

Can I use AdMob without uploading at Play Store?

You can show ads in an app which is not available in Google Play Store. But, Adsense team regularly checks the apps in every account. If they find your app is not available in Google Play Store or banned in Google Play, they will suspend all the ad units related to the app in your AdMob account.


1 Answers

TL;DR - You do NOT need to check for Google Play services to use the Mobile Ads APIs.

The Google Mobile Ads offering in Google Play services is unique from most (all?) of the other libraries in Google Play services in that it CAN work without the service APK installed on the device.

If the APK installed on the device is a more recent version, the library will load the classes from the APK service and use these newer classes to request ads. Otherwise, the version of Google Play services that you compile in your app is sufficient to fetch ads.

The benefit here is that you effectively will always run against the latest version of the library when the device has the service installed. And in the case that your service version is older than the version you compiled your app against (ex: your example above) or in the case where there is no service on the device (ex: Kindle Fire), the library compiled with your app can still do the ad fetching, but you'll still have to pull in updates manually.

like image 120
Eric Leichtenschlag Avatar answered Sep 21 '22 05:09

Eric Leichtenschlag