@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_main, container, false);
MobileAds.initialize(this.getContext(),R.string.app_ad_id);
// Grab your RecyclerView and the RecyclerViewFastScroller from the layout
mRecyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) view.findViewById(R.id.fast_scroller);
// Connect the recycler to the scroller (to let the scroller scroll the list)
fastScroller.setRecyclerView(mRecyclerView);
// Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)
mRecyclerView.addOnScrollListener(fastScroller.getOnScrollListener());
mRecyclerView.addItemDecoration(
new DividerItemDecoration(getActivity(), null));
AdView mAdView = (AdView) view.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
// AdRequest adRequest = new AdRequest.Builder().addTestDevice("F0F8469FF147B5FB926C65040F92276A")
// .build();
mAdView.loadAd(adRequest);
return view;
}
AdRequest adRequest = new AdRequest.Builder().build();
But, if i'm using ad request with testing device:
AdRequest adRequest = new AdRequest.Builder().addTestDevice("F0F8469FF147B5FB926C65040F92276A")
.build();
My app show ads successfully.
Could you help me fix this problem?Hi Veer, This is the first time I put Ads in my project and I'm getting error when trying to using it.
My Unit Id is ca-app-pub-8154285100101356/5889772825
Hope your help. Best regards.
11-23 07:32:51.216 147-1366/? W/SocketClient: write error (Broken pipe)11-23 07:32:51.236 1322-1322/? W/Ads: JS: The page at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html displayed insecure content from file:///android_asset/webkit/android-weberror.png.(null:1)11-23 07:32:51.236 1322-1322/? W/Web Console: The page at https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html displayed insecure content from file:///android_asset/webkit/android-weberror.png.at null:111-23 07:33:01.136 1322-1363/? W/Ads: There was a problem getting an ad response. ErrorCode: 011-23 07:33:01.136 1322-1322/? W/Ads: Failed to load ad: 0
11-23 11:59:13.140 9918-9918/com.myapp.packageidI/Ads: Starting ad request.11-23 11:59:13.140 9918-9918/com.myapp.packageidI/Ads: Use AdRequest.Builder.addTestDevice("7DA8A5B216E868636B382A7B9756A4E6") to get test ads on this device.11-23 11:59:13.143 6523-6523/? D/Ads: Binding to the ad cache service.11-23 11:59:13.145 9918-9918/com.myapp.packageidD/Ads: Getting webview cookie from CookieManager.11-23 11:59:13.146 9918-10289/com.myapp.packageidD/Ads: AdLoaderBackgroundTask started.11-23 11:59:13.151 9918-10290/com.myapp.packageidD/Ads: Fetching ad response from remote ad request service.11-23 11:59:13.171 6523-6523/? D/Ads: Binding to the ad request service.11-23 11:59:13.185 6523-10292/? D/Ads: Starting ad request from service using: AFMA_getAd11-23 11:59:13.205 6523-10293/? D/Ads: Fail to obtain recent context.11-23 11:59:13.230 6523-10292/? D/Ads: Got 2 signal pbs from gmscore11-23 11:59:13.237 6523-10292/? D/Ads: Merged client and gmscore signals11-23 11:59:13.237 6523-10292/? D/Ads: Return the combined signals11-23 11:59:13.264 6523-10292/? D/Ads: AdRequestServiceImpl: Sending request: https://googleads.g.doubleclick.net/mads/gma?carrier=40405&riv=14&native_image_orientation=any&_activity_context=true&format=320x50_mb&gl=US&seq_num=6...............................11-23 11:59:13.381 6523-10292/? W/Ads: Received error HTTP response code: 40311-23 11:59:13.381 9918-9930/com.myapp.packageidD/Ads: Received ad response.11-23 11:59:13.381 9918-9930/com.myapp.packageidW/Ads: There was a problem getting an ad response. ErrorCode: 011-23 11:59:13.381 9918-9918/com.myapp.packageidW/Ads: Failed to load ad: 011-23 11:59:13.386 9918-9918/com.myapp.packageidD/Ads: Enable the debug gesture detector on the admob ad frame.
Hi Almas,
It could be that you have only recently created a new Ad Unit ID and requesting for live ads. It could take a few hours for ads to start getting served if that is that case. If you are receiving test ads then your implementation is fine. Just wait a few hours and see if you are able to receive live ads then. If not, can send us your Ad Unit ID for us to look into.Thanks,
Veer Busani
Mobile Ads SDK Team
ca-app-pub-8371543090074322/3340793698
i'm having problem loading live ads .
test ads are working fine.
i'm getting this : There was a problem getting an ad response. ErrorCode: 0 , Failed to load ad: 0
i've created adunit 3-4 days ago still.
Hi Almas,
It could be that you have only recently created a new Ad Unit ID and requesting for live ads. It could take a few hours for ads to start getting served if that is that case. If you are receiving test ads then your implementation is fine. Just wait a few hours and see if you are able to receive live ads then. If not, can send us your Ad Unit ID for us to look into.Thanks,
Veer Busani
Mobile Ads SDK Team
Banner unit ID: ca-app-pub-6043499611790271/9486122182
Interstitial unit ID: ca-app-pub-6043499611790271/1962855388
--
---
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-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
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-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Best Regars,YUSUF YILDIZ
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/fBe3YL3ffpo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Best Regars,YUSUF YILDIZ
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/fBe3YL3ffpo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To post to this group, send email to google-adm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Best Regars,YUSUF YILDIZ
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/fBe3YL3ffpo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
Hi there,Could you send us your Ad Unit ID? Also, have you tried to test with our sample apps? It could also mean that you are testing using a newly created Ad Unit ID. In that case, I would suggest you to try again now and let us know if the issue still exists.Thanks,Veer Busani
Mobile Ads SDK Team
On Monday, July 11, 2016 at 4:34:35 AM UTC-4, 莫梓奇 wrote:can you help me
W/Ads: There was a problem getting an ad response. ErrorCode: 0W/Ads: Failed to load ad: 0
在 2016年6月22日星期三 UTC+8下午10:55:07,Veer Arjun Busani(Mobile Ads SDK Team)写道:Hi guys,Thank you and I will certainly forward this request to the team.Thanks,Veer Busani
Mobile Ads SDK Team
On Wednesday, June 22, 2016 at 4:22:56 AM UTC-4, Almas Maris wrote:Thank you for your reply. My ads works now. Like Sebastian said you guys should warn the developers that his new ad unit might not be properly created until a few hours. It will be very helpful.
On Tuesday, June 21, 2016 at 11:03:43 PM UTC+7, Veer Arjun Busani(Mobile Ads SDK Team) wrote:
Hi Almas,
It could be that you have only recently created a new Ad Unit ID and requesting for live ads. It could take a few hours for ads to start getting served if that is that case. If you are receiving test ads then your implementation is fine. Just wait a few hours and see if you are able to receive live ads then. If not, can send us your Ad Unit ID for us to look into.Thanks,
Veer Busani
Mobile Ads SDK Team
ca-app-pub-1643991206224494/4494064166
Regardsca-app-pub-1059968569870592/4653959262
Logcat output:
without addtestDevice>>
05-19 18:31:45.915 19688-19688/com.rashion.online I/Ads: Starting ad request.
05-19 18:31:45.917 19688-19688/com.rashion.online I/Ads: Use AdRequest.Builder.addTestDevice("362B85ABAD1DCAB6B80B42E2BAA8BE65") to get test ads on this device.
05-19 18:31:46.562 19688-19700/com.rashion.online W/Ads: There was a problem getting an ad response. ErrorCode: 0
05-19 18:31:46.568 19688-19688/com.rashion.online W/Ads: Failed to load ad: 0
with addtestDevice>>
05-19 18:28:06.550 12597-12597/com.rashion.online I/Ads: Starting ad request.
05-19 18:28:27.491 12597-12597/com.rashion.online I/Ads: Scheduling ad refresh 60000 milliseconds from now.
05-19 18:28:27.548 12597-12597/com.rashion.online I/Ads: Ad finished loading.
Hi,
Banner
ca-app-pub-5721422416762580/9155629825
ca-app-pub-5721422416762580/7583705460
Native L003
ca-app-pub-5721422416762580/5832845375
ca-app-pub-5721422416762580/8184317170
Dear Veer,