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
AdMob banner ads not showing after app pause/resume #2970
Comments
I am also facing the same issue |
Same issue ,Loots of bugs in new SDK after updating SDK from 7... to 8.5.2 |
same issue |
Admob is turning into trash day by day.... |
@NVentimiglia is there an update or workaround for this issue? Thanks! |
I figured out (I think) how to implement the workaround from #1342 (comment) However, the behavior did not change. Banners still disappear after an app pause/resume (eg locking the screen and returning, or switching to another app and then back). If anybody wants to try by themselves, here's what I did:
Hopefully somebody can figure out how to take it from here... |
Thanks for your patience, I was out. First, what are the replication steps for this issue. Here is what I tried 👍
When doing this, the banner ad showed as expected. Second, The android custom activity is a pretty complicated fix. I could try pushing for a fix using |
We have the same issue, but we are not using the Unity AdmobSDK. Rather we use our own implementation. I have some findings to share. I tested it on a Pixel (OS 13) and I noticed that if you hit home and return to the app from the device's "task manager" the app behaves normally. |
@IoannisFMG if you have specific replication steps I can take another look. |
@NVentimiglia, I'll see if I can reproduce it in a simple test project and I'll let you know. Unfortunately, I can't share company code. |
Ok. I got the same behaviour with the example in this repo.
The screen recording is from a Pixel 6a, Android 13. The reproduction plan is simple.
The project is using I should mention again that this doesn't seem to be a problem with the SDK per se. I'm leaning towards it being a Unity issue. |
same issue |
@IoannisFMG Thanks for your efforts! Did you submit a Unity bug? |
Not yet, because I don't know if this thing needs to be a common effort between the Admob Team and Unity. I don't know if Unity will be able to handle this without having some insight on what is not being called, or what is called and shouldn't be etc. They probably don't have access to the Admob SDK source. The same goes with the Admob team which might not have access to the Unity source code. My company's plan doesn't have Unity source access either, so I can't dive into that code either. I could create a ticket if @NVentimiglia has no idea why the issue happens. |
Downgrading from Unity 2022.3.10 to 2022.3.6 fixes the problem for us. |
Thank you @emathis11 , that worked for me as well! I will submit a bug to Unity. @IoannisFMG, may I submit the files you provided to reproduce the bug? (Alternatively, do you want to submit the bug?) |
The same problem occurs. Is there a solution? |
What do you mean? Did you try to downgrade to 2022.3.6, as suggested above? Did that not work? |
Bro, I have been using 2021.3.21f1 for the last 7 months, and when upgraded to 8.5.2 I faced the same issue. |
I think it's not an editor bug |
Yes, @faustob, I will submit one now. I'll share the link once it's public. |
downgrade is not possible due to other issues. is there no solution in 2022.3.12f1? |
The attached video did not download / work. I am still unable to replicate the issue. If you have a sample video and sample code, submit it to The google support group. |
@NVentimiglia FYI - First time I tried to download I missed that I had to "Accept terms and conditions" on the page to access the file. |
Ty for your feedback, I will talk with that team to see if we can streamline file uploading. |
Internal bug id for reference b/308855324 The fact that Unity pushes the banner behind the game is a problem worth looking into. |
I meant to say that I had that problem when trying to download the files created by @IoannisFMG from this link. He included a video as well as sample code to replicate the issue. Thought you may have had the same issue. Sorry for the confusion. |
Hey bros, In the mean time what is a work around solution here. Down grade Unity to a particular version? |
The only "workaround" I came up with is to create a new banner every time the app unpauses. I'm NOT SURE if it's a violation of AdMob policy, as it probably counts as a separate banner show
Banner code: (its a Singleton)
I think of implementing some sort of timer (of 1 minute for example) so the user can't spam minimize/maximize app, to make it a bit safer EDIT: Not worth the headache, downgrading to Unity 2022.3.6 (2022.3.0 in my case) is the best solution imo, as it fixes the issue completely |
For me all it took was downgrading to Unity 2022.3.6, as suggested above (newer versions have the issue.) That version has an issue compiling for iOS, so I now switch between the two version to build for Android and iOS :( |
@IoannisFMG any update on bug submission? Thanks! |
Unfortunately no updates, @faustob. The ticket I submitted is still open. They haven't even looked at it, yet. |
Same problem here... But Unity version 2021.3.32. My workaround was downgrading to Unity 2021.3.29. It seems that the problem arose as a side effect of this fix that was made in both Unity 2021.3.30 and 2022.3.6: "Android: Fixed an issue where pause was not processed when onPause() is called right after onResume() is called. (UUM-23247)" |
By the way, the Incident number I reported is |
Closing this issue. Please reopen if Unity gets back to you and has next steps for us. |
Happening in Unity 2022.3.12 too. |
Happening in Unity 2022.3.13 and 2022.3.14. |
Yesterday, they put the issue I submitted in Review. I'll keep you posted. |
The bug has been confirmed and it has been forwarded to Unity's dev team. I'll post any updated I receive here. |
Hi everyone! |
I'm having the same problem here, apparently different people are having it. But I already saw that they opened a ticket, let's wait. Or does anyone already have a solution? |
I downgrade Unity form 2022.3.14f1 LTS to 2022.3.6f1 LTS and issue solved. |
Given that the "New Consent Management Platform requirements" take effect January 16, 2024. It would seem critical to get a fix out asap so people have a chance of doing a release before then. With such a important deadline imposed by Google it seems kind of strange to just 'close' this very real issue and take a lets wait and see attitude to the problem. Ignoring the fact that lots of apps have been forced to do a update around this time to make it in time for the deadline. This really would be the time to take the issue seriously and contact Unity directly to get the critical issue fixed before their next LTS releases. |
@NVentimiglia given the upcoming deadline imposed by google that requires apps to be updated before Jan16, would it not make sense to take charge of this and work with unity to solve this asap so all the Unity apps can be updated in time? |
A fix is probably coming soon to an Editor version near you. |
Under Consideration for 2021.3.X, 2024.1.X Fixed in 2022.3.16f1, 2023.3.0a19 In Progress in 2023.2.X Waiting for 2022.3.16f1 to be released... |
2022.3.16f1 was released and based on my initial testing the bug is finally fixed. As far as other editor versions, current state is: Under Consideration for 2021.3.X, 2024.1.X |
I upgrated unity to 2021.3.36f1 and now it fixed |
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Banner ads show correctly at app start, and as long as the app stays in focus. If users switch to a different app, or the phone locks, on app resume the banner ads are no longer visible. This only happens on Android, the same app on iOS works fine. It happens in both development and release builds.
@NVentimiglia , I see your workaround here, but I am not sure how to implement it. I tried creating a Unity plugin following https://docs.unity3d.com/Manual/android-custom-activity.html, but could not get it to work.
Is the workaround still valid?
Can you provide instructions?
Is this bug being addressed?
[ FYI, I have also posted this issue as a comment to the previous (closed) thread ]
Steps to reproduce:
Happy to provide logs or other info, just not sure what would help.
Are others seeing this behavior?
Relevant Code:
The text was updated successfully, but these errors were encountered: