AdMob Extension - open source now

How I found where the problem (maybe it would be useful for somebody)…
We can’t be sure, that here we have a full list of dependency because of Gradle download all dependencies. How to check them:

  1. Download pompom script by @britzl (Thanks!)
  2. From the list of includedlibraries for Android I took the main dependencies (I hope so:) ):
    com.google.android.gms:play-services-base:16.0.1 and com.google.firebase:firebase-core:16.0.7
  3. Download them using pompom:
python pompom.py --pom https://maven.google.com/com/google/android/gms/play-services-base/16.0.1/play-services-base-16.0.1.pom --out play_services poms
python pompom.py --out play_services -apv 28 deps
python pompom.py --pom https://maven.google.com/com/google/firebase/firebase-core/16.0.7/firebase-core-16.0.7.pom --out firebase poms
python pompom.py --out firebase -apv 28 deps
  1. Download dependency for AdMob:
python pompom.py --pom https://maven.google.com/com/google/android/gms/play-services-ads/17.2.1/play-services-ads-17.2.1.pom --out ads poms
python pompom.py --out ads -apv 28 deps
  1. Check what we already have in the engine (folder firebase and play_services) and what we need to add to the extension:

It looks terrible right now (it is), but for now (before we exclude GPG from the engine) it’s the one way I know, if somebody knows better, pls share with me.

3 Likes

EXTENSION UPDATE

Fixed conflicts with other extensions.
Now you don’t need to specify App Manifest file in game.project. Remove it.

At the moment, bundling for Android is not working on Windows due to resource bundling bug in Defold. It’s being worked on.

8 Likes

Recently, I noticed that GitHub is getting slower at providing the master.zip file of the repo. Sometimes it takes up to two minutes to open a project. (I don’t exclude that it might be a CDN problem related to my region).

Would it be possible to create a release on GitHub so we can reference that specific zip file (which is usually generated faster) in the game.project file?

More than that, it would allow to easily use a specific version of the extension in the future :smiley:

2 Likes

Will do that once I resolve one outstanding issue!

I added a new argument for pompom script --exclude, and now it possible to exclude libraries that already added in Defold or in some other extension automatically (example).
Defold dependencies in exceptions.json file that based on this list https://www.defold.com/manuals/extensions-details/#_android

For now this update available in separate brunch, we will merge it soon:

1 Like

Solved in Defold 1.2.160 has been released

3 Likes

The extension has been updated for Defold 1.2.160 and now you need to specify additional dependency extension:

  • https://github.com/defold/extension-firebase-core/archive/master.zip
7 Likes

With the released Defold 1.2.162, please add now extension-gps to the dependencies.

  • https://github.com/defold/extension-gps/archive/master.zip
6 Likes

Recently, I noticed that GitHub is getting slower at providing the master.zip file of the repo. Sometimes it takes up to two minutes to open a project. (I don’t exclude that it might be a CDN problem related to my region).

Would it be possible to create a release on GitHub so we can reference that specific zip file (which is usually generated faster) in the game.project file?

Any update on this? :wink: Unfortunately GitHub is still pretty slow to generate the master.zip file runtime (up to 5 minutes sometimes).

That can’t be right. It must be the download that is slow. On a decent connection it takes just a few seconds. From where and using what kind of connection does it take 5 minutes?

Oh, I just saw that you asked specifically for a release. You could fork the repo and make your own release.

1 Like

If you only worry about download speed just download the extension manually and unpack it into your project. This way it won’t be downloading at startup at all.

I think the problem is that github re-generates/doesn’t cache the master.zip but keeps static release zips? So it adds extra wait time. This would be worth testing to see if there is actually a difference.

That would be a very stupid thing not to do… Personally for me there is no wait time before the download starts.

1 Like

EXTENSION UPDATE

Added support for iOS 13. All apps for iOS must be updated.
Fixes the issue with fullscreen ads not being shown.

Google now requires to put app id into Info.plist file for iOS. See docs to add a section in game.project file.

5 Likes

EXTENSION UPDATE

Defold has moved to a new dependency system for android extensions and this update addresses that.
Unfortunately initial Defold dependencies break the extension, so as a temporary measure I’ve made a fixed version of gps-ads-17.2.1.zip dependency.

Steps to migrate your projects:

  • Replace old dependencies with the new ones.
  • Add android_app_id value to the game.project file.
  • Remove app_id param from the call to admob.init().
2 Likes

Works correct with FB Extension v. 2.3.1

2 Likes

What steps should I take to achieve this?

Open the game.project file with some text editor like Sublime, Visual Code or Atom and add those lines:

[admob]
ios_app_id = ca-app-pub-***~***
android_app_id = ca-app-pub-***~***

Make sure there is only one [admob] section in the file.

1 Like

Thank you. My game is working again!

1 Like