WebView API for Ads

330 views
Skip to first unread message

강경림

unread,
Feb 13, 2023, 11:44:02 PM2/13/23
to Google Mobile Ads SDK Developers
I want to show ads on webview of android app.
using the API, I want to load the android assets (ex. webview.html)
and inside the html, I want to show ads on certain position.
So I checked this docs about the API.
But I have some questions about it.

1. According to the docs, I can show ads inside the webview by adsense code. (inside the registered webview by inserting the ad sense code) Can you tell me how to use ad sense code inside the webview(html asset of android app) using the API? I think there's no guide about this. because it's different from the original ad sense guide (it's only for the website) and original ad mob guide. There are some difficulties to simply apply ad sense guide to webview because there's no way to register the site url (there's no site url, it's just a android asset html webview). Can you help me? and can you show me some examples or docs about this?

2. if it is possible for number 1, is it also possible to position ads inside the html webview on certain position?

3. And if I want to test the webview ads on my app. is there a test ads (not real) for this?

Mobile Ads SDK Forum Advisor

unread,
Feb 14, 2023, 4:46:39 AM2/14/23
to kyungl...@motiv-i.com, google-adm...@googlegroups.com
Hello,

I'm Teejay from Mobile Ads SDK Team. Let me do the best I can to answer your concerns. Please see my responses below.


1. According to the docs, I can show ads inside the webview by adsense code. (inside the registered webview by inserting the ad sense code) Can you tell me how to use ad sense code inside the webview(html asset of android app) using the API? I think there's no guide about this. because it's different from the original ad sense guide (it's only for the website) and original ad mob guide. There are some difficulties to simply apply ad sense guide to webview because there's no way to register the site url (there's no site url, it's just a android asset html webview). Can you help me? and can you show me some examples or docs about this?
2. if it is possible for number 1, is it also possible to position ads inside the html webview on certain position?
  • The position of the ad depends on your webview layout
3. And if I want to test the webview ads on my app. is there a test ads (not real) for this?
Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q2izuJN:ref

강경림

unread,
Feb 14, 2023, 8:21:35 PM2/14/23
to Google Mobile Ads SDK Developers
Hello, thanks for the reply.

1. According to the docs, I can show ads inside the webview by adsense code. (inside the registered webview by inserting the ad sense code) Can you tell me how to use ad sense code inside the webview(html asset of android app) using the API? I think there's no guide about this. because it's different from the original ad sense guide (it's only for the website) and original ad mob guide. There are some difficulties to simply apply ad sense guide to webview because there's no way to register the site url (there's no site url, it's just a android asset html webview). Can you help me? and can you show me some examples or docs about this?
 => I already mentioned about the website url, the webview that I use is html android asset that doesn't have valid url for this. For the approvement of Adsense, the website should be registered, but in my case there's no valid website url. I wish to have something like this as you said  (e.g www.example.com/webview-api), but I don't have one. So, is it okay if the website url is not valid if it's for webview API?

3. And if I want to test the webview ads on my app. is there a test ads (not real) for this?
=> I already tested the test url and it worked. But I'm not asking about this. The problem in my case is that I don't have my own URL. And I asked the test ads that can test inside the html code, without valid url. 

2023년 2월 14일 화요일 오후 6시 46분 39초 UTC+9에 Mobile Ads SDK Forum Advisor님이 작성:

Mobile Ads SDK Forum Advisor

unread,
Feb 15, 2023, 6:07:08 AM2/15/23
to kyungl...@motiv-i.com, google-adm...@googlegroups.com
Hello,

I'm afraid that in order for you to use the AdSense, you will need a valid domain/website which you have an access to.
Reply all
Reply to author
Forward
0 new messages