YoYoGames / GMEXT-AdMob

Repository for GameMaker's AdMob Extension
Other
9 stars 3 forks source link

The opening popup will automatically appear when making in-app purchases or logging into the Game Center. I need to be able to control it manually like before. #46

Closed searoopy closed 2 months ago

searoopy commented 6 months ago

The opening popup will automatically appear when making in-app purchases or logging into the Game Center. I need to be able to control it manually like before.

DiasFranciscoA commented 6 months ago

Hello @searoopy,

Thank you for reaching out. You can control the AppOpen Ad to suite your needs You can turn it off before a puchase or before logging into GameCenter and then turn it on again afterwards.

searoopy commented 6 months ago

It's inefficient Open ads should only appear when the app is opened and closed. but you have to do it in multiple places

searoopy commented 6 months ago

It would be nice to be able to set automatic ad popup mode and manual mode.

DiasFranciscoA commented 6 months ago

Open ads should appear:

There is no way for a user to know at runtime that the app came from the background that's why this is done automatically. In regards to the showing the ad when the user opens the game at that point you won't have a loaded ad, which means that.. you won't be able to call Show at that point.

We can add an option to the extension options to "Show On Start Up", and then if you don't want to show anymore just turn it off completely? Would that solve the issue?

Callsign54 commented 6 months ago

@DiasFranciscoA

Open ads should appear:

  • When the app returns from the background
  • When the app is first open during loading screen

There is no way for a user to know at runtime that the app came from the background that's why this is done automatically. In regards to the showing the ad when the user opens the game at that point you won't have a loaded ad, which means that.. you won't be able to call Show at that point.

We can add an option to the extension options to "Show On Start Up", and then if you don't want to show anymore just turn it off completely? Would that solve the issue?

Hi Francisco. Yes Show on Start Up would be nice. It'd also be better if we could display it through a function - that'd ensure that we wouldn't display App Open Ads for certain situations where we expect another window for app opening.

DiasFranciscoA commented 6 months ago

@Callsign54, the problem with showing it through a use of a function..is how would you know when to call the function? Users don't have a way of knowing when the application came from the background. So even if you wanted to... there would be no way of using the Show function the way it should be used.

So the question is - when would you call the show function?

The other thing is you can already turn the show off using the AdMob_AppOpenAd_Enable and the AdMob_AppOpenAd_Disable.

For example:

searoopy commented 6 months ago

[image: image.png]

