[AC-3571] Ti.Admob : ad not received
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2016-05-04T06:12:45.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Appcelerator Modules |
| Labels | n/a |
| Reporter | Bhushankumar pawar |
| Assignee | Shak Hossain |
| Created | 2016-04-29T20:18:53.000+0000 |
| Updated | 2017-03-05T17:56:25.000+0000 |
Description
[INFO] : Ads: Starting ad request.
[WARN] : Ads: There was a problem getting an ad response. ErrorCode: 1
[WARN] : Ads: Failed to load ad: 1
[DEBUG] : AdMobView: (main) [289,131089] onAdFailedToLoad(): 1
[INFO] : ad not received
AdMob event listener : not reving ads.
adMobView.addEventListener(Admob.AD_NOT_RECEIVED,function(){
//alert("ad not received");
Ti.API.info("ad not received");
});
Hello, I am unable to reproduce this issue. I am able to display banner ads with
ti.admob 2.1.5. *Steps:* 1. Create a default classic project. 2. Ad ti.admob 2.1.5 module in that project. 3. Replace app.js with following.4.Give banner ad id in/** * Copyright (c) 2011 by Studio Classics. All Rights Reserved. * Author: Brian Kurzius * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ var win = Titanium.UI.createWindow({ backgroundColor: "#FFFFFF" }); // require AdMob var Admob = require('ti.admob'); // then create an adMob view var adMobView = Admob.createView({ publisherId:"your ad id ", testing:false, // default is false //top: 10, //optional //left: 0, // optional //right: 0, // optional bottom: 0, // optional adBackgroundColor:"FF8855", // optional backgroundColorTop: "738000", //optional - Gradient background color at top borderColor: "#000000", // optional - Border color textColor: "#000000", // optional - Text color urlColor: "#00FF00", // optional - URL color linkColor: "#0000FF" //optional - Link text color //primaryTextColor: "blue", // deprecated -- now maps to textColor //secondaryTextColor: "green" // deprecated -- now maps to linkColor }); //listener for adReceived adMobView.addEventListener(Admob.AD_RECEIVED,function(){ // alert("ad received"); Ti.API.info("ad received"); }); //listener for adNotReceived adMobView.addEventListener(Admob.AD_NOT_RECEIVED,function(){ //alert("ad not received"); Ti.API.info("ad not received"); }); var adRequestBtn = Ti.UI.createButton({ title:"Request an ad", top:"10%", height: "10%", width: "80%" }); adRequestBtn.addEventListener("click",function(){ adMobView.requestAd(); }); var adRequestBtn2 = Ti.UI.createButton({ title: "Request a test ad", top: "25%", height: "10%", width: "80%" }); adRequestBtn2.addEventListener("click",function(){ adMobView.requestTestAd(); }); win.add(adMobView); win.add(adRequestBtn); win.add(adRequestBtn2); win.open();publisherId:. 5. Build and run the app. 6. Click "REQUESR AN AD" button. 7. Following console log is given also ad is shown.Thanks *Environment*: *Device info:* Nexus7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.2.GA and 5.2.1.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0