DefVideoAds (plugin for Unity ADS). Video ADS native extension

Maybe the build server URL could be defined in game.project instead of preferences?

I think this is a preference for the entire workflow, not per-project.
Remember that the default is the live server, and very few users have reason to change that.

Devs should bloody well remember when they’ve been playing with staging server fire!

I think it’s a visibility issue, and perhaps we can output a large banner in the console telling the users that they’re using the beta server.


After a little scrabbling I can confirm: DefVideoAds works when building with The .internal folder had to be deleted first, which led to a few head scratches when the app crashed even with the correct build URL.


Here is a pre-release build Release 4.0.2 · AGulev/DefVideoAds · GitHub that works fine with Defold 1.2.185 and

1 Like

Could somebody check if DefVideoAds works on Android? (New build in 1.2.185)
Yesterday I found I can’t init the NE, but it was deep night, so I’m not sure if it’s a problem on my side or an issue in the NE + new extender server 1.2.185

Hm, strange if I use UnitySDK 3.7.4 or newer for Android then it doesn’t work.

I get an error when try to initialise SDK.
unity.txt (71.8 KB)
I think it somehow related to:

Rejecting re-init on previously-failed class java.lang.Class<

                         W      at<init>(
                         W      at<clinit>(
                         W      at java.lang.reflect.Method.invoke(Native Method)
                         W      at
                         W      at
                         W      at
                         W      at android.os.MessageQueue.nativePollOnce(Native Method)
                         W      at
                         W      at android.os.Looper.loop(
                         W      at

Changes they made in 3.7.4.

@britzl maybe you see something I missed here?

Yes, maybe. It looks like there’s Java reflection happening and that some classes aren’t present. I think you may have to add aaptExtraPackages to your ext.manifest to ensure those classes are included:

            aaptExtraPackages: ['', '']

There is also “gmascar.finders” and “gmascar.adapters” but it looks like it’s only “bridges” that you need to add.

1 Like

hm, no it doesn’t help :frowning:

build-log.txt (14.1 KB)

UPD: maybe it’s something on their side because I don’t get why it tries to use GMA if I use only unity ads itself

Not sure but it seems like this fix helped:

I updated the extension with the latest Android SDK and it works fine now (without aaptExtraPackages)


I have been using 3.7.2 for a while, and was hoping to update to 4.x.

I see the breaking changes in the callback, and was hoping you could tell me something: when there are errors, such as EVENT_SDK_ERROR, is message.placement_id still available? Looking at the new Java code, I’m not sure.

Previously I was able to detect when a placement failed to load or was unavailable, and want to ensure I can still do that. In particular, this is handy for rewarded video ads, so I can update the GUI button to show an error state when necessary.


It totaly makes sense. I added placement_id in the latest release


Thank you for the quick update! I’ll hopefully be able to test the new version later today.

1 Like

Gave this a spin now and it spits back this when bundling for Android:

	Line 392: local variable placementId is accessed from within inner class; needs to be declared final
                    sendSimpleMessage(MSG_BANNER, EVENT_SDK_ERROR, "code", code,"error", errorInfo.errorMessage, "placement_id", placementId);

Bundled fine for iOS though.

hm, sorry for that. This is strange I can build it without any issues (as well as CI). ppbly you use older Defold version or something like that.
Pls check the latest version

1 Like

Very probably - I’m still on 1.2.184. Thanks for looking at this so quickly, superstar!

Going to try bundling again, will report back. Update: Built like a dream. :ok_hand:


The latest version works great for me so far. Releasing to production, so hopefully no hidden issues.

I am 98% confident that I updated my callback function properly :smile:


A post was merged into an existing topic: Defold 1.2.188 has been released

Unity SDK update to version 4.0.0

Attention deprecated API methods removed

  • is_ready() - method deprecated in 3.4.0 and removed now;
  • get_placement_state() - method deprecated in 3.4.0 and removed now;
  • optional parameter enable_per_placement_load for initialize()- now it’s always true by default.

i think it’s something on their side because I don’t get why it tries to use GMA if I use only unity ads itself

looking for more info on it.. ..

you are looking for more info about what? I don’t get what the question is.