poingstudios / godot-admob-plugin

This repository is for Godot's Addons to integrate natively AdMob to your Game Project without much configurations and directly inside Godot Editor!
https://poingstudios.github.io/godot-admob-plugin/
MIT License
334 stars 25 forks source link

Enable calling show() from a thread #99

Closed BimDav closed 11 months ago

BimDav commented 1 year ago

Is your feature request related to a problem? If so, please describe.

Right now calling show_rewarded_interstial() from a thread yields:

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIViewController view]
PID: 72745, TID: 6864192, Thread name: show_rewarded_interstitial, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   A Good Day                          0x0000000102391af8 _ZN8OSIPhone12on_focus_outEv + 100
5   A Good Day                          0x000000010357cd20 _ZN6Object4callERK10StringNamePPK7VariantiRNS3_9CallErrorE + 136
6   libsystem_pthread.dylib             0x00000001046c3a78 thread_start + 8
2023-08-30 19:05:17.924400+0200 A Good Day[72745:6864192] [reports] Main Thread Checker: UI API called on a background thread: -[UIViewController view]
PID: 72745, TID: 6864192, Thread name: show_rewarded_interstitial, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   A Good Day                          0x0000000102391af8 _ZN8OSIPhone12on_focus_outEv + 100
5   A Good Day                          0x000000010357cd20 _ZN6Object4callERK10StringNamePPK7VariantiRNS3_9CallErrorE + 136
6   libsystem_pthread.dylib             0x00000001046c3a78 thread_start + 8
******** stop animation!
2023-08-30 19:05:18.289488+0200 A Good Day[72745:6862258] rewardedAd:didFailToPresentWithError

What feature or improvement would you like to see?

It would be great to be able to load an ad during a load time, for example. It should apparently be possible using admob to do this. Any ideas? If guided I could probably do the implementation myself.

Additional context

No response

gumaciel commented 1 year ago

Hi @BimDav, sorry but can you detail more about this feature? I think this is not possible to do right now

Will this be for Android and iOS? Or just one platform?

BimDav commented 1 year ago

It would be for both platforms: let the game run normally, just behind the ad. For example a loading could continue behind the app, or a connection to a socket could stay alive while the ad is running

gumaciel commented 1 year ago

I don't know if there's a way, because as far as I know the ads are loaded in the UI thread, the AdMob documentation doesn't say anything about this:

https://developers.google.com/admob/android/quick-start https://developers.google.com/admob/ios/quick-start

gumaciel commented 1 year ago

@BimDav can this attend your request?

https://github.com/Poing-Studios/godot-admob-ios/issues/70

gumaciel commented 11 months ago

@BimDav Done at:

https://github.com/Poing-Studios/godot-admob-ios/releases/tag/v3.1.0 https://github.com/Poing-Studios/godot-admob-plugin/releases/tag/v3.1.0

please test it