How to test admob In-app purchase(IAP) house ad on my phone?

173 views
Skip to first unread message

zhuhai...@126.com

unread,
Dec 19, 2015, 3:35:47 AM12/19/15
to Google Mobile Ads SDK Developers
I have a problem when trying to test admob IAP house ad on my device.
Basically I just followed this link:

This is what I did:
1. implement PlayStorePurchaseListener
2. change the AdUnitId to "ca-app-pub-2412876219430673/6669260544"
3. change the package name to "admob.demo.iap.defaultpurchase"
4. compile and run

Then everytime I load & display this interstitial, I just got a common ad, instead of an IAP house ad as I wanted.

I guess I don't have to login Google using a Google account first?
Because the link suggests that this particular AdUnitId & package name is meant to solve the problem that 
"IAP house ads will only show to users who are likely-to-pay".

So can anyone help me out?

Veer Arjun Busani

unread,
Dec 21, 2015, 1:58:48 PM12/21/15
to Google Mobile Ads SDK Developers
Hi there,

The guide that you have mentioned is a perfect example on how to implement test In-app purchase(IAP) house ads. Once you have implemented PlayStorePurchaseListener, you would be able to view test ads on your device. Note that In-app purchase(IAP) house ads would only appear on device and not on simulators. 

For your convenience, I have attached a sample project that you would be able run on your device. Do ensure that you are using the latest Google Play Services and Google Play Billing Library. I have used the same test AdUnitId to "ca-app-pub-2412876219430673/6669260544". If you are still unable to view test ads, do get back to us and we would be happy to help you further with the implementation.

Sample IAP Project: Download here.

Thanks,
Veer Arjun Busani
Mobile Ads SDK Team

邝思豪

unread,
Dec 28, 2015, 10:39:47 AM12/28/15
to Google Mobile Ads SDK Developers
Hello Veer, thanks very much for your detail reply. 
But still I CANNOT get an IAP house ad, after I simply build & run your code.
Does Google account area matters?
I registerred a new Google account on my phone(Huawei X1, I'm in China mainland), via a HongKong VPN.
and I'm pretty sure GooglePlay thinks that I'm an HongKong user,
Because after I logged in & open GooglePlay Store, it's showing me words in Traditional Chinese characters(used in HK),
not Simplified Chinese characters(used in China mainland).

Veer Arjun Busani

unread,
Dec 28, 2015, 12:08:22 PM12/28/15
to Google Mobile Ads SDK Developers
Hi there,

You must be able to build and see the test ads using that Ad Unit ID - "ca-app-pub-2412876219430673/6669260544". I do have couple of questions - 
  • Are you testing it on an actual device or on a simulator. IAP ads are only displayed on an actual device.
  • Are you using a live Ad Unit ID? If so, you would not be able to receive any IAP ads as these ads are only served to users who are likely to pay. This might be limited and you may never see them on your test device. I would also suggest you to run using our test Ad Unit ID and see if you are able to receive IAP ads.
As of May-21-2014, AdMob is available in China along with these countries so I don't see any reason on why you would not be able to receive Ads.  

zhuhai...@126.com

unread,
Jan 6, 2016, 5:43:57 AM1/6/16
to Google Mobile Ads SDK Developers
1. I'm using an actual device.
2. I'm using this Ad Unit ID: "ca-app-pub-2412876219430673/6669260544".
    And I don't know if it's a live Ad Unit ID.
    I thought once I used this Ad Unit ID, I can receive IAP Ads, as the link suggests.

Veer Arjun Busani

unread,
Jan 6, 2016, 10:40:56 AM1/6/16
to Google Mobile Ads SDK Developers
Hi there,
I was able to successfully receive test IAD ads on an Android 4.2 device connected to Hong Kong through VPN. The other way to debug your issue would be analyzing your network responses. I would suggest you to use Charles proxy and send us your logs for us to have a look into. 

Also do try to see if you are able to see any test ads using the mentioned Ad Unit ID when connected to USA through VPN. Note that you would not be able to see any live ads. Also add your test device and see if that helps. You would be able to know your device id through the logs like this - 

admob.demo.iap.defaultpurchase I/Ads: Use AdRequest.Builder.addTestDevice("91EFXXXXXXXXXXXX8321") to get test ads on this device.
Reply all
Reply to author
Forward
0 new messages