Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Answered - Adsense in New Window!

Ok i've finally got a working version, I included the 4 checks to ensure that the google clicks are recorded and not doubled up. It could technically still double up on really slow connections, But it seems to work in testing.

So here's the answer that 3 people have told me you can't do.

var adview = Titanium.UI.createWebView({
backgroundColor:'white',
width:320,bottom:0,
height:50,url:'ad.html'});
win2.add(adview);
var url1 = "";
var url2 = "";
var url3 = "";
interval = setInterval(watchFrame, 300);
function watchFrame(){
if (
(adview.url!="file:///android_asset/Resources/ad.html")
&&(adview.url!="ad.html")){
     url3=url2;
     url2=url1;
     url1=adview.url;
     if((url3==url2)&&(url2==url1))
{adview.url="ad.html";Titanium.Platform.openURL(url1);}
}
}
— asked June 24th 2010 by Ryan Tregea
  • adsense
  • advertising
  • android
  • google
  • new
  • window
1 Comment
  • Ryan, correct me if I am wrong, but adsense is an implementation for websites that can open up on the net and sites that can be served via mobile browsers.

    I tried signing up for an account and it asked me to provide the URL for my site.

    I also noticed on some forums that "No AdSense code may be integrated into a software application."

    Your thoughts on your implementation of AdSense within your app..

    — commented June 24th 2010 by Johnny Basu

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.