Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

AppOpen ad moves Unity app to Background

205 views
Skip to first unread message

Yarden Raveh

unread,
Sep 8, 2024, 6:25:42 AM9/8/24
to Google Mobile Ads SDK Developers
Hi,
I am trying to implement AppOpen ads in the loading screen of my Unity app (Cold Start), the ad is displayed just fine however by showing the ad the state of the app is updated to Background. We expected the app to stay in the Foreground. We are attempting  to show the AppOpen ad in the loading screen to allow the app to continue loading while the ad is displayed.

Unity Version : 2022.3.29f1.
GoogleMobileAds for Unity: 9.2.0

Tried the following:
  • make sure Application.runInBackhround is set to true
  • update unity to latest 2022 LTS
  • update dependency manager and packages to latest version
  • run admob in an empty Unity proejct

The issue persisted in all of the attempts above.

Mobile Ads SDK Forum Advisor

unread,
Sep 9, 2024, 8:10:52 AM9/9/24
to yar...@muuula.com, google-adm...@googlegroups.com

Hi Yarden,

Thank you for contacting the Mobile Ads SDK support team. 

Let's deep dive a little more since your tryouts didn’t work to find out the root cause of the issue when and why the app is getting into the background state. Use the AppStateEventNotifier to listen to application foreground and background events. This class will raise the AppStateChanged event whenever the application foregrounds or backgrounds.

private void Awake()
{
    // Use the AppStateEventNotifier to listen to application open/close events.
    // This is used to launch the loaded ad when we open the app.
    AppStateEventNotifier.AppStateChanged += OnAppStateChanged;
}

Can you confirm whether the mentioned issue is occurring with the Google HelloWorld example project which is a minimal implementation of all ad formats? If yes, kindly share the below details privately for further investigation:

  • app ID
  • ad unit ID
  • Any particular device to test on
  • Steps to reproduce or video recording of the issue
  • Sample project reproducing the issue if possible.

You can provide the following details via reply privately to the author option or directly provide it to the link below.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vFucL:ref" (ADR-00267201)

Thanks,
 
Google Logo Mobile Ads SDK Team


Yarden Raveh

unread,
Sep 10, 2024, 9:48:02 AM9/10/24
to Google Mobile Ads SDK Developers
Hi,
Thank you for the response. Yes we have tested the AppStateChanged event and the HelloWorld example, in both cases the issue persists. I have found a related Unity Issue https://issuetracker.unity3d.com/issues/android-onapplicationpause-is-triggered-when-an-activity-window-is-being-opened-or-closed
It seems the ad opens a new activity and that triggers OnPause and the AppStateChanged event. Is this correct? and if so what do you reccomend from your side?

Kind Regards,
      Yarden Raveh

Mobile Ads SDK Forum Advisor

unread,
Sep 10, 2024, 1:31:28 PM9/10/24
to yar...@muuula.com, google-adm...@googlegroups.com
Hi Yarden Raveh,

Thank you for getting back to us.

The Unity issue URL that you have sent is an general issue from Unity on android devices but not specific to GMA SDK. However, I ran the app again and the mentioned issue is reproducible. Having said that I'll raise this concern to my team members and update you accordingly. Meanwhile your patience is highly appreciated.

Yarden Raveh

unread,
Sep 12, 2024, 8:38:02 AM9/12/24
to Google Mobile Ads SDK Developers
Thank you,
Just please notice that the issue linked above does referto GMA specifically (read the content), also i will appreciate any update on the isse you can give.

Kind Regards,
     Yarden Raveh

Mobile Ads SDK Forum Advisor

unread,
Sep 12, 2024, 1:14:23 PM9/12/24
to yar...@muuula.com, google-adm...@googlegroups.com
Hi Yarden Raveh,

As stated earlier, this concern is raised to the team members, It is currently being investigated. So I'll update you once I have an update. Meanwhile your patience is highly appreciated.

Mobile Ads SDK Forum Advisor

unread,
Sep 18, 2024, 8:04:23 AM9/18/24
to yar...@muuula.com, google-adm...@googlegroups.com
Hi,

This behavior is dependent on Unity editor settings. There is a setting in "Edit → Project Settings → Player" and also this relevant documentation which mentions By default, this is set to false and the application pauses when it is in the background.
Thanks

Yarden Raveh

unread,
Sep 23, 2024, 8:46:56 AM9/23/24
to Google Mobile Ads SDK Developers
Hi,
This setting does not exist in the Project Settings and if you will look at my original post you will see that we already tried to set it on runtime via code as per the documentation link you provided.

Mobile Ads SDK Forum Advisor

unread,
Sep 23, 2024, 3:32:01 PM9/23/24
to yar...@muuula.com, google-adm...@googlegroups.com
Hi Yarden Raveh,

I will check with our team regarding this project settings and one of my team members will reach out to you once we have an update. 

