Ads on apps created using Droidscript

766 views
Skip to first unread message

Durga Prasad

unread,
Jan 7, 2015, 10:28:07 AM1/7/15
to androi...@googlegroups.com
Hello,

Is it possible to put ads in the app which i developed using Droidscript ? If so can anyone give post some sample code ?

Selami Dinçer

unread,
Jan 7, 2015, 11:36:48 AM1/7/15
to androi...@googlegroups.com
Use webWiev method and admob .
<script type="text/javascript" src="http://media.admob.com/api/v1/google_mobile_app_ads.js"></script>.
<script type="text/javascript"><!--
google_ad_client = "ca-pub-9291736771592509";
/* JQMDemoAd1 */
google_ad_slot = "9699201605";
google_ad_width = 320;
google_ad_height = 50;
//-->
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32423518-1']);
_gaq.push(['_trackPageview']);

(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>


</head>
<body>

<div data-role="page">

<div data-role="header">
<a href="index.html" data-ajax="false" data-icon="home">AnaSayfa</a>
<h1>Sayfa Header</h1>
<a href="PageHdFtSource.html" data-overlay-theme="e" data-icon="info" class="ui-btn-right">Kod</a>
</div>

<div data-role="content">
<p>Page content goes here.</p>
</div>

<div data-role="footer">
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>

Durga Prasad

unread,
Jan 14, 2015, 10:31:35 AM1/14/15
to androi...@googlegroups.com
Hi Selami,

I have tried the above code. But it seems the ad sizes are exceeding the mobile screen. Is this Mobile Compatible Ad Size ?

Gabriele Cozzolino

unread,
Aug 30, 2015, 5:26:56 PM8/30/15
to AndroidScript
Can you give some further instructions on how to correctly set IDs? I have this code but this isn't showing anything

<script type="text/javascript" src="http://media.admob.com/api/v1/google_mobile_app_ads.js"></script>. 
        <script type="text/javascript"><!-- 
                google_ad_client = "pub-9629409371389849"; 
                /* JQMDemoAd1 */ 
                google_ad_slot = "6112091884"; 
                google_ad_width = 320; 
                google_ad_height = 50; 
        //--> 
        </script> 
        <script type="text/javascript"> 
                var _gaq = _gaq || []; 
                _gaq.push(['_setAccount', 'UA-50147699-1']); 
                _gaq.push(['_trackPageview']); 

                (function () { 
                        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
                        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
                        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 
                })(); 
        </script> 


</head> 
<body> 

<div data-role="page"> 
<div data-role="header"> 
<div data-role="footer"> 
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> 
</div>

Thanks

sankarshan dudhate

unread,
Sep 2, 2015, 7:42:03 AM9/2/15
to AndroidScript
Hi guys,
I think you should use Leadbolt ad network. It is as easy as creating a webview(If using native js apps). Just use web.LoadHtml('yourAdUrl') and you're done. I've got them working. They also give you an account manager which helps you anytime you need him. Hope that helps.

Regards,
Sankarshan

Gabriele Cozzolino

unread,
Sep 2, 2015, 1:06:53 PM9/2/15
to AndroidScript
Leadbolt has very low revenues, admob is better

sankarshan dudhate

unread,
Sep 2, 2015, 11:46:56 PM9/2/15
to AndroidScript
Hi Gabriele,
I don't think that leadbolt has low revenues. I'm satisfied to use it. By the way, Does admob offer html ads ?
I primarily neglected admob because it needed 18 years of age.

Gabriele Cozzolino

unread,
Sep 3, 2015, 1:57:31 AM9/3/15
to AndroidScript
No it doesn't. Let me give it a try. How can I use leadbolt? Have you the html code needed? Some example? Would be much appreciated :-)

sankarshan dudhate

unread,
Sep 3, 2015, 2:14:43 AM9/3/15
to AndroidScript
Hi Gabriele,
Leadbolt is fairly easy to use. Just sign up, in Dashboard-> Create a new app. Your app will be shown( it doesn't need code just for further checking issues). Once app is shown, you can then change the ads(for android sdk only) from banner ads to html ads. Grab the code, place it in a webview in your app and set your app live from Dashboard. It takes no time. I've already started earning.

P.S. After you have the code for ad, use webview.LoadHtml('yourcode') method rather than LoadUrl method. Chris pointed out that LoadUrl method won't work with those .js urls.

P.S. Leadbolt also gives you an acvount manager. So, you can ask any doubts to him or otherwise, I am always ready to help.

Gabriele Cozzolino

unread,
Sep 3, 2015, 3:50:38 PM9/3/15
to AndroidScript
Ok thanks, it is working, but it isn't very centered and it doesn't stretch, leaving some white border, how can I adjust it? Thank you again

nikhil baby

unread,
Sep 11, 2015, 7:52:16 AM9/11/15
to AndroidScript
can you please tell more how to get the code from leadbolt

Vish Seenarain

unread,
Sep 15, 2015, 4:56:11 AM9/15/15
to AndroidScript
Heloo everyone,

Can you tell me which ads are better for website?
Is AdSense okay?

Regards :)

Reply all
Reply to author
Forward
0 new messages