-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for app open ads #44
Conversation
The problem with the current solution is that it doesn't hook in before the DefoldActivity is shown the first time. Once the app is running and put in the background and then back to the foreground it works though. In order to also show an add on app start we also need to extend the Application class (https://developers.google.com/admob/android/app-open#extend) Note: A small Defold game that loads quickly would really not benefit from delaying gameplay while waiting for an ad to load and then show it. You can of course load the ad and then show it anyway even if the DefoldActivity has started and the engine has rendered for a second or two. Thought: What if we don't do all of this stuff automatically in the extension and instead do it from Lua in window.set_listener() when we get a window.WINDOW_EVENT_FOCUS_GAINED event? And have an admob.load_appopen() and admob.show_appopen()? |
I think it's possible to avoid:
public static void AdMob_OnCreate(final Activity appActivity) {
// your OnCreate logic here
} It should work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android can't be compiled, it seems like wrong function used.
Should it be shown on iOS right after I run app? Because now it's shown only when I lock unclock phone
Let me have a look! |
Ok, it works now. |
Great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is great addition!!!
Fixes #23