Yarden Raveh

unread,
Sep 30, 2024, 9:53:16 AM9/30/24
to Google Mobile Ads SDK Developers
Hi,
Is there any update? Where you able to replicate the issue with Application.runInBackground = true?

With Regards,
       Yarden Raveh

Mobile Ads SDK Forum Advisor

unread,
Sep 30, 2024, 11:15:35 AM9/30/24
to yar...@muuula.com, google-adm...@googlegroups.com

Hi Yarden Raveh,

Our team is investigating your issue. One of our teammates will contact you once we have an update on this. Meanwhile your patiences is appreciated.

mai mohamed

unread,
Oct 9, 2024, 10:24:19 AM10/9/24
to Yarden Raveh, Google Mobile Ads SDK Developers

غير معروف


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/3ae7aa30-de72-42c6-b3cd-62c1d9955575n%40googlegroups.com.

Yarden Raveh

unread,
Oct 13, 2024, 8:43:52 AM10/13/24
to Google Mobile Ads SDK Developers
Again, any updates? i also experimented with different launchModes in android manifest. It didn't help as well.

Mobile Ads SDK Forum Advisor

unread,
Oct 14, 2024, 4:40:52 AM10/14/24
to yar...@muuula.com, google-adm...@googlegroups.com
Hi Yarden Raveh,

Thank you for getting back to us.

Our team has decided that this is an intended behavior. As stated earlier this behavior is dependent on Unity editor settings. There is a setting in "Edit → Project Settings → Player" and also this relevant documentation.

Tech Fast

unread,
Oct 14, 2024, 8:53:56 AM10/14/24
to Yarden Raveh, Google Mobile Ads SDK Developers
Dear sir,
Hope this email finds you well. My name is Aftab Alam Raeen, this is my Publisher ID: pub-9345401370734326 and I have been connected with Google AdSense with authenticity, good standard for the last 8 years.

We don't know how to explain to continue with adsense. Last week such a shocking news for us and the message was your adsense account has been disabled. There was mentioned many reasons for disabled which we have never violated till date because I'm connected with adsense account with good standard last 8 year's. We approved adsense account in 2016 (domain age: 8 years) as you can check attached screenshot.

Our traffic source breakthrough Around 80-85% of our blog traffic comes directly from Google Search (organic), 5-10% social, 2-3% refers and 3-7% others as you can check attached traffic analysis screenshot rather this organic traffic we have got not for tricks, This is my experience of 8 years and we know about google Adsense policy guidelines and we respect it. 
we have always taken pride in being confident contributors to Google's ecosystem with quality content.

We never wanted to violence google Adsense guidelines, I don't think so. If your ecosystem effected for some reason then please let me know about effected place on my website. We will fix all effected pages. So please review my adsense account and we respectfully request you to review this decision and reactivate my account to continue with google again as before. 

In my account, we received funds for the month of August, but after these happened, my revenue were deducted for policy violations.  Try to get back deducted revenue in my Adsense account if it possible.

Please help us get back on track. Your response is the only hope for all of us. Thank you for your time and consideration, and I sincerely hope for a positive resolution.

Sincerely,
Aftab

Name: Aftab Alam Raeen
Publisher ID: pub-9345401370734326
Website: hogatoga.com

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.

Yarden Raveh

unread,
Oct 22, 2024, 9:54:30 AM10/22/24
to Google Mobile Ads SDK Developers
This answer is absurd, according to the best pratices stated in google's own documentation, we should be able to load our game in the background WHILE AppOpen is displayed. This is not possible if AppOpen PAUSES the game.

Application.runInBackground is enabled as has been stated in this thread MANY times. It does not help.

Stop giving canned answers and please make some effort to actually solve it.

Mobile Ads SDK Forum Advisor

unread,
Oct 23, 2024, 6:29:12 PM10/23/24
to yar...@muuula.com, google-adm...@googlegroups.com
Hi,

Google Mobile Ads has no control over the Unity APIs including Application.runInBackground. I have double checked our code and verified that we do not manually or force application pause when the ad activity is presented, so if run in background is not working as expected it may be a Unit bug. I have raised this issue with the Unity SDK team.

Loading a game is still possible and the unity documentation suggests background services or async scene loading, have you tried these?

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vFucL:ref" (ADR-00267201)

Thanks,
 
Google Logo
Nicholas Ventimiglia
Mobile Ads SDK Team


Rj

unread,
Oct 24, 2024, 4:38:51 PM10/24/24
to Google Mobile Ads SDK Developers
Isn't this the default Android behavior? It has nothing to do with unity I guess. When app open ad is displayed, the activity beneath it will be paused. You need to ensure that the loading process continues independently of the activity lifecycle. Use a  background service/runnable to continue the loading process while the ad is displayed and when ad is dismissed, show user the intended result
Reply all
Reply to author
Forward
0 new messages