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

后端 未结 2 447
不知归路
不知归路 2021-02-13 18:34

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 in

相关标签:
2条回答
  • 2021-02-13 19:27

    The logcat error you are getting is for either case 2 or 3.

    Whether Admob craps out on case 4 is interesting. I suspect it will be ok because the old Admob classes ship with the GPS library so in worse case it could fall back to using their pathway.

    0 讨论(0)
  • 2021-02-13 19:34

    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.

    0 讨论(0)
提交回复
热议问题