Upgrade to Google Mobile Ads SDK, 7.0.0 or higher

Monkey Forums/Monkey Bug Reports/Upgrade to Google Mobile Ads SDK, 7.0.0 or higher

therevills(Posted 2016) [#1]
I received the following email from Admob yesterday evening:

Hi,
AdMob is committed to providing you the most effective monetization solutions. As we innovate, it’s important that we leverage the latest technologies to bolster our platform. As part of this movement, 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.


I believe MonkeyX uses 6.4.1... what is the best way to update to 7.0.0?

Cheers,
Steve


marksibly(Posted 2016) [#2]
OK, this looks like being a fun one...

There are actually 2 versions of admob in monkey - the old android target uses the standalone SDK, while the new android target uses 'google play services'.

Google play services (GPS) is, I assume, the way to go. However, I can't work out how to upgrade it - or even if I really need to.

The guildelines for adding GPS to a project are here (see 'eclipse' and 'other' sections).

https://developers.google.com/android/guides/setup

However, they appear to be complete crap. The google-play-services_lib dir is NOT installed by SDK manager anymore as far as I can tell so you're stuffed at step 1.

I have also been completely unable to post to the 'official' support site for admob dev, which I assume is:

https://groups.google.com/forum/#!forum/google-admob-ads-sdk

For some reason, my posts never show up. All other google groups are working fine for me, so either I'm being moderated or the group is auto-rejecting me for some reason or maybe I'm just too NOOB for the geniues there...

Reading the posts though, it appears I'm not the only one to notice the missing GPS lib, but there is no explanation of why or alternative methods for updating GPS - on non-Unity projects anyway.

The only thing I can find that might be relevant is this:

"To get the latest version of Google Play services for your Eclipse implementation, you can find the .aar files in /sdk/extras/google/m2repository/com/google/android/gms."

I can find the '.aar' files but have no idea what to do with them - any help greatly appreciated here!


marksibly(Posted 2016) [#3]
Ugly stuff, but I now have google play services v8.4.0 running with the latest android target!

Well, it's showing test ads OK anyway...

I would very much like to retire the old android target - are there any objections to this?


secondgear(Posted 2016) [#4]
No objections. Even the "new" one is getting obsolete. I've put together a (rather hack-ish) Android Studio/Gradle target with customized trans.


marksibly(Posted 2016) [#5]
The new android target targets gingerbread+ and I would like to bump the required build sdk to 24 (the latest, ie: Android 'N') - also OK with everyone?


secondgear(Posted 2016) [#6]
I set mine to
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="23" />

You might want to take a look at this before targeting Android N: https://developer.android.com/preview/features/multi-window.html , in particular this part:

android:resizeableActivity
"If your app targets Android N, but you do not specify a value for this attribute, the attribute's value defaults to true."


marksibly(Posted 2016) [#7]
> android:resizeableActivity

That should only apply if targetSdkVersion=24 though? I would think Google would make it safe to always use the most recent SDK, like Apple do.

I basically picked 24 coz that's a what new Andriod Studio project used. Ditto the GPS v8.4.0

Another question - what exactly is the deal with targetSdkVersion? The docs say 'the version of android the app has been tested with'. Well, I've tested with 23, but what about other monkey users?!? Or, if I've tested with 23 that's good enough? Makes sense I guess, although people might need to be aware of this if they're mucking around with Java?

If so, how does using sdk-24 for building and minSdkVersion=10, targetSdkVersion=23 in the manifest sound?

This is definitely gonna be a version 'a' release so I can always change it later!


Xaron(Posted 2016) [#8]
Yes go for it Mark. :)


therevills(Posted 2016) [#9]
Thanks for looking into this Mark :)

(Hopefully the Interstitial are easy to add/fix to the new version too - this is where I make the most revenue from!)

what exactly is the deal with targetSdkVersion?

It's a strange one, bit like the maxSdkVersion, I think someone had an idea for them , but no-one understood it.... but it is still needed...


Soap(Posted 2016) [#10]
Update on this? Looks like it's already in latest experimental version?

Any chance for Google Play Games Services to be added officially even in a basic way?


Xaron(Posted 2016) [#11]
Well it works for me. Google Play services would be awesome!


therevills(Posted 2016) [#12]
Thanks for this fix Mark - managed to find some time on updating a couple of my projects :)

For Interstitial Ads I still had to use a slightly updated version of v84b to get them to work. Looks like the Game services will take a bit of work to get going again though...