if( os_is_paused() == true && global.TEST == false && os_windows != os_type ) { show_debug_message("os 멈춤 "); if( global.os_paused== false) {

    }

} else if( os_is_paused() == false) { // if(global.os_paused == true) { show_debug_message("os run... "); global.os_paused = false; } }

2024년 5월 24일 (금) 오후 6:34, DiasFranciscoA @.***>님이 작성:

@Callsign54 https://github.com/Callsign54, the problem with showing it through a use of a function..is how would you know when to call the function? Users don't have a way of knowing when the application came from the background. So even if you wanted to... there would be no way of using the Show function the way it should be used.

So the question is - when would you call the show function?

The other thing is you can already turn the show off using the AdMob_AppOpenAd_Enable https://github.com/YoYoGames/GMEXT-AdMob/wiki/app_open#admob_appopenad_enable and the AdMob_AppOpenAd_Disable https://github.com/YoYoGames/GMEXT-AdMob/wiki/app_open#admob_appopenad_disable .

For example:

  • You are logging in disable AppOpenAd
  • After login is finished turn it back on
  • When the user starts a purchase disable AppOpenAd
  • After the purchase is finished or cancelled turn it back on

— Reply to this email directly, view it on GitHub https://github.com/YoYoGames/GMEXT-AdMob/issues/46#issuecomment-2129076595, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXCQTGFNMTYAZTZHQ2Q3WDZD4CT3AVCNFSM6AAAAABHFZNPCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGA3TMNJZGU . You are receiving this because you were mentioned.Message ID: @.***>

-- GuRis (game dev studio) Lee sanghyun (ceo,dev) homepage : Guris (webflow.io) https://guris-game.webflow.io/ mobile : +821032796789

searoopy commented 6 months ago

[image: image.png]

if(async_load[?"event_type"] == "onResume")
{
if(!AdMob_IsShowingAd())
//if(!AdMob_AppOpenAd_IsEnabled())
{
if( room != r_ingame_intro && room != r_cutscene  && room != r_init_loading
&& room != r_gamesystem_init  )
{
if( global.iap_reopen_ads <= 0 && global.playtime >= 300 )
{
if( instance_exists(o_popup_base)== false)
{
if( instance_exists(o_wait) == false)
{
//AdMob_AppOpenAd_Show();
//admob_app
//AdMob_AppOpenAd_Enable(display_portrait);
//with(o_Admob)
//{
// event_user(2);
//}
//show_message_async("openads_popup");
//AdMob_AppOpenAd_Show();
//admob_appo
if( instance_exists(o_wait) == false)
AdMob_AppOpenAd_Show();

.........

2024년 5월 25일 (토) 오후 1:39, GuRis GuRis @.***>님이 작성:

[image: image.png]

if( os_is_paused() == true && global.TEST == false && os_windows != os_type ) { show_debug_message("os 멈춤 "); if( global.os_paused== false) {

    }

} else if( os_is_paused() == false) { // if(global.os_paused == true) { show_debug_message("os run... "); global.os_paused = false; } }

2024년 5월 24일 (금) 오후 6:34, DiasFranciscoA @.***>님이 작성:

@Callsign54 https://github.com/Callsign54, the problem with showing it through a use of a function..is how would you know when to call the function? Users don't have a way of knowing when the application came from the background. So even if you wanted to... there would be no way of using the Show function the way it should be used.

So the question is - when would you call the show function?

The other thing is you can already turn the show off using the AdMob_AppOpenAd_Enable https://github.com/YoYoGames/GMEXT-AdMob/wiki/app_open#admob_appopenad_enable and the AdMob_AppOpenAd_Disable https://github.com/YoYoGames/GMEXT-AdMob/wiki/app_open#admob_appopenad_disable .

For example:

  • You are logging in disable AppOpenAd
  • After login is finished turn it back on
  • When the user starts a purchase disable AppOpenAd
  • After the purchase is finished or cancelled turn it back on

— Reply to this email directly, view it on GitHub https://github.com/YoYoGames/GMEXT-AdMob/issues/46#issuecomment-2129076595, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXCQTGFNMTYAZTZHQ2Q3WDZD4CT3AVCNFSM6AAAAABHFZNPCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGA3TMNJZGU . You are receiving this because you were mentioned.Message ID: @.***>

-- GuRis (game dev studio) Lee sanghyun (ceo,dev) homepage : Guris (webflow.io) https://guris-game.webflow.io/ mobile : +821032796789

-- GuRis (game dev studio) Lee sanghyun (ceo,dev) homepage : Guris (webflow.io) https://guris-game.webflow.io/ mobile : +821032796789

DiasFranciscoA commented 5 months ago

This can be achieved by doing the following:

Before login in to GameCenter

AdMob_AppOpenAd_Disable();
if (!GameCenter_LocalPlayer_Authenticate()) {
    // There was a problem enable right away
    AdMob_AppOpenAd_Enable(orientation);     
}

After login is finished (async event)

switch(async_load[?"type"])
{
    // @triggered by GameCenter_LocalPlayer_Authenticate()
    case "GameCenter_Authenticate":
        AdMob_AppOpenAd_Enable(orientation); 
        break;
}

Before starting a purchase

AdMob_AppOpenAd_Disable();
if (iap_PurchaseProduct(productId) != iap_no_error) {
    // There was a problem enable right away
    AdMob_AppOpenAd_Enable(orientation);
}

After the purchase is finished (async event)

switch(async_load[? "id"])
{   
    // @triggered by iap_PurchaseProduct()
    case iap_payment_queue_update:
        AdMob_AppOpenAd_Enable(orientation); 
        break;
shaharOssy commented 3 months ago

Still, my problem is: each time I disable and then enable with AdMob_AppOpenAd_Enable, it sends a new request which then should be proccessed in the async, and it really interferes the app, causing a lag.

It should only control if the add will show or not. not re-request it............