Admob on Android creates a WebView even when using Native Ads

186 views
Skip to first unread message

Dimezis

unread,
Jun 10, 2022, 12:18:47 PM6/10/22
to Google Mobile Ads SDK Developers
Admob Android version 21.0.0
I'm using Admob only for Native Ads, no Banner ads or anything like that:

AdLoader.Builder(context, id)
.forNativeAd
// Handling an ad here
}
.withNativeAdOptions(NativeAdOptions.Builder().build())
.build()
loadAd(AdRequest.Builder().build())

However, when the ad is loaded, Admob creates and initializes a WebView internally, even though it's not used.
The WebView takes a significant time to initialize and it affects the start time of my app.
I have discovered this during app profiling and can send you a stacktrace of the WebView initialization (however most of the classes there are obfuscated there).


Could you please explain why does Admob need to create a WebView for Native Ads?

Mobile Ads SDK Forum Advisor

unread,
Jun 13, 2022, 9:51:21 AM6/13/22
to dmitry...@gmail.com, google-adm...@googlegroups.com

Hi Dimezis,

Thank you for reaching out to us.

Before we can provide context with regard to your question, can you provide us privately the following details below so that we can further look into this? Just kindly follow the guide below on where you can submit the following requested details.

  • Sample app project
  • Steps to replicate
  • Video recording of the app profiling
  • Screen recording of the behavior of the application

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=5004Q00002b6axLQAQ&entry.80707362=00110630
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.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2b6axL:ref
Message has been deleted
Message has been deleted

Mobile Ads SDK Forum Advisor

unread,
Jul 12, 2022, 10:37:46 AM7/12/22
to dmitry...@gmail.com, google-adm...@googlegroups.com

Hi Dimezis,

Thank you for your response.

Upon checking the file you provided, we currently encountering an error when opening the file. With that, can you provide us again that file and the following details below privately? You can provide it to the link below.

Dimezis

unread,
Jul 12, 2022, 2:44:42 PM7/12/22
to Google Mobile Ads SDK Developers
I just uploaded the new trace and a screenshot.
But you could just open the sample project I sent and capture the trace yourself 

So we avoid this back and forth

Mobile Ads SDK Forum Advisor

unread,
Jul 13, 2022, 10:21:56 AM7/13/22
to dmitry...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for your response.

I've checked our Sample App Android for native ads, but I'm unable to replicate it in my end. With that, can you provide us the steps you did to capture this? Also, can you provide us other file format for your file, as we can't open the file you provided in our end.  You can provide it the link below.

Dimezis

unread,
Jul 17, 2022, 7:04:37 AM7/17/22
to Google Mobile Ads SDK Developers
1) Open the project in Android Studio
2) Open "Edit Configurations"
3) Open "Profiling" tab and check "Start this recording on startup
4) Click "Profile `app`" to launch the app and profiler at the same time
5) After the ad is loaded, stop the profiling and examine the trace
6) See the WebView being created 

Mobile Ads SDK Forum Advisor

unread,
Jul 18, 2022, 3:52:39 AM7/18/22
to dmitry...@gmail.com, google-adm...@googlegroups.com

Hi Dimezis,

Thank you for your response.

Upon checking our sample app, I've experienced an error when testing our test ad unit id. With that, let me share this to the rest of the team to further investigate. Rest assured that one of our team will reach out to you.

Mobile Ads SDK Forum Advisor

unread,
Jul 18, 2022, 4:05:55 PM7/18/22
to dmitry...@gmail.com, google-adm...@googlegroups.com

Hi Dimezis,

 

My name is Nick and I will be looking into the use of Webview when initializing Native Ads on Android. Thank you for your error report, I will look into the issue and report back to you shortly.

 

Thanks, Nick



ref:_00D1U1174p._5004Q2b6axL:ref

Mobile Ads SDK Forum Advisor

unread,
Oct 26, 2022, 5:24:35 PM10/26/22
to dmitry...@gmail.com, google-adm...@googlegroups.com

Hi,

 

GMA SDK initialize webview either during the 1st ad request or the 1st MobileAds.initialize() call.

Let me know if the pub have any further questions.

Nick



ref:_00D1U1174p._5004Q2b6axL:ref
Reply all
Reply to author
Forward
0 new messages