GodotAdmob icon indicating copy to clipboard operation
GodotAdmob copied to clipboard

How to use?

Open Bayaola opened this issue 8 years ago • 21 comments

I do not very well understand how to use this module to display advertising in my game. You can simply explain the steps for a beginner?

Bayaola avatar Jan 18 '16 02:01 Bayaola

Since Godot change build Android from ant to gradle and removed Google play services, this module is must change something, and I must research it, sorry.

Mavhod avatar Jan 18 '16 04:01 Mavhod

ok, could I have another direction for advertising in my game?

Bayaola avatar Jan 18 '16 04:01 Bayaola

If you not strict, maybe you download old Godot revision from Github for use this module.

Mavhod avatar Jan 18 '16 04:01 Mavhod

https://github.com/godotengine/godot/issues/3285

Above is issue from punto version, but I still not success to try it.

Mavhod avatar Jan 18 '16 04:01 Mavhod

I think I'll publish my game without advertising, hoping that GodotAdmob will be updated thanks and courage to you

Bayaola avatar Jan 18 '16 05:01 Bayaola

Ok after try it, I can build Godot with admob again, you can pull last repo and read README again.

Mavhod avatar Jan 18 '16 08:01 Mavhod

Hi Mavhod, in the example in the main.gd file. I do not understand the origin of the "AdMob" singleton. in my game it will always happen in the same way?

Bayaola avatar Jan 21 '16 21:01 Bayaola

AdMob singleton will available on Andriod and with set

[android]
modules="org/godotengine/godot/GodotAdMob"

in engine.cfg, otherwise it will be null, you can see banner on Android device only hasn't emulation on PC device.

Mavhod avatar Jan 22 '16 03:01 Mavhod

OK, I understand the operation of your module, I would like to say thank you for the time that you give me, I understand the principle and I have compiled your module with the sources of godot1.1 because it is with this version that I am working, I don't know how to find or generate this file "godot/platform/android/java/build/outputs/apk/java-release-unsigned.apk" , I looked it up in the given directory but the directory does not exist. how can i get it please?

Bayaola avatar Jan 23 '16 17:01 Bayaola

I followed your instructions here http://www.godotengine.org/topics/4380?r=13755 when I validate the command "scons platform = android target = release", android isn't listed in my scons. There is only x 11, Windows and server selection_003

Bayaola avatar Jan 23 '16 23:01 Bayaola

If you build with Godot 1.1 you must use old version Admob module: https://github.com/Mavhod/GodotAdmob/tree/449191c5fe65e96037df53b45f7470cecf4ad985

make .apk with ant release then apk will place here: platform/android/java/bin/Godot-release-unsigned.apk

For scons command and not found android platform maybe you haven't Android SDK, NDK This guide is useful: https://github.com/godotengine/godot/wiki/compiling_android

Mavhod avatar Jan 24 '16 04:01 Mavhod

it's working now, but only in portrait orientation mode.

Bayaola avatar Jan 24 '16 11:01 Bayaola

What happen when landscape orientation?

Mavhod avatar Jan 24 '16 15:01 Mavhod

the banner disappears

Bayaola avatar Jan 24 '16 18:01 Bayaola

In a beginning it will use a few second for load ads.

Mavhod avatar Jan 24 '16 18:01 Mavhod

3 minutes and still nothing

Bayaola avatar Jan 24 '16 18:01 Bayaola

Usually if portrait work so landscape should work too, You can investigate error from Android check log tools (e.g. ddms from android-sdk/tools)

Mavhod avatar Jan 24 '16 19:01 Mavhod

Why was the above poster using scons and not gradlew.bat? Anyway I'm having trouble compiling this in 2.0.3. I have the Android platform set up (can compile the export templates). I have followed the instructions but when I run gradlew.bat build it seems the import com.google.android.gms.ads cannot be found. Thanks in advance.

:compileDebugJava
H:\dev\godot\src\godot-2.0.3-stable\platform\android\java\src\org\godotengine\godot\GodotAdMob.java:
7: error: package com.google.android.gms.ads does not exist
import com.google.android.gms.ads.*;

vjrossi avatar Jun 03 '16 06:06 vjrossi

I use Arch Linux and can build fine (scons + gradlew), with last Godot commit version and Android SDK, I'm not sure where is admob package keep, maybe you miss it?

Mavhod avatar Jun 03 '16 15:06 Mavhod

It can't work in windows. I built it with godot 2.0.3 stable. everything was fine when compiled,no error reported,but it crashed when ran in mobile phone.I have no idea how to solve this problem.

Can you upload the binary template apk, that I need not to compile by myself. easy to use ;)

guawoo avatar Jun 04 '16 07:06 guawoo

OK I fixed it, please update my commited.

Now you not need to move file GodotAdMob.java from "admob/android/" to "platform/android/java/src/org/godotengine/godot, please revert it.

Mavhod avatar Jun 04 '16 11:06 Mavhod