DefAds - Showing ads on mobile using a webview

Exellent share.
You’re really awesome and make great work and share for all the community.
Thx

5 Likes

I agree.
@britzl is a nordic Defold god.

7 Likes

Ha! I should print business cards with that title!

7 Likes

I have updated DefAds to version 0.4. The new version brings with it a change in the setup where DefAds will no longer set itself up as IAC listener since that might interfere with if the app is already using the IAC module for something else. If you are using DefAds then please follow the updated steps in the readme (step #5 is new, the rest is unchanged).

5 Likes

DefAds has been updated to version 0.5. This release includes support for Giftgaming ads. I have also done additional testing on iOS to fix a couple of issues.

9 Likes

Thanks @britzl!

Everyone, please head over to our thread for more information about giftgaming!

1 Like

@britzl, I’m terribly sorry to bother you, but, can you share a working example of using adsense in defAds

1 Like

When i’m trying to use Adsense, it shows only a white screen with a “X” button and a string “BELOW” in left top corner.
What i’m doing wrong?

I remember having some issues with Adsense, but I can’t recall the details. If you are testing on Android then make sure to build a non-release build. Then take a look at the log:

adb logcat -s chromium

This should show if the webview runs into any Javascript errors or anything like that or if the Adsense SDK gives you any hints.

c:\Program Files (x86)\Android\android-sdk\platform-tools>adb logcat -s chromium --------- beginning of /dev/log/system --------- beginning of /dev/log/main D/chromium( 4715): Unknown chromium error: -6

@britzl Today I tried to use your library, unfortunately I can’t integrate it.
Too many issues:

  • add_error message all time
  • when I tap to AD I can’t return to the app
  • some networks doesn’t work or work very strange
  • video ads doesn’t work

Look forward to native ad sdk.
Anyway thanks for your work.

Really? That’s a shame. I’ll see what I can do to improve it.

I can reveal that Mathias has started working on an AdMob extension based on out new extension system. Things seem to be progressing well and I hope that we can share a teaser here on the forum soon. I can’t wait until we can get the extension system into the hands of you guys and see what you can make with it! I’m really impressed by what I’ve seen of the system so far!

4 Likes

@britzl As I understand you have no checking for sponsor availability for gift gaming?

Ah, no, that is correct. I don’t. That’s an additional API call before deciding if the ad should be shown or not, right?

1 Like

yes, it is api for checking availability of sponsor (ad)

I’ve added support to do a prefetch and get a callback when there is an ad available. I also added the GiftGaming ad tracking parameters to increase CPM. To prefetch an ad do the following:

msg.post("url_to_giftgaming_go", "prefetch", { apikey = "12345abcde", test = false })

This will post either a prefetch_ok or prefetch_failed message back to the sender. If prefetch_ok is received there’s a 30 second window to post a show message to show the prefetched ad.

4 Likes

I’m new to mobile advertising. What kind of ads do these networks provide? Are they safe for an app targeted to children?
Few years ago Leadbolt gained a bad reputation for very intrusive ads:

I’d like to hear someone with first hand experience.

1 Like

I’m not sure if anyone is actually using any of the ad networks included in DefAds. Bear in mind that DefAds uses the webview API and can thus only show fullscreen ads. We recently released support for native extensions and this has opened up the box so to speak when it comes to including many more Ad SDKs and also supporting the full range of features from those networks. We (the Defold team) will release an AdMob integration sample soon and there is an ongoing implementation of Appodeal ads, made by the Appodeal guys themselves. Read more about this here and give it a try yourself!

4 Likes

I can’t try the Appodeal extension because it’s only for iOS. Anyway I’m a bit confused about lack of Defold proper ads support, being Defold a King product I thought it was targeted to making commercial games, but until now it seems ads support was not a priority. I hope this will change really soon.

@Mathias_Westerdahl and @sven are working on the Java support for native extensions. The plan is for the support to be in place end of April/beginning of May. Once the Java support is in place we have removed the last hurdle for inclusion of mobile SDKs on both Android and iOS. I suggest that you start looking at the Appodeal beta, since I can almost 100% guarantee that they will add Android support as soon as it is available. And from your end there would be very little you have to do once that support is in place if you already have it working on iOS. We will also very likely release an AdMob extension as a part of the Java release.

We are very well aware that ads is a highly requested feature among our indie developers. Since we do not wish to bloat the engine size by adding SDKs left and right the only option for us has been to create support for what we call native extensions. The technical challenges of creating a rock solid native extension feature has unfortunately delayed this.

Also, Defold is already targeted for making commercial games, although monetization currently comes in the form of in-app purchases only (which is what King games use).

Finally I’d just like to say that Defold has been public for just little over a year, and much has happened since then:

  • Editor 2
  • Live Update
  • Alpha release of native extensions
  • 3D animation support
  • Crash reporting
  • Dynamic screen orientation support
  • Local notifications on Android and iOS
  • Async loading of collections
  • Bitmap and dynamic font support
  • Gui templates
  • Amazon store support
  • Facebook analytics and Facebook payments
  • WebP support
  • WebView
  • Labels on game objects
  • Spine in Gui
  • Hundreds of bug fixes and minor improvements
12 Likes