App Open Ads problem

67 views
Skip to first unread message

SF

unread,
Jun 23, 2024, 2:02:07 PM (6 days ago) Jun 23
to Google Mobile Ads SDK Developers
I have an application that starts an external alarm clock application, so naturally my application goes into the background and then comes back.
The system evaluates it as a return from the background, not as navigation, and therefore starts open ads.
It is according to the rules for app open ads, but nevertheless I received a warning for violating the rules - navigation.
It is similar when starting other internal applications, such as screensaver setting e.t.c.
How should I change the settings in MyApplication so that this does not happen? Alternatively, can you explain to your controller, that the application is starting from the background in this case?

Mobile Ads SDK Forum Advisor

unread,
Jun 24, 2024, 6:46:17 AM (5 days ago) Jun 24
to slavo....@gmail.com, google-adm...@googlegroups.com
Hi,

Thank you for contacting us.

LifecycleObserver is used to detect the app state. Hence by applying boolean flags to the code snippet I'm able to show the ad only at the app open. Similarly your use case shall be achievable by using Flags. 


private boolean isAdShown = false;
private void loadAd(Context context) {
  // Do not load ad if there is an unused ad or one is already loading.

  if (isLoadingAd || isAdAvailable() || isAdShown) {
    return;
  }
public void onShowAdComplete() {
  // Empty because the user will go back to the activity that shows the ad.
  isAdShown = true;
  Log.d("isAdShown", String.valueOf(isAdShown));
}
The above code snippet is an example implementation and might be useful in your usecase.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJRYg:ref" (ADR-00243490)

Thanks,
 
Google Logo Mobile Ads SDK Team

 

Mobile Ads SDK Forum Advisor

unread,
Jun 24, 2024, 7:01:30 AM (5 days ago) Jun 24
to slavo....@gmail.com, google-adm...@googlegroups.com
Hi,

I have mistakenly provided the suggestion for android, but the same strategy might be helpful for IOS as well. Kindly provide a sample project which is replicating the issue for further investigation.

Kindly check Show the ad during app foregrounding events article for further assistance.
 

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002tJRYgQAO&entry.80707362=00243490

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Mobile Ads SDK Forum Advisor

unread,
Jun 25, 2024, 6:56:06 AM (4 days ago) Jun 25
to slavo....@gmail.com, google-adm...@googlegroups.com
Hi Slavomir,

I don't see any issue with the files you have sent, Kindly send us the warning screenshot and policy centre violation screenshot which you have observed as we are unable to see any issues in your policy centre.

Kindly refer App open ad guidance and best practices article for further understanding on app open ad implementations. 

Mobile Ads SDK Forum Advisor

unread,
Jun 25, 2024, 4:56:58 PM (4 days ago) Jun 25
to slavo....@gmail.com, google-adm...@googlegroups.com

Hi Ing. Slavomir Fabian

Thank you for getting back to us.

  • When you use startActivity(mClockIntent) with the AlarmClock.ACTION_SHOW_ALARMS intent, it launches the default clock app, not an activity within your own application.
  • In the application perspective, navigation sees this as a user navigating away from your app (since the clock app isn't part of yours).
  • LifecycleObserver, however, focuses on the lifecycle of your app itself. Launching another app sends your app to the background, triggering the "start from background" event.

Can you please confirm whether the issue still exists in your AdMob account and is replicating in the Google AppOpen sample? If yes, kindly provide us with the below information privately for further investigation so that we can debug from our end and provide a solution:

  • app ID
  • ad unit ID
  • Video recording of the navigation behavior.
  • Sample project replicating 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.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002tJRYgQAO&entry.80707362=00243490

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link. 

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


Thanks,
 
Google Logo Mobile Ads SDK Team


Mobile Ads SDK Forum Advisor

unread,
Jun 26, 2024, 5:47:19 AM (3 days ago) Jun 26
to slavo....@gmail.com, google-adm...@googlegroups.com
Hi Ing. Slavomir Fabian,

The mentioned issue is not visible in your AdMob policy centre. Kindly get back to us on this email thread if the issue is reflecting in policy centre.

shaymaa Dyaa

unread,
Jun 26, 2024, 4:24:37 PM (3 days ago) Jun 26
to mobile...@forumsupport.google, slavo....@gmail.com, google-adm...@googlegroups.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/h1yWc000000000000000000000000000000000000000000000SFOLTO00sTAIi-WYSq-7Y8nHdfdg4w%40sfdc.net.

SF

unread,
Jun 27, 2024, 12:30:55 PM (2 days ago) Jun 27
to Google Mobile Ads SDK Developers
from my logs:
The absolute same situation, but different results from AppOpenAdManager - 1. and 2. OK not breaking rules, next 3. not OK - breaking rules because open ad should not be displayed now

2024-06-27 17:31:30.863 25997-25997 E/MyApplication: ShowAdifAvailable onStart
2024-06-27 17:31:30.863 25997-25997 E/AppOpenAdManager: Will show ad.
2024-06-27 17:31:31.051 25997-25997 E/AppOpenAdManager: onAdFailedToShowFullScreenContent: The ad can not be shown when app is not in foreground.
2024-06-27 17:31:32.131 25997-25997 E/AppOpenAdManager: onAdLoaded.

2024-06-27 17:31:39.342 25997-25997 E/MyApplication: ShowAdifAvailable onStart
2024-06-27 17:31:39.342 25997-25997 E/AppOpenAdManager: Will show ad.
2024-06-27 17:31:39.517 25997-25997 E/AppOpenAdManager: onAdFailedToShowFullScreenContent: The ad can not be shown when app is not in foreground.
2024-06-27 17:31:40.803 25997-25997 E/AppOpenAdManager: onAdLoaded.

2024-06-27 17:31:46.715 25997-25997 E/MyApplication: ShowAdifAvailable onStart
2024-06-27 17:31:46.716 25997-25997 E/AppOpenAdManager: Will show ad.
2024-06-27 17:31:46.958 25997-25997 E/AppOpenAdManager: onAdShowedFullScreenContent.
2024-06-27 17:32:43.129 25997-25997 E/AppOpenAdManager: onAdDismissedFullScreenContent.
2024-06-27 17:32:44.249 25997-25997 E/AppOpenAdManager: onAdLoaded.

Mobile Ads SDK Forum Advisor

unread,
Jun 27, 2024, 2:06:29 PM (2 days ago) Jun 27
to slavo....@gmail.com, google-adm...@googlegroups.com

Hi

Thank you for getting back to us.

I will check with our team regarding your query and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated. 

Reply all
Reply to author
Forward
0 new messages