facebook

Panel & adsense

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #328683 Reply

    californiadeveloper
    Participant

    I am still looking for help in terms of making the .append command work with Google AdSense code. This is the code I am trying to make work:

    phoneui.documentReadyHandler = function()
    {
    $(‘#m1-YLM-bottompanel’).append(
    ‘<div id=ads>’+
    ‘<script type=”text/javascript”>’+
    ‘google_ad_client = “ca-pub-3530079590465973”;’+
    ‘google_ad_slot = “2783867701”;’+
    ‘google_ad_width = 320;’+
    ‘google_ad_height = 50;’+
    ‘</script>’+
    ‘<script type=”text/javascript”‘+
    ‘src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>’+
    ‘</script>’+
    ‘</div>’);
    }

    I have attached my project with the corrections suggested in the thread so far.

    I would appreciate any feedback.

    Attachments:
    You must be logged in to view attached files.
    #328714 Reply

    Hi californiadeveloper,

    I’ve discussed your request with dev team and it seems that such usage of adsense violates Google rules. Please see the next link for know more similar cases: http://stackoverflow.com/questions/1142861/jquery-append-google-adsense-to-div

    The best way to proceed is edit HTML to insert ad directly to your design.

    #328749 Reply

    californiadeveloper
    Participant

    Octavio,

    Thank you so much for your reply. I would like to go ahead and edit the HTML as you suggested, but I am not sure how to do that. I looked in my project-www directory and I don’t see any HTML files there even after I selected Project > Generate HTML files from the MobiOne Menu.

    Once I find the HTML files and edit them, I assume that I should simply replace them. My question is, will the application work with those edited HTML files in the Test Center? Or must I test them on an IOS device.

    Thank you very much for your speedy reply.

    #328750 Reply

    willyhopa
    Member

    Hi support-octavio ,

    Any chance that you provide an example ? ( even blank mobi project with dummy code for adsese ) and also be sure that it do not violate google TOS

    coz in the last link you sent there is several replies that say this solution MAY violate the TOS

    so any chance you help us a little more ?

    #328762 Reply

    californiadeveloper
    Participant

    i tried editing my HTML file in the following manner (adding a new div right below the definition of my bottompanel), but I still don’t see ads. Can someone please tell me what mistake I made?

    <!DOCTYPE HTML>
    <html>
    <head>
    <title>YLM</title>
    <meta name=”generator” content=”MobiOne Studio – Design Center, http://genuitec.com/mobile“/>
    <meta name=”viewport” content=
    “width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0″/>
    <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″/>
    <meta name=”apple-mobile-web-app-capable” content=”yes”/>
    <meta name=”format-detection” content=”telephone=no”/>
    <link rel=”stylesheet” href=”YLM.css”/>
    <link rel=”stylesheet” href=”res/spinningwheel.css”/>
    <script type=”text/javascript” src=”res/jquery-1.7.1.min.js”></script>
    <script type=”text/javascript” src=”res/preloadCssImages.js”></script>
    <script type=”text/javascript” src=”res/iscroll.js”></script>
    <script type=”text/javascript” src=”YLM.js”></script>
    <script type=”text/javascript” src=”res/phoneui.js”></script>
    <script type=”text/javascript” src=”res/spinningwheel.js”></script>
    <script type=”text/javascript” src=”YLM_custom.js”></script>
    </head>
    <body>
    <div class=”m1-top-root”>
    <!– Loading spinner –>
    <div class=”m1-loading”>
    <div>
    <canvas class=”m1-loading-spinner” width=”25″ height=”25″></canvas>
    <span class=”m1-loading-text”></span>
    </div>
    </div>
    <!– Prompt to be shown for adding page on homescreen –>
    <canvas class=”m1-homescreen-prompt” width=”250″ height=”120″></canvas>
    <!– ***** YLM ***** –>
    <div id=”m1-YLM” class=”m1-root”>
    <div id=”m1-YLM-navigation1″ class=”m1-navbar”>
    <div id=”m1-YLM-push2″ class=”m1-clickable m1-push-button m1-button” name=”push2″
    data-action-click-id=”action0″>Share </div>
    <div id=”m1-YLM-push4″ class=”m1-clickable m1-push-button m1-button” name=”push4″
    data-action-click-id=”action1″>Rate </div>
    <div id=”m1-YLM-push5″ class=”m1-clickable m1-push-button m1-button” name=”push5″
    data-action-click-id=”action2″>Go Back</div>
    </div>
    <div id=”m1-YLM-panel1″ class=”m1-iscroll-wrapper”>
    <div id=”m1-YLM-panel1-scroller” class=”m1-iscroll-scroller” data-bounce=”true”>
    <img id=”m1-YLM-image1″ src=”images/mirror%20%282%29.jpg”/>
    <textarea id=”m1-YLM-textArea1″
    class=”m1-textfield m1-textarea m1-iscroll-no-prevent-default” name=”textArea1″ wrap=
    “soft”></textarea>
    <div id=”m1-YLM-push3″ class=”m1-clickable m1-push-button m1-button” name=”push3″
    data-action-click-id=”action3″>Stop</div>
    <div id=”m1-YLM-bottompanel” class=”m1-iscroll-wrapper”>
    <div id=”m1-YLM-bottompanel-scroller” class=”m1-iscroll-scroller” data-bounce=”true”>
    </div>
    </div>
    <div id=ads>
    <script type=”text/javascript”><!–
    google_ad_client = “ca-pub-nnnnnnnnnnn”;
    /* Mobile Banner Ad */
    google_ad_slot = “nnnnnnnnnnn”;
    google_ad_width = 320;
    google_ad_height = 50;
    //–>
    </script>
    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;
    </script>
    </div>

    <div id=”m1-YLM-push1″ class=”m1-clickable m1-push-button m1-button” name=”push1″
    data-action-click-id=”action4″>Start</div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>

    #328782 Reply

    Hi Californiadeveloper,

    Forgive me if I’m saying something stupid here but isn’t the problem to do with Adsense needing to work from an IP and domain, i.e a fixed website? AdMobs is really the solution here unless of course you are building a mobile we application onlly hosted then disregard what I’m saying.

    #328783 Reply

    californiadeveloper
    Participant

    Thank you very much for your reply. I looked at AdMobs as you suggested and on the front page of their website it says, “We are simplifying our suite of products by transitioning AdMob mobile web publishers to Google AdSense. Starting May 1, 2012 support for mobile web sites on AdMob will be discontinued and you must have a Google AdSense account to monetize mobile web sites. More information is available here. ”

    So I think I CAN use AdSense. Not sure though. Again, if anyone has comments about the way I have implemented the code in my HTML, I would love more feedback. Thanks so much. Here it is:

    <!DOCTYPE HTML>
    <html>
    <head>
    <title>YLM</title>
    <meta name=”generator” content=”MobiOne Studio – Design Center, http://genuitec.com/mobile“/>
    <meta name=”viewport” content=
    “width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0″/>
    <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″/>
    <meta name=”apple-mobile-web-app-capable” content=”yes”/>
    <meta name=”format-detection” content=”telephone=no”/>
    <link rel=”stylesheet” href=”YLM.css”/>
    <link rel=”stylesheet” href=”res/spinningwheel.css”/>
    <script type=”text/javascript” src=”res/jquery-1.7.1.min.js”></script>
    <script type=”text/javascript” src=”res/preloadCssImages.js”></script>
    <script type=”text/javascript” src=”res/iscroll.js”></script>
    <script type=”text/javascript” src=”YLM.js”></script>
    <script type=”text/javascript” src=”res/phoneui.js”></script>
    <script type=”text/javascript” src=”res/spinningwheel.js”></script>
    <script type=”text/javascript” src=”YLM_custom.js”></script>
    </head>
    <body>
    <div class=”m1-top-root”>
    <!– Loading spinner –>
    <div class=”m1-loading”>
    <div>
    <canvas class=”m1-loading-spinner” width=”25″ height=”25″></canvas>
    <span class=”m1-loading-text”></span>
    </div>
    </div>
    <!– Prompt to be shown for adding page on homescreen –>
    <canvas class=”m1-homescreen-prompt” width=”250″ height=”120″></canvas>
    <!– ***** YLM ***** –>
    <div id=”m1-YLM” class=”m1-root”>
    <div id=”m1-YLM-navigation1″ class=”m1-navbar”>
    <div id=”m1-YLM-push2″ class=”m1-clickable m1-push-button m1-button” name=”push2″
    data-action-click-id=”action0″>Share </div>
    <div id=”m1-YLM-push4″ class=”m1-clickable m1-push-button m1-button” name=”push4″
    data-action-click-id=”action1″>Rate </div>
    <div id=”m1-YLM-push5″ class=”m1-clickable m1-push-button m1-button” name=”push5″
    data-action-click-id=”action2″>Go Back</div>
    </div>
    <div id=”m1-YLM-panel1″ class=”m1-iscroll-wrapper”>
    <div id=”m1-YLM-panel1-scroller” class=”m1-iscroll-scroller” data-bounce=”true”>
    <img id=”m1-YLM-image1″ src=”images/mirror%20%282%29.jpg”/>
    <textarea id=”m1-YLM-textArea1″
    class=”m1-textfield m1-textarea m1-iscroll-no-prevent-default” name=”textArea1″ wrap=
    “soft”></textarea>
    <div id=”m1-YLM-push3″ class=”m1-clickable m1-push-button m1-button” name=”push3″
    data-action-click-id=”action3″>Stop</div>
    <div id=”m1-YLM-bottompanel” class=”m1-iscroll-wrapper”>
    <div id=”m1-YLM-bottompanel-scroller” class=”m1-iscroll-scroller” data-bounce=”true”>
    </div>
    </div>
    <div id=ads>
    <script type=”text/javascript”><!–
    google_ad_client = “ca-pub-nnnnnnnnnnn”;
    /* Mobile Banner Ad */
    google_ad_slot = “nnnnnnnnnnn”;
    google_ad_width = 320;
    google_ad_height = 50;
    //–>
    </script>
    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;
    </script>
    </div>

    <div id=”m1-YLM-push1″ class=”m1-clickable m1-push-button m1-button” name=”push1″
    data-action-click-id=”action4″>Start</div>
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>

    #328784 Reply

    That’s really strange I signed up for AdMob only recently and I have only just noticed in their help you are quite correct. But the AdMob site is still very much up and running. Have you seen this https://developers.google.com/adsense-for-mobile-apps/. The SDK link gives a 404 but the AdMob one doesn’t!

    I would urge you to get to the bottom of exactly which service Google provides for native apps because as I say we tried our Adsense code without any joy and we have had problems before transferring a site from html to wordpress with Adsense.

    #328873 Reply

    californiadeveloper
    Participant

    Were you able to get AdMobs working with MobiOne?

    #328876 Reply

    @All,

    Ad sense is only available for mobile webapps, not native apps. Google admob support is on our todo list.

    #328885 Reply

    californiadeveloper
    Participant

    Thank you Octavio. So are you saying that my attempt to implement via HTML will not work?

    #328935 Reply

    @californiadeveloper,

    Unfortunatelly the answer is yes. Please see: http://support.google.com/adsense/bin/answer.py?hl=en&answer=1354760

    “The use of AdSense for mobile in a mobile application is a violation of AdSense policies. A mobile application constitutes any downloadable application, even if a WebView is used to display the ad. Any AdSense for mobile ad units found in mobile applications will be disabled. If you’re looking for an advertising solution for your mobile application, please sign up for AdMob, Google’s leading mobile advertising display product.”

    #328939 Reply

    californiadeveloper
    Participant

    ok, no problem. but how do i implement the admobs code? do you have any examples that work for that?

    #328948 Reply

    As I understand it, you’ve got to first create an AdMob account, add your publisher/business/account details, then add a site or app. I haven’t tried any of this yet because I believe you have to publish the app first on either App Store and Google Play to get the url for the app from there:

    http://support.google.com/admob/bin/answer.py?hl=en-GB&answer=1619834&ctx=cb&src=cb&cbid=-1hfq8cdb72404

    Hope this helps because I’d like to know how it works fully too.

    #329058 Reply

    californiadeveloper
    Participant

    Thank you so much for your reply. I do appreciate it. I understand that I need to create an AdMobs account and prepare to publish with itunesconnect to determine the URL of the app. However, my question has to do with where the AdMobs code goes. Does it get put in the custom.js or in the HTML?

Viewing 15 posts - 16 through 30 (of 31 total)
Reply To: Panel & adsense

You must be logged in to post in the forum